Skip to content

Commit 7e3bfb8

Browse files
authored
[3.13] gh-158051: Update testbed to support Xcode 27 (GH-158052) (#158062)
Modify testbed to target iOS 15 as a minimum, and use a UIScene lifecycle. These changes are required by Xcode 27, but are backwards compatible to at least Xcode 16. (cherry picked from commit daacd2d)
1 parent ae14eeb commit 7e3bfb8

6 files changed

Lines changed: 64 additions & 9 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The iOS testbed has been updated for compatibilty with Xcode 27.

‎iOS/testbed/iOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66162B0EFA380010BFC8 /* AppDelegate.m */; };
11+
71CB095279CCE565BAFB69C3 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */; };
1112
607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607A66212B0EFA390010BFC8 /* Assets.xcassets */; };
1213
607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */; };
1314
607A66282B0EFA390010BFC8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66272B0EFA390010BFC8 /* main.m */; };
@@ -60,6 +61,8 @@
6061
607A66122B0EFA380010BFC8 /* iOSTestbed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSTestbed.app; sourceTree = BUILT_PRODUCTS_DIR; };
6162
607A66152B0EFA380010BFC8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
6263
607A66162B0EFA380010BFC8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
64+
83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
65+
D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
6366
607A66212B0EFA390010BFC8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
6467
607A66242B0EFA390010BFC8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6568
607A66272B0EFA390010BFC8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -123,6 +126,8 @@
123126
607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */,
124127
607A66152B0EFA380010BFC8 /* AppDelegate.h */,
125128
607A66162B0EFA380010BFC8 /* AppDelegate.m */,
129+
83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */,
130+
D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */,
126131
607A66212B0EFA390010BFC8 /* Assets.xcassets */,
127132
607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */,
128133
607A66272B0EFA390010BFC8 /* main.m */,
@@ -295,6 +300,7 @@
295300
buildActionMask = 2147483647;
296301
files = (
297302
607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */,
303+
71CB095279CCE565BAFB69C3 /* SceneDelegate.m in Sources */,
298304
607A66282B0EFA390010BFC8 /* main.m in Sources */,
299305
);
300306
runOnlyForDeploymentPostprocessing = 0;
@@ -381,7 +387,7 @@
381387
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
382388
GCC_WARN_UNUSED_FUNCTION = YES;
383389
GCC_WARN_UNUSED_VARIABLE = YES;
384-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
390+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
385391
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
386392
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
387393
MTL_FAST_MATH = YES;
@@ -436,7 +442,7 @@
436442
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
437443
GCC_WARN_UNUSED_FUNCTION = YES;
438444
GCC_WARN_UNUSED_VARIABLE = YES;
439-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
445+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
440446
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
441447
MTL_ENABLE_DEBUG_INFO = NO;
442448
MTL_FAST_MATH = YES;
@@ -462,7 +468,7 @@
462468
INFOPLIST_KEY_UIMainStoryboardFile = Main;
463469
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
464470
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
465-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
471+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
466472
LD_RUNPATH_SEARCH_PATHS = (
467473
"$(inherited)",
468474
"@executable_path/Frameworks",
@@ -493,7 +499,7 @@
493499
INFOPLIST_KEY_UIMainStoryboardFile = Main;
494500
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
495501
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
496-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
502+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
497503
LD_RUNPATH_SEARCH_PATHS = (
498504
"$(inherited)",
499505
"@executable_path/Frameworks",
@@ -516,7 +522,7 @@
516522
DEVELOPMENT_TEAM = 3HEZE76D99;
517523
GENERATE_INFOPLIST_FILE = YES;
518524
HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"";
519-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
525+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
520526
MARKETING_VERSION = 1.0;
521527
PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbedTests;
522528
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -536,7 +542,7 @@
536542
DEVELOPMENT_TEAM = 3HEZE76D99;
537543
GENERATE_INFOPLIST_FILE = YES;
538544
HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"";
539-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
545+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
540546
MARKETING_VERSION = 1.0;
541547
PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbedTests;
542548
PRODUCT_NAME = "$(TARGET_NAME)";

‎iOS/testbed/iOSTestbed/AppDelegate.m‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
//
55

66
#import "AppDelegate.h"
7+
#import "SceneDelegate.h"
78

89
@interface AppDelegate ()
910

1011
@end
1112

1213
@implementation AppDelegate
1314

15+
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
16+
UISceneConfiguration *configuration = [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
17+
configuration.delegateClass = [SceneDelegate class];
18+
return configuration;
19+
}
1420

15-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
16-
return YES;
21+
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
1722
}
1823

1924
@end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// SceneDelegate.h
3+
// iOSTestbed
4+
//
5+
6+
#import <UIKit/UIKit.h>
7+
8+
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
9+
10+
@property (strong, nonatomic) UIWindow *window;
11+
12+
@end
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// SceneDelegate.m
3+
// iOSTestbed
4+
//
5+
6+
#import "SceneDelegate.h"
7+
8+
@interface SceneDelegate ()
9+
10+
@end
11+
12+
@implementation SceneDelegate
13+
14+
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
15+
UIWindowScene *windowScene = (UIWindowScene *)scene;
16+
self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
17+
self.window.rootViewController = [[UIViewController alloc] init];
18+
[self.window makeKeyAndVisible];
19+
}
20+
21+
@end

‎iOS/testbed/iOSTestbed/iOSTestbed-Info.plist‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,17 @@
4646
<key>UIApplicationSupportsMultipleScenes</key>
4747
<false/>
4848
<key>UISceneConfigurations</key>
49-
<dict/>
49+
<dict>
50+
<key>UIWindowSceneSessionRoleApplication</key>
51+
<array>
52+
<dict>
53+
<key>UISceneConfigurationName</key>
54+
<string>Default Configuration</string>
55+
<key>UISceneDelegateClassName</key>
56+
<string>SceneDelegate</string>
57+
</dict>
58+
</array>
59+
</dict>
5060
</dict>
5161
</dict>
5262
</plist>

0 commit comments

Comments
 (0)