Skip to content

Commit 79cfe2b

Browse files
committed
...and working
1 parent acb00a3 commit 79cfe2b

File tree

20 files changed

+175
-88
lines changed

20 files changed

+175
-88
lines changed

ios-pwa-wrapper.xcodeproj/project.pbxproj

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
2D504BEF1FA100E20019B279 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D504BEE1FA100E20019B279 /* AppDelegate.swift */; };
1111
2D504BF11FA100E20019B279 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D504BF01FA100E20019B279 /* ViewController.swift */; };
1212
2D504BF41FA100E20019B279 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2D504BF21FA100E20019B279 /* Main.storyboard */; };
13-
2D504BF71FA100E20019B279 /* ios_pwa_wrapper.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 2D504BF51FA100E20019B279 /* ios_pwa_wrapper.xcdatamodeld */; };
1413
2D504BF91FA100E20019B279 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2D504BF81FA100E20019B279 /* Assets.xcassets */; };
1514
2D504BFC1FA100E20019B279 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2D504BFA1FA100E20019B279 /* LaunchScreen.storyboard */; };
1615
2D504C071FA100E20019B279 /* ios_pwa_wrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D504C061FA100E20019B279 /* ios_pwa_wrapperTests.swift */; };
1716
2D504C121FA100E20019B279 /* ios_pwa_wrapperUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D504C111FA100E20019B279 /* ios_pwa_wrapperUITests.swift */; };
17+
2DC96ADE1FA5DD32006B5881 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DC96ADD1FA5DD32006B5881 /* Constants.swift */; };
1818
/* End PBXBuildFile section */
1919

2020
/* Begin PBXContainerItemProxy section */
@@ -39,7 +39,6 @@
3939
2D504BEE1FA100E20019B279 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4040
2D504BF01FA100E20019B279 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
4141
2D504BF31FA100E20019B279 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
42-
2D504BF61FA100E20019B279 /* ios_pwa_wrapper.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ios_pwa_wrapper.xcdatamodel; sourceTree = "<group>"; };
4342
2D504BF81FA100E20019B279 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4443
2D504BFB1FA100E20019B279 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4544
2D504BFD1FA100E20019B279 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -49,6 +48,7 @@
4948
2D504C0D1FA100E20019B279 /* ios-pwa-wrapperUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ios-pwa-wrapperUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5049
2D504C111FA100E20019B279 /* ios_pwa_wrapperUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ios_pwa_wrapperUITests.swift; sourceTree = "<group>"; };
5150
2D504C131FA100E20019B279 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
51+
2DC96ADD1FA5DD32006B5881 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
5252
/* End PBXFileReference section */
5353

5454
/* Begin PBXFrameworksBuildPhase section */
@@ -105,7 +105,7 @@
105105
2D504BF81FA100E20019B279 /* Assets.xcassets */,
106106
2D504BFA1FA100E20019B279 /* LaunchScreen.storyboard */,
107107
2D504BFD1FA100E20019B279 /* Info.plist */,
108-
2D504BF51FA100E20019B279 /* ios_pwa_wrapper.xcdatamodeld */,
108+
2DC96ADD1FA5DD32006B5881 /* Constants.swift */,
109109
);
110110
path = "ios-pwa-wrapper";
111111
sourceTree = "<group>";
@@ -262,9 +262,9 @@
262262
isa = PBXSourcesBuildPhase;
263263
buildActionMask = 2147483647;
264264
files = (
265-
2D504BF71FA100E20019B279 /* ios_pwa_wrapper.xcdatamodeld in Sources */,
266265
2D504BF11FA100E20019B279 /* ViewController.swift in Sources */,
267266
2D504BEF1FA100E20019B279 /* AppDelegate.swift in Sources */,
267+
2DC96ADE1FA5DD32006B5881 /* Constants.swift in Sources */,
268268
);
269269
runOnlyForDeploymentPostprocessing = 0;
270270
};
@@ -558,19 +558,6 @@
558558
defaultConfigurationName = Release;
559559
};
560560
/* End XCConfigurationList section */
561-
562-
/* Begin XCVersionGroup section */
563-
2D504BF51FA100E20019B279 /* ios_pwa_wrapper.xcdatamodeld */ = {
564-
isa = XCVersionGroup;
565-
children = (
566-
2D504BF61FA100E20019B279 /* ios_pwa_wrapper.xcdatamodel */,
567-
);
568-
currentVersion = 2D504BF61FA100E20019B279 /* ios_pwa_wrapper.xcdatamodel */;
569-
path = ios_pwa_wrapper.xcdatamodeld;
570-
sourceTree = "<group>";
571-
versionGroupType = wrapper.xcdatamodel;
572-
};
573-
/* End XCVersionGroup section */
574561
};
575562
rootObject = 2D504BE31FA100E20019B279 /* Project object */;
576563
}

ios-pwa-wrapper/AppDelegate.swift

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1919
// Override point for customization after application launch.
2020

2121
// Change Navigation style
22-
UINavigationBar.appearance().barTintColor = UIColor.green
23-
UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.orange]
24-
UIBarButtonItem.appearance().tintColor = UIColor.white
22+
UINavigationBar.appearance().barTintColor = primaryColor
23+
UINavigationBar.appearance().titleTextAttributes = [NSAttributedStringKey.foregroundColor: navigationTitleColor]
24+
UINavigationBar.appearance().largeTitleTextAttributes = [NSAttributedStringKey.foregroundColor: navigationTitleColor]
25+
UIBarButtonItem.appearance().tintColor = navigationButtonColor
2526

2627
return true
2728
}
@@ -46,53 +47,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4647

4748
func applicationWillTerminate(_ application: UIApplication) {
4849
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
49-
// Saves changes in the application's managed object context before the application terminates.
50-
self.saveContext()
51-
}
52-
53-
// MARK: - Core Data stack
54-
55-
lazy var persistentContainer: NSPersistentContainer = {
56-
/*
57-
The persistent container for the application. This implementation
58-
creates and returns a container, having loaded the store for the
59-
application to it. This property is optional since there are legitimate
60-
error conditions that could cause the creation of the store to fail.
61-
*/
62-
let container = NSPersistentContainer(name: "ios_pwa_wrapper")
63-
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
64-
if let error = error as NSError? {
65-
// Replace this implementation with code to handle the error appropriately.
66-
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
67-
68-
/*
69-
Typical reasons for an error here include:
70-
* The parent directory does not exist, cannot be created, or disallows writing.
71-
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
72-
* The device is out of space.
73-
* The store could not be migrated to the current model version.
74-
Check the error message to determine what the actual problem was.
75-
*/
76-
fatalError("Unresolved error \(error), \(error.userInfo)")
77-
}
78-
})
79-
return container
80-
}()
81-
82-
// MARK: - Core Data Saving support
83-
84-
func saveContext () {
85-
let context = persistentContainer.viewContext
86-
if context.hasChanges {
87-
do {
88-
try context.save()
89-
} catch {
90-
// Replace this implementation with code to handle the error appropriately.
91-
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
92-
let nserror = error as NSError
93-
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
94-
}
95-
}
9650
}
9751

9852
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "ic_cloud_off_black_48dp-2.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "ic_cloud_off_black_48dp-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "ic_cloud_off_black_48dp.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
1.57 KB
Loading
1.07 KB
Loading
2.09 KB
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "ic_launcher-2.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "ic_launcher-1.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "ic_launcher.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
7.84 KB
Loading
4.65 KB
Loading

0 commit comments

Comments
 (0)