使用xcode12开发的时候,建项目的时候,带了SenceDelegate文件,这个文件必须是ios13以后才能使用。我想开发ios9/ios10能用的应用。所以必须删除SenceDelegate。
方法如下:
1、删除SenceDelegate.h,SenceDelegate.m。
2、删除info.list里的Application Scene Manifest。
3、删除AppDelegate.m里的Sence相关代码
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
4、在AppDelegate.h里增加window
@property(nonatomic, strong) UIWindow * window;