Skip to content

Commit 2e0ca3b

Browse files
authored
[3.14] gh-158051: Update testbed to support Xcode 27 (GH-158052) (#158061)
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 6b280a1 commit 2e0ca3b

6 files changed

Lines changed: 64 additions & 9 deletions

File tree

‎Apple/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 */; };
@@ -59,6 +60,8 @@
5960
607A66122B0EFA380010BFC8 /* iOSTestbed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSTestbed.app; sourceTree = BUILT_PRODUCTS_DIR; };
6061
607A66152B0EFA380010BFC8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
6162
607A66162B0EFA380010BFC8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
63+
83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
64+
D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
6265
607A66212B0EFA390010BFC8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
6366
607A66242B0EFA390010BFC8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6467
607A66272B0EFA390010BFC8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -120,6 +123,8 @@
120123
607A66592B0F08600010BFC8 /* iOSTestbed-Info.plist */,
121124
607A66152B0EFA380010BFC8 /* AppDelegate.h */,
122125
607A66162B0EFA380010BFC8 /* AppDelegate.m */,
126+
83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */,
127+
D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */,
123128
607A66212B0EFA390010BFC8 /* Assets.xcassets */,
124129
607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */,
125130
607A66272B0EFA390010BFC8 /* main.m */,
@@ -270,6 +275,7 @@
270275
buildActionMask = 2147483647;
271276
files = (
272277
607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */,
278+
71CB095279CCE565BAFB69C3 /* SceneDelegate.m in Sources */,
273279
607A66282B0EFA390010BFC8 /* main.m in Sources */,
274280
);
275281
runOnlyForDeploymentPostprocessing = 0;
@@ -356,7 +362,7 @@
356362
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
357363
GCC_WARN_UNUSED_FUNCTION = YES;
358364
GCC_WARN_UNUSED_VARIABLE = YES;
359-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
365+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
360366
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
361367
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
362368
MTL_FAST_MATH = YES;
@@ -411,7 +417,7 @@
411417
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
412418
GCC_WARN_UNUSED_FUNCTION = YES;
413419
GCC_WARN_UNUSED_VARIABLE = YES;
414-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
420+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
415421
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
416422
MTL_ENABLE_DEBUG_INFO = NO;
417423
MTL_FAST_MATH = YES;
@@ -437,7 +443,7 @@
437443
INFOPLIST_KEY_UIMainStoryboardFile = Main;
438444
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
439445
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
440-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
446+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
441447
LD_RUNPATH_SEARCH_PATHS = (
442448
"$(inherited)",
443449
"@executable_path/Frameworks",
@@ -468,7 +474,7 @@
468474
INFOPLIST_KEY_UIMainStoryboardFile = Main;
469475
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
470476
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
471-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
477+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
472478
LD_RUNPATH_SEARCH_PATHS = (
473479
"$(inherited)",
474480
"@executable_path/Frameworks",
@@ -491,7 +497,7 @@
491497
DEVELOPMENT_TEAM = 3HEZE76D99;
492498
GENERATE_INFOPLIST_FILE = YES;
493499
HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"";
494-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
500+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
495501
MARKETING_VERSION = 1.0;
496502
PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbedTests;
497503
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -511,7 +517,7 @@
511517
DEVELOPMENT_TEAM = 3HEZE76D99;
512518
GENERATE_INFOPLIST_FILE = YES;
513519
HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"";
514-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
520+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
515521
MARKETING_VERSION = 1.0;
516522
PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbedTests;
517523
PRODUCT_NAME = "$(TARGET_NAME)";

‎Apple/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

‎Apple/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>
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.

0 commit comments

Comments
 (0)