Skip to content

Commit cf4150e

Browse files
stephencelismluisbrown
authored andcommitted
Scene delegate cleanup (#959)
* SwiftUI Case Studies: SceneDelegate -> App * Generate plist files
1 parent 3e08d07 commit cf4150e

File tree

10 files changed

+80
-237
lines changed

10 files changed

+80
-237
lines changed

Examples/CaseStudies/CaseStudies.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
DC630FDA2451016B00BAECBA /* ListsOfState.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC630FD92451016B00BAECBA /* ListsOfState.swift */; };
6464
DC634B252448D15B00DAA016 /* 04-HigherOrderReducers-ReusableFavoritingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC634B242448D15B00DAA016 /* 04-HigherOrderReducers-ReusableFavoritingTests.swift */; };
6565
DC88D8A6245341EC0077F427 /* 01-GettingStarted-Animations.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88D8A5245341EC0077F427 /* 01-GettingStarted-Animations.swift */; };
66-
DC89C41924460F95006900B9 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC89C41824460F95006900B9 /* SceneDelegate.swift */; };
6766
DC89C41B24460F95006900B9 /* 00-RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC89C41A24460F95006900B9 /* 00-RootView.swift */; };
6867
DC89C41D24460F96006900B9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC89C41C24460F96006900B9 /* Assets.xcassets */; };
6968
DC89C4442446111B006900B9 /* 01-GettingStarted-Counter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC89C4432446111B006900B9 /* 01-GettingStarted-Counter.swift */; };
@@ -80,6 +79,7 @@
8079
DCC68EE12447C4630037F998 /* 01-GettingStarted-Composition-TwoCounters.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC68EE02447C4630037F998 /* 01-GettingStarted-Composition-TwoCounters.swift */; };
8180
DCC68EE32447C8540037F998 /* 04-HigherOrderReducers-ReusableFavoriting.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC68EE22447C8540037F998 /* 04-HigherOrderReducers-ReusableFavoriting.swift */; };
8281
DCE63B71245CC0B90080A23D /* 04-HigherOrderReducers-Recursion.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCE63B70245CC0B90080A23D /* 04-HigherOrderReducers-Recursion.swift */; };
82+
DCFE1960278DBF0600C14CCF /* CaseStudiesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCFE195F278DBF0600C14CCF /* CaseStudiesApp.swift */; };
8383
/* End PBXBuildFile section */
8484

8585
/* Begin PBXContainerItemProxy section */
@@ -211,7 +211,6 @@
211211
DC634B242448D15B00DAA016 /* 04-HigherOrderReducers-ReusableFavoritingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "04-HigherOrderReducers-ReusableFavoritingTests.swift"; sourceTree = "<group>"; };
212212
DC88D8A5245341EC0077F427 /* 01-GettingStarted-Animations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "01-GettingStarted-Animations.swift"; sourceTree = "<group>"; };
213213
DC89C41324460F95006900B9 /* SwiftUICaseStudies.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUICaseStudies.app; sourceTree = BUILT_PRODUCTS_DIR; };
214-
DC89C41824460F95006900B9 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
215214
DC89C41A24460F95006900B9 /* 00-RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "00-RootView.swift"; sourceTree = "<group>"; };
216215
DC89C41C24460F96006900B9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
217216
DC89C42424460F96006900B9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -232,6 +231,7 @@
232231
DCC68EE02447C4630037F998 /* 01-GettingStarted-Composition-TwoCounters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "01-GettingStarted-Composition-TwoCounters.swift"; sourceTree = "<group>"; };
233232
DCC68EE22447C8540037F998 /* 04-HigherOrderReducers-ReusableFavoriting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "04-HigherOrderReducers-ReusableFavoriting.swift"; sourceTree = "<group>"; };
234233
DCE63B70245CC0B90080A23D /* 04-HigherOrderReducers-Recursion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "04-HigherOrderReducers-Recursion.swift"; sourceTree = "<group>"; };
234+
DCFE195F278DBF0600C14CCF /* CaseStudiesApp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CaseStudiesApp.swift; sourceTree = "<group>"; };
235235
/* End PBXFileReference section */
236236

