還原Xcode11版本之前的項(xiàng)目工程配置:
Signing & Capabilities 選擇可以配置Bundle Identifier 和 Team
1.刪除工程根目錄下的SceneDelegate(.h和.m)文件
2. AppDelegate.h中添加 window屬性
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow * window;
@end
3.?AppDelegate.m 中添加application生命周期函數(shù)
- (void)applicationWillResignActive:(UIApplication *)application {
? ? // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
? ? // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
? ? // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
? ? // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
? ? // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
? ? // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
? ? // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
4.刪除info.plist文件中的?Application Scene Manifest?
5.修改main.m中的main函數(shù)代碼
int main(int argc,char* argv[]) {
? ? @autoreleasepool {
? ? ? ? return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
? ? }
}