Skip to content

Commit

Permalink
Update Search for iOS 15 + adds missing app icons
Browse files Browse the repository at this point in the history
* Add mising app icon sizes

* Update search APIs for iOS 15
  • Loading branch information
ZachOrr authored Mar 20, 2024
1 parent 73336e7 commit cea5273
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 86 deletions.
10 changes: 7 additions & 3 deletions the-blue-alliance-ios/AppDelegate/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
private let errorRecorder = TBAErrorRecorder()
lazy var indexDelegate: TBACoreDataCoreSpotlightDelegate = {
let description = persistentContainer.persistentStoreDescriptions.first!
return TBACoreDataCoreSpotlightDelegate(forStoreWith: description,
model: persistentContainer.managedObjectModel)
let coordinator = persistentContainer.persistentStoreCoordinator
let spotlightDelegate = TBACoreDataCoreSpotlightDelegate(forStoreWith: description,
coordinator: coordinator)
spotlightDelegate.startSpotlightIndexing()
return spotlightDelegate
}()
lazy var messaging: Messaging = Messaging.messaging()
lazy var myTBA: MyTBA = {
Expand All @@ -76,6 +79,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
lazy var persistentContainer: TBAPersistenceContainer = {
let persistentContainer = TBAPersistenceContainer()
persistentContainer.persistentStoreDescriptions.forEach {
$0.type = NSSQLiteStoreType
$0.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey)
}
return persistentContainer
Expand Down Expand Up @@ -174,7 +178,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
setupPreviousAuthentication()

// Our app setup operation will load our persistent stores, propogate persistance container
let appSetupOperation = AppSetupOperation(indexDelegate: indexDelegate, persistentContainer: persistentContainer, tbaKit: tbaKit, userDefaults: userDefaults)
let appSetupOperation = AppSetupOperation(persistentContainer: persistentContainer, tbaKit: tbaKit, userDefaults: userDefaults)
weak var weakAppSetupOperation = appSetupOperation
appSetupOperation.completionBlock = { [unowned self] in
if let error = weakAppSetupOperation?.completionError as NSError? {
Expand Down
147 changes: 75 additions & 72 deletions the-blue-alliance-ios/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,116 +1,119 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "tba-icon-20@2x.png",
"scale" : "2x"
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "tba-icon-20@3x.png",
"scale" : "3x"
"idiom" : "universal",
"platform" : "ios",
"scale" : "3x",
"size" : "20x20"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "tba-icon-29@2x.png",
"scale" : "2x"
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "tba-icon-29@3x.png",
"scale" : "3x"
"idiom" : "universal",
"platform" : "ios",
"scale" : "3x",
"size" : "29x29"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "tba-icon-Small-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "tba-icon-Small-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "tba-icon-60@2x.png",
"scale" : "2x"
"filename" : "tba-icon-38@2x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "38x38"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "tba-icon-60@3x.png",
"scale" : "3x"
"filename" : "tba-icon-38@3x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "3x",
"size" : "38x38"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "tba-icon-20.png",
"scale" : "1x"
"filename" : "tba-icon-Small-40@2x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "tba-icon-40.png",
"scale" : "2x"
"filename" : "tba-icon-Small-40@3x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "3x",
"size" : "40x40"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "tba-icon-iPad-29.png",
"scale" : "1x"
"filename" : "tba-icon-Small-40@3x 1.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "60x60"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "tba-icon-iPad-29@2x.png",
"scale" : "2x"
"filename" : "tba-icon-60@3x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "3x",
"size" : "60x60"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "tba-icon-41.png",
"scale" : "1x"
"filename" : "tba-icon-64@2x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "64x64"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "tba-icon-40@2x.png",
"scale" : "2x"
"filename" : "tba-icon-64@3x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "3x",
"size" : "64x64"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "tba-icon-76.png",
"scale" : "1x"
"filename" : "tba-icon-68@2x.png",
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "68x68"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "tba-icon-76@2x.png",
"scale" : "2x"
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "76x76"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "tba-icon-iPad-835@2x.png",
"scale" : "2x"
"idiom" : "universal",
"platform" : "ios",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "tba-icon-Artwork.png",
"scale" : "1x"
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions the-blue-alliance-ios/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class AppSetupOperation: TBAOperation {

let appSetupOperationQueue = OperationQueue()

init(indexDelegate: TBACoreDataCoreSpotlightDelegate, persistentContainer: NSPersistentContainer, tbaKit: TBAKit, userDefaults: UserDefaults) {
init(persistentContainer: NSPersistentContainer, tbaKit: TBAKit, userDefaults: UserDefaults) {
self.destroyPersistentStoreOperation = DestroyPersistentStoreOperation(persistentContainer: persistentContainer, tbaKit: tbaKit, userDefaults: userDefaults)

self.persistentContainerOperation = PersistentContainerOperation(indexDelegate: indexDelegate, persistentContainer: persistentContainer)
self.persistentContainerOperation = PersistentContainerOperation(persistentContainer: persistentContainer)
self.persistentContainerOperation.addDependency(self.destroyPersistentStoreOperation)

super.init()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@ import TBAOperation

class PersistentContainerOperation: TBAOperation {

let indexDelegate: TBACoreDataCoreSpotlightDelegate
let persistentContainer: NSPersistentContainer

init(indexDelegate: TBACoreDataCoreSpotlightDelegate, persistentContainer: NSPersistentContainer) {
self.indexDelegate = indexDelegate
init(persistentContainer: NSPersistentContainer) {
self.persistentContainer = persistentContainer

super.init()
}

override func execute() {
// Setup our Core Data + Spotlight export
persistentContainer.persistentStoreDescriptions.forEach {
$0.setOption(indexDelegate, forKey: NSCoreDataCoreSpotlightExporter)
}
persistentContainer.loadPersistentStores(completionHandler: { (_, error) in
/*
Typical reasons for an error here include:
Expand Down

0 comments on commit cea5273

Please sign in to comment.