237237
/* Begin PBXFrameworksBuildPhase section */
@@ -420,8 +420,8 @@
420420
DCE63B70245CC0B90080A23D /* 04-HigherOrderReducers-Recursion.swift */,
421421
DCC68EE22447C8540037F998 /* 04-HigherOrderReducers-ReusableFavoriting.swift */,
422422
DC2E370C24573ACB00B94699 /* 04-HigherOrderReducers-StrictReducers.swift */,
423+
DCFE195F278DBF0600C14CCF /* CaseStudiesApp.swift */,
423424
CA5ECF91267A79F0002067FF /* FactClient.swift */,
424-
DC89C41824460F95006900B9 /* SceneDelegate.swift */,
425425
DC89C41C24460F96006900B9 /* Assets.xcassets */,
426426
CA6AC25F2451131C00C71CB3 /* 04-HigherOrderReducers-ResuableOfflineDownloads */,
427427
DC89C44524461416006900B9 /* Internal */,
@@ -752,9 +752,9 @@
752752
DC2E370D24573ACB00B94699 /* 04-HigherOrderReducers-StrictReducers.swift in Sources */,
753753
CA5ECF92267A79F0002067FF /* FactClient.swift in Sources */,
754754
DC9EB4172450CBD2005F413B /* UIViewRepresented.swift in Sources */,
755-
DC89C41924460F95006900B9 /* SceneDelegate.swift in Sources */,
756755
CA6AC2652451135C00C71CB3 /* CircularProgressView.swift in Sources */,
757756
CA6AC2642451135C00C71CB3 /* ReusableComponents-Download.swift in Sources */,
757+
DCFE1960278DBF0600C14CCF /* CaseStudiesApp.swift in Sources */,
758758
CA6AC2662451135C00C71CB3 /* DownloadComponent.swift in Sources */,
759759
CA3E4C5B24B4FA0E00447C0B /* 04-HigherOrderReducers-Lifecycle.swift in Sources */,
760760
DC5B505125C86EBC000D8DFD /* 01-GettingStarted-Bindings-Forms.swift in Sources */,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import SwiftUI
2+
3+
@main
4+
struct CaseStudiesApp: App {
5+
var body: some Scene {
6+
WindowGroup {
7+
RootView(
8+
store: .init(
9+
initialState: RootState(),
10+
reducer: rootReducer,
11+
environment: .live
12+
)
13+
)
14+
}
15+
}
16+
}

Examples/CaseStudies/SwiftUICaseStudies/Info.plist

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23-
<key>UIApplicationSceneManifest</key>
24-
<dict>
25-
<key>UIApplicationSupportsMultipleScenes</key>
26-
<false/>
27-
<key>UISceneConfigurations</key>
28-
<dict>
29-
<key>UIWindowSceneSessionRoleApplication</key>
30-
<array>
31-
<dict>
32-
<key>UISceneConfigurationName</key>
33-
<string>Default Configuration</string>
34-
<key>UISceneDelegateClassName</key>
35-
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
36-
</dict>
37-
</array>
38-
</dict>
39-
</dict>
4023
<key>UILaunchStoryboardName</key>
4124
<string>LaunchScreen</string>
4225
<key>NSAppTransportSecurity</key>

Examples/CaseStudies/SwiftUICaseStudies/SceneDelegate.swift

Lines changed: 0 additions & 34 deletions
This file was deleted.

Examples/Search/Search.xcodeproj/project.pbxproj

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
CA86E49C24253C2500357AD9 /* SearchApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchApp.swift; sourceTree = "<group>"; };
5555
CA86E49E24253C2500357AD9 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = "<group>"; };
5656
CA86E4A024253C2700357AD9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
57-
CA86E4A824253C2700357AD9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5857
CA86E4AD24253C2700357AD9 /* SearchTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SearchTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5958
CA86E4B124253C2700357AD9 /* SearchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTests.swift; sourceTree = "<group>"; };
6059
DC85B4A7242D07A6009784B0 /* swift-composable-architecture */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "swift-composable-architecture"; path = ../..; sourceTree = "<group>"; };
@@ -103,7 +102,6 @@
103102
CA86E49924253C2500357AD9 /* Search */ = {
104103
isa = PBXGroup;
105104
children = (
106-
CA86E4A824253C2700357AD9 /* Info.plist */,
107105
CA86E49C24253C2500357AD9 /* SearchApp.swift */,
108106
CA86E49E24253C2500357AD9 /* SearchView.swift */,
109107
CA66690A242547B000A639B3 /* WeatherClient.swift */,
@@ -372,12 +370,19 @@
372370
buildSettings = {
373371
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
374372
CODE_SIGN_STYLE = Automatic;
373+
CURRENT_PROJECT_VERSION = 1;
375374
ENABLE_PREVIEWS = YES;
376-
INFOPLIST_FILE = Search/Info.plist;
375+
GENERATE_INFOPLIST_FILE = YES;
376+
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
377+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
378+
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
379+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
380+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
377381
LD_RUNPATH_SEARCH_PATHS = (
378382
"$(inherited)",
379383
"@executable_path/Frameworks",
380384
);
385+
MARKETING_VERSION = 1.0;
381386
PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.Search;
382387
PRODUCT_NAME = "$(TARGET_NAME)";
383388
SWIFT_VERSION = 5.0;
@@ -390,12 +395,19 @@
390395
buildSettings = {
391396
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
392397
CODE_SIGN_STYLE = Automatic;
398+
CURRENT_PROJECT_VERSION = 1;
393399
ENABLE_PREVIEWS = YES;
394-
INFOPLIST_FILE = Search/Info.plist;
400+
GENERATE_INFOPLIST_FILE = YES;
401+
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
402+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
403+
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
404+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
405+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
395406
LD_RUNPATH_SEARCH_PATHS = (
396407
"$(inherited)",
397408
"@executable_path/Frameworks",
398409
);
410+
MARKETING_VERSION = 1.0;
399411
PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.Search;
400412
PRODUCT_NAME = "$(TARGET_NAME)";
401413
SWIFT_VERSION = 5.0;
@@ -409,12 +421,14 @@
409421
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
410422
BUNDLE_LOADER = "$(TEST_HOST)";
411423
CODE_SIGN_STYLE = Automatic;
412-
INFOPLIST_FILE = Search/Info.plist;
424+
CURRENT_PROJECT_VERSION = 1;
425+
GENERATE_INFOPLIST_FILE = YES;
413426
LD_RUNPATH_SEARCH_PATHS = (
414427
"$(inherited)",
415428
"@executable_path/Frameworks",
416429
"@loader_path/Frameworks",
417430
);
431+
MARKETING_VERSION = 1.0;
418432
PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.SearchTests;
419433
PRODUCT_NAME = "$(TARGET_NAME)";
420434
SWIFT_VERSION = 5.0;
@@ -429,12 +443,14 @@
429443
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
430444
BUNDLE_LOADER = "$(TEST_HOST)";
431445
CODE_SIGN_STYLE = Automatic;
432-
INFOPLIST_FILE = Search/Info.plist;
446+
CURRENT_PROJECT_VERSION = 1;
447+
GENERATE_INFOPLIST_FILE = YES;
433448
LD_RUNPATH_SEARCH_PATHS = (
434449
"$(inherited)",
435450
"@executable_path/Frameworks",
436451
"@loader_path/Frameworks",
437452
);
453+
MARKETING_VERSION = 1.0;
438454
PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.SearchTests;
439455
PRODUCT_NAME = "$(TARGET_NAME)";
440456
SWIFT_VERSION = 5.0;

Examples/Search/Search/Info.plist

Lines changed: 0 additions & 60 deletions
This file was deleted.

Examples/TicTacToe/App/Info.plist

Lines changed: 0 additions & 48 deletions
This file was deleted.

Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,19 @@
155155
buildSettings = {
156156
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
157157
CODE_SIGN_STYLE = Automatic;
158+
CURRENT_PROJECT_VERSION = 1;
158159
ENABLE_PREVIEWS = YES;
159-
INFOPLIST_FILE = App/Info.plist;
160+
GENERATE_INFOPLIST_FILE = YES;
161+
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
162+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
163+
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
164+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
165+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
160166
LD_RUNPATH_SEARCH_PATHS = (
161167
"$(inherited)",
162168
"@executable_path/Frameworks",
163169
);
170+
MARKETING_VERSION = 1.0;
164171
PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.TicTacToe;
165172
PRODUCT_NAME = "$(TARGET_NAME)";
166173
SWIFT_VERSION = 5.0;
@@ -173,12 +180,19 @@
173180
buildSettings = {
174181
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
175182
CODE_SIGN_STYLE = Automatic;
183+
CURRENT_PROJECT_VERSION = 1;
176184
ENABLE_PREVIEWS = YES;
177-
INFOPLIST_FILE = App/Info.plist;
185+
GENERATE_INFOPLIST_FILE = YES;
186+
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
187+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
188+
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
189+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
190+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
178191
LD_RUNPATH_SEARCH_PATHS = (
179192
"$(inherited)",
180193
"@executable_path/Frameworks",
181194
);
195+
MARKETING_VERSION = 1.0;
182196
PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.TicTacToe;
183197
PRODUCT_NAME = "$(TARGET_NAME)";
184198
SWIFT_VERSION = 5.0;

0 commit comments

Comments
 (0)