├── AppStart ├── bj.png ├── movie.mp4 ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── ViewController.h ├── AppDelegate.h ├── main.m ├── ViewController.m ├── ZHMoviePlayerController.h ├── Info.plist ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── AppDelegate.m └── ZHMoviePlayerController.m ├── AppStart.xcodeproj ├── project.xcworkspace │ ├── xcuserdata │ │ └── zh.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── zh.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── README.md ├── AppStartTests ├── Info.plist └── AppStartTests.m └── AppStartUITests ├── Info.plist └── AppStartUITests.m /AppStart/bj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZHHalsey/AppStart/HEAD/AppStart/bj.png -------------------------------------------------------------------------------- /AppStart/movie.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZHHalsey/AppStart/HEAD/AppStart/movie.mp4 -------------------------------------------------------------------------------- /AppStart/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AppStart.xcodeproj/project.xcworkspace/xcuserdata/zh.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZHHalsey/AppStart/HEAD/AppStart.xcodeproj/project.xcworkspace/xcuserdata/zh.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AppStart.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppStart/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AppStart.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppStart 2 | 一行代码实现App启动页加载(包括网络视频, 本地视频, 网络图片, 本地图片) 3 | 4 | 5 | 使用方法 > 6 | 7 | 导入写好的类ZHMoviePlayerController, 创建一个对象, 然后根据项目需求调用demo中的两个对象方法(分加载视频跟加载图片,可以是网络的也可以是本地的) 8 | 9 | 这里展示的demo没加缓存, 我自己做的项目中加了缓存了,提供下思路在这里: 10 | 加缓存的话, 写入沙盒, 设置一个userdefault, 启动的时候先去沙盒找, 如果沙盒有的话就加载沙盒的, 沙盒没有的话就加载网络的, 然后把需要加载的启动页写入沙盒就行 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AppStart/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AppStart/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AppStart/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | } 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /AppStart.xcodeproj/xcuserdata/zh.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AppStart.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | AppStart.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AppStart/ZHMoviePlayerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHMoviePlayerController.h 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ZHMoviePlayerController : ViewController 12 | 13 | /** 14 | * @param movieURL 网上url视频 15 | * @param localMovieName 本地视频 16 | */ 17 | - (void)setMoviePlayerInIndexWithURL:(NSURL *)movieURL localMovieName:(NSString *)localMovieName; 18 | 19 | /** 20 | * @param imageURL 网上url图片 21 | * @param localImageName 本地图片 22 | * @param timeCount 倒计时时间 23 | */ 24 | 25 | - (void)setImageInIndexWithURL:(NSURL *)imageURL localImageName:(NSString *)localImageName timeCount:(int)timeCount; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /AppStartTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AppStartUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AppStartTests/AppStartTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppStartTests.m 3 | // AppStartTests 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppStartTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AppStartTests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | } 20 | 21 | - (void)tearDown { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | - (void)testExample { 26 | // This is an example of a functional test case. 27 | // Use XCTAssert and related functions to verify your tests produce the correct results. 28 | } 29 | 30 | - (void)testPerformanceExample { 31 | // This is an example of a performance test case. 32 | [self measureBlock:^{ 33 | // Put the code you want to measure the time of here. 34 | }]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /AppStartUITests/AppStartUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppStartUITests.m 3 | // AppStartUITests 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppStartUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AppStartUITests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | 20 | // In UI tests it is usually best to stop immediately when a failure occurs. 21 | self.continueAfterFailure = NO; 22 | 23 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 24 | [[[XCUIApplication alloc] init] launch]; 25 | 26 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 27 | } 28 | 29 | - (void)tearDown { 30 | // Put teardown code here. This method is called after the invocation of each test method in the class. 31 | } 32 | 33 | - (void)testExample { 34 | // Use recording to get started writing UI tests. 35 | // Use XCTAssert and related functions to verify your tests produce the correct results. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /AppStart/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AppStart/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AppStart/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AppStart/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /AppStart/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ZHMoviePlayerController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | 21 | // 这是图片还有视频的url链接 22 | NSString *getUrlStr = @"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"; // 网络视频 23 | // NSString *getUrlStr = @"http://fimg.yucuizhubao.com/img/start.png"; // 网络图片 24 | 25 | NSLog(@"后缀是--%@", [getUrlStr substringFromIndex:[getUrlStr length] - 4]); 26 | ZHMoviePlayerController *ZHVC = [[ZHMoviePlayerController alloc]init]; 27 | 28 | if ([[getUrlStr substringFromIndex:[getUrlStr length] - 4] isEqualToString:@".mp4"] ) { 29 | NSLog(@"加载的是视频"); 30 | // [ZHVC setMoviePlayerInIndexWithURL:[NSURL URLWithString:getUrlStr] localMovieName:nil]; // 加载网络url视频 31 | [ZHVC setMoviePlayerInIndexWithURL:nil localMovieName:@"movie.mp4"]; // 加载本地视频 32 | self.window.rootViewController = ZHVC; 33 | 34 | }else if ([[getUrlStr substringFromIndex:[getUrlStr length] - 4] isEqualToString:@".png"]){ 35 | NSLog(@"加载的是图片"); 36 | // [ZHVC setImageInIndexWithURL:[NSURL URLWithString:getUrlStr] localImageName:nil timeCount:4];// 加载网络图片 37 | [ZHVC setImageInIndexWithURL:nil localImageName:@"bj.png" timeCount:4]; // 加载本地图片 38 | self.window.rootViewController = ZHVC; 39 | } 40 | return YES; 41 | } 42 | 43 | 44 | - (void)applicationWillResignActive:(UIApplication *)application { 45 | // 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. 46 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 47 | } 48 | 49 | 50 | - (void)applicationDidEnterBackground:(UIApplication *)application { 51 | // 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. 52 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 53 | } 54 | 55 | 56 | - (void)applicationWillEnterForeground:(UIApplication *)application { 57 | // 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. 58 | } 59 | 60 | 61 | - (void)applicationDidBecomeActive:(UIApplication *)application { 62 | // 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. 63 | } 64 | 65 | 66 | - (void)applicationWillTerminate:(UIApplication *)application { 67 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 68 | } 69 | 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /AppStart/ZHMoviePlayerController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHMoviePlayerController.m 3 | // AppStart 4 | // 5 | // Created by 张豪 on 2018/4/25. 6 | // Copyright © 2018年 张豪. All rights reserved. 7 | // 8 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height 9 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width 10 | 11 | 12 | #import "ZHMoviePlayerController.h" 13 | #import 14 | #import 15 | #import "ViewController.h" 16 | 17 | @interface ZHMoviePlayerController () 18 | 19 | @property (nonatomic, strong)AVPlayerViewController *AVPlayer; 20 | @property (nonatomic, strong)UIButton *enterMainButton; 21 | @property (nonatomic, assign) int timeCount; 22 | @property (nonatomic, weak)NSTimer *timer; 23 | @property (nonatomic, weak)NSTimer *timer1; 24 | 25 | 26 | @end 27 | 28 | @implementation ZHMoviePlayerController 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | self.view.backgroundColor = [UIColor orangeColor]; 33 | } 34 | 35 | - (void)setMoviePlayerInIndexWithURL:(NSURL *)movieURL localMovieName:(NSString *)localMovieName 36 | { 37 | self.AVPlayer = [[AVPlayerViewController alloc]init]; 38 | // 取消多分屏功能 39 | self.AVPlayer.allowsPictureInPicturePlayback = NO; 40 | self.AVPlayer.showsPlaybackControls = false; 41 | AVPlayerItem *item; 42 | if (movieURL) { 43 | NSLog(@"传入了网络视频url过来"); 44 | item = [[AVPlayerItem alloc]initWithURL:movieURL]; 45 | }else if (localMovieName) { 46 | NSLog(@"加载的是本地的视频"); 47 | NSString *path = [[NSBundle mainBundle] pathForResource:@"movie.mp4" ofType:nil]; 48 | NSLog(@"path---%@", path); 49 | item = [[AVPlayerItem alloc]initWithURL:[NSURL fileURLWithPath:path]]; 50 | } 51 | AVPlayer *player = [AVPlayer playerWithPlayerItem:item]; 52 | // layer 53 | AVPlayerLayer *layer = [AVPlayerLayer playerLayerWithPlayer:player]; 54 | [layer setFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 55 | // 填充模式 56 | // layer.videoGravity = AVLayerVideoGravityResizeAspect; // 保持视频的纵横比 57 | layer.videoGravity = AVLayerVideoGravityResize; // 填充整个屏幕 58 | self.AVPlayer.player = player; 59 | [self.view.layer addSublayer:layer]; 60 | [self.AVPlayer.player play]; 61 | 62 | // 重复播放。 63 | [[NSNotificationCenter defaultCenter] addObserver:self 64 | selector:@selector(playDidEnd:) 65 | name:AVPlayerItemDidPlayToEndTimeNotification 66 | object:item]; 67 | // [self createLoginBtn]; // 3秒后自动就停止(这里自行选择) 68 | [self createLoginBtn1]; // 不点的话 就一直播放视频 69 | 70 | } 71 | 72 | - (void)setImageInIndexWithURL:(NSURL *)imageURL localImageName:(NSString *)localImageName timeCount:(int)timeCount{ 73 | 74 | _timeCount = timeCount; 75 | // http://fimg.yucuizhubao.com/img/start.png 76 | UIImageView *imagev1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 77 | if (imageURL) { 78 | NSLog(@"加载的是网络上的图片"); 79 | NSData *data = [NSData dataWithContentsOfURL:imageURL]; 80 | UIImage *image1 = [UIImage imageWithData:data]; 81 | imagev1.image = image1; 82 | 83 | } 84 | if (localImageName) { 85 | NSLog(@"加载的是本地的图片"); 86 | UIImage *image = [UIImage imageNamed:@"bj.png"]; 87 | imagev1.image = image; 88 | } 89 | 90 | [self.view addSubview:imagev1]; 91 | [self createLoginBtn]; 92 | } 93 | 94 | // 播放完成代理 95 | - (void)playDidEnd:(NSNotification *)Notification{ 96 | // 重新播放 97 | [self.AVPlayer.player seekToTime:CMTimeMake(0, 1)]; 98 | [self.AVPlayer.player play]; 99 | } 100 | 101 | // 用户不用点击, 几秒后自动进入程序 102 | - (void)createLoginBtn 103 | { 104 | // 进入按钮 105 | _enterMainButton = [[UIButton alloc] init]; 106 | _enterMainButton.frame = CGRectMake(SCREEN_WIDTH - 90, 50, 60, 30); 107 | _enterMainButton.backgroundColor = [UIColor grayColor]; 108 | _enterMainButton.titleLabel.font = [UIFont systemFontOfSize:12]; 109 | _enterMainButton.layer.cornerRadius = 15; 110 | NSString *title = [NSString stringWithFormat:@"跳过 %d", _timeCount]; 111 | [_enterMainButton setTitle:title forState:UIControlStateNormal]; 112 | _timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(DaoJiShi) userInfo:nil repeats:YES]; 113 | [self.view addSubview:_enterMainButton]; 114 | [_enterMainButton addTarget:self action:@selector(enterMainAction) forControlEvents:UIControlEventTouchUpInside]; 115 | } 116 | // 倒计时 117 | - (void)DaoJiShi{ 118 | if (_timeCount > 0) { 119 | _timeCount -= 1; 120 | NSString *title = [NSString stringWithFormat:@"跳过 %d", _timeCount]; 121 | [_enterMainButton setTitle:title forState:UIControlStateNormal]; 122 | }else{ 123 | [_timer invalidate]; 124 | _timer = nil; 125 | [self enterMainAction]; 126 | } 127 | } 128 | 129 | // 不会自动停止, 需要用户点击按钮才能进入应用 130 | - (void)createLoginBtn1{ // 这里的时间是3秒后视频页面出现按钮 131 | _timer1 = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(showClickBtn) userInfo:nil repeats:YES]; 132 | } 133 | - (void)showClickBtn{ 134 | NSLog(@"显示进入应用按钮"); 135 | UIButton *btn = [[UIButton alloc] init]; 136 | btn.frame = CGRectMake(30, SCREEN_HEIGHT - 100, SCREEN_WIDTH - 60, 40); 137 | btn.backgroundColor = [UIColor redColor]; 138 | btn.layer.cornerRadius = 20; 139 | btn.alpha = 0.5; 140 | [btn setTitle:@"进入应用" forState:UIControlStateNormal]; 141 | [self.view addSubview:btn]; 142 | [btn addTarget:self action:@selector(enterMainAction) forControlEvents:UIControlEventTouchUpInside]; 143 | [_timer1 invalidate]; 144 | _timer1 = nil;// timer置为nil 145 | 146 | } 147 | - (void)enterMainAction{ 148 | NSLog(@"点击了进入应用按钮"); 149 | ViewController *vc = [[ViewController alloc]init]; 150 | self.view.window.rootViewController = vc; 151 | [self.AVPlayer.player pause]; 152 | } 153 | @end 154 | -------------------------------------------------------------------------------- /AppStart.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 47; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F94F1C8B2186F2B300D4170F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F94F1C8A2186F2B300D4170F /* AppDelegate.m */; }; 11 | F94F1C8E2186F2B400D4170F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F94F1C8D2186F2B400D4170F /* ViewController.m */; }; 12 | F94F1C912186F2B400D4170F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F94F1C8F2186F2B400D4170F /* Main.storyboard */; }; 13 | F94F1C932186F2B500D4170F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F94F1C922186F2B500D4170F /* Assets.xcassets */; }; 14 | F94F1C962186F2B500D4170F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F94F1C942186F2B500D4170F /* LaunchScreen.storyboard */; }; 15 | F94F1C992186F2B500D4170F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F94F1C982186F2B500D4170F /* main.m */; }; 16 | F94F1CA32186F2B500D4170F /* AppStartTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F94F1CA22186F2B500D4170F /* AppStartTests.m */; }; 17 | F94F1CAE2186F2B500D4170F /* AppStartUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F94F1CAD2186F2B500D4170F /* AppStartUITests.m */; }; 18 | F94F1CBC2186F2DB00D4170F /* movie.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = F94F1CBB2186F2DB00D4170F /* movie.mp4 */; }; 19 | F94F1CBE2186F2E300D4170F /* bj.png in Resources */ = {isa = PBXBuildFile; fileRef = F94F1CBD2186F2E300D4170F /* bj.png */; }; 20 | F94F1CC12186F2ED00D4170F /* ZHMoviePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = F94F1CBF2186F2ED00D4170F /* ZHMoviePlayerController.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | F94F1C9F2186F2B500D4170F /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = F94F1C7E2186F2B300D4170F /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = F94F1C852186F2B300D4170F; 29 | remoteInfo = AppStart; 30 | }; 31 | F94F1CAA2186F2B500D4170F /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = F94F1C7E2186F2B300D4170F /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = F94F1C852186F2B300D4170F; 36 | remoteInfo = AppStart; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | F94F1C862186F2B300D4170F /* AppStart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppStart.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | F94F1C892186F2B300D4170F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 43 | F94F1C8A2186F2B300D4170F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 44 | F94F1C8C2186F2B300D4170F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 45 | F94F1C8D2186F2B400D4170F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 46 | F94F1C902186F2B400D4170F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | F94F1C922186F2B500D4170F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | F94F1C952186F2B500D4170F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 49 | F94F1C972186F2B500D4170F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | F94F1C982186F2B500D4170F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | F94F1C9E2186F2B500D4170F /* AppStartTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppStartTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | F94F1CA22186F2B500D4170F /* AppStartTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppStartTests.m; sourceTree = ""; }; 53 | F94F1CA42186F2B500D4170F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | F94F1CA92186F2B500D4170F /* AppStartUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppStartUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | F94F1CAD2186F2B500D4170F /* AppStartUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppStartUITests.m; sourceTree = ""; }; 56 | F94F1CAF2186F2B500D4170F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | F94F1CBB2186F2DB00D4170F /* movie.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = movie.mp4; sourceTree = ""; }; 58 | F94F1CBD2186F2E300D4170F /* bj.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bj.png; sourceTree = ""; }; 59 | F94F1CBF2186F2ED00D4170F /* ZHMoviePlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZHMoviePlayerController.m; sourceTree = ""; }; 60 | F94F1CC02186F2ED00D4170F /* ZHMoviePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZHMoviePlayerController.h; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | F94F1C832186F2B300D4170F /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | F94F1C9B2186F2B500D4170F /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | F94F1CA62186F2B500D4170F /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXFrameworksBuildPhase section */ 86 | 87 | /* Begin PBXGroup section */ 88 | F94F1C7D2186F2B300D4170F = { 89 | isa = PBXGroup; 90 | children = ( 91 | F94F1C882186F2B300D4170F /* AppStart */, 92 | F94F1CA12186F2B500D4170F /* AppStartTests */, 93 | F94F1CAC2186F2B500D4170F /* AppStartUITests */, 94 | F94F1C872186F2B300D4170F /* Products */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | F94F1C872186F2B300D4170F /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | F94F1C862186F2B300D4170F /* AppStart.app */, 102 | F94F1C9E2186F2B500D4170F /* AppStartTests.xctest */, 103 | F94F1CA92186F2B500D4170F /* AppStartUITests.xctest */, 104 | ); 105 | name = Products; 106 | sourceTree = ""; 107 | }; 108 | F94F1C882186F2B300D4170F /* AppStart */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | F94F1CBB2186F2DB00D4170F /* movie.mp4 */, 112 | F94F1CBD2186F2E300D4170F /* bj.png */, 113 | F94F1C892186F2B300D4170F /* AppDelegate.h */, 114 | F94F1C8A2186F2B300D4170F /* AppDelegate.m */, 115 | F94F1C8C2186F2B300D4170F /* ViewController.h */, 116 | F94F1C8D2186F2B400D4170F /* ViewController.m */, 117 | F94F1CC02186F2ED00D4170F /* ZHMoviePlayerController.h */, 118 | F94F1CBF2186F2ED00D4170F /* ZHMoviePlayerController.m */, 119 | F94F1C8F2186F2B400D4170F /* Main.storyboard */, 120 | F94F1C922186F2B500D4170F /* Assets.xcassets */, 121 | F94F1C942186F2B500D4170F /* LaunchScreen.storyboard */, 122 | F94F1C972186F2B500D4170F /* Info.plist */, 123 | F94F1C982186F2B500D4170F /* main.m */, 124 | ); 125 | path = AppStart; 126 | sourceTree = ""; 127 | }; 128 | F94F1CA12186F2B500D4170F /* AppStartTests */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | F94F1CA22186F2B500D4170F /* AppStartTests.m */, 132 | F94F1CA42186F2B500D4170F /* Info.plist */, 133 | ); 134 | path = AppStartTests; 135 | sourceTree = ""; 136 | }; 137 | F94F1CAC2186F2B500D4170F /* AppStartUITests */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | F94F1CAD2186F2B500D4170F /* AppStartUITests.m */, 141 | F94F1CAF2186F2B500D4170F /* Info.plist */, 142 | ); 143 | path = AppStartUITests; 144 | sourceTree = ""; 145 | }; 146 | /* End PBXGroup section */ 147 | 148 | /* Begin PBXNativeTarget section */ 149 | F94F1C852186F2B300D4170F /* AppStart */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = F94F1CB22186F2B500D4170F /* Build configuration list for PBXNativeTarget "AppStart" */; 152 | buildPhases = ( 153 | F94F1C822186F2B300D4170F /* Sources */, 154 | F94F1C832186F2B300D4170F /* Frameworks */, 155 | F94F1C842186F2B300D4170F /* Resources */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | ); 161 | name = AppStart; 162 | productName = AppStart; 163 | productReference = F94F1C862186F2B300D4170F /* AppStart.app */; 164 | productType = "com.apple.product-type.application"; 165 | }; 166 | F94F1C9D2186F2B500D4170F /* AppStartTests */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = F94F1CB52186F2B500D4170F /* Build configuration list for PBXNativeTarget "AppStartTests" */; 169 | buildPhases = ( 170 | F94F1C9A2186F2B500D4170F /* Sources */, 171 | F94F1C9B2186F2B500D4170F /* Frameworks */, 172 | F94F1C9C2186F2B500D4170F /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | F94F1CA02186F2B500D4170F /* PBXTargetDependency */, 178 | ); 179 | name = AppStartTests; 180 | productName = AppStartTests; 181 | productReference = F94F1C9E2186F2B500D4170F /* AppStartTests.xctest */; 182 | productType = "com.apple.product-type.bundle.unit-test"; 183 | }; 184 | F94F1CA82186F2B500D4170F /* AppStartUITests */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = F94F1CB82186F2B500D4170F /* Build configuration list for PBXNativeTarget "AppStartUITests" */; 187 | buildPhases = ( 188 | F94F1CA52186F2B500D4170F /* Sources */, 189 | F94F1CA62186F2B500D4170F /* Frameworks */, 190 | F94F1CA72186F2B500D4170F /* Resources */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | F94F1CAB2186F2B500D4170F /* PBXTargetDependency */, 196 | ); 197 | name = AppStartUITests; 198 | productName = AppStartUITests; 199 | productReference = F94F1CA92186F2B500D4170F /* AppStartUITests.xctest */; 200 | productType = "com.apple.product-type.bundle.ui-testing"; 201 | }; 202 | /* End PBXNativeTarget section */ 203 | 204 | /* Begin PBXProject section */ 205 | F94F1C7E2186F2B300D4170F /* Project object */ = { 206 | isa = PBXProject; 207 | attributes = { 208 | LastUpgradeCheck = 1000; 209 | ORGANIZATIONNAME = "张豪"; 210 | TargetAttributes = { 211 | F94F1C852186F2B300D4170F = { 212 | CreatedOnToolsVersion = 10.0; 213 | }; 214 | F94F1C9D2186F2B500D4170F = { 215 | CreatedOnToolsVersion = 10.0; 216 | TestTargetID = F94F1C852186F2B300D4170F; 217 | }; 218 | F94F1CA82186F2B500D4170F = { 219 | CreatedOnToolsVersion = 10.0; 220 | TestTargetID = F94F1C852186F2B300D4170F; 221 | }; 222 | }; 223 | }; 224 | buildConfigurationList = F94F1C812186F2B300D4170F /* Build configuration list for PBXProject "AppStart" */; 225 | compatibilityVersion = "Xcode 9.3"; 226 | developmentRegion = en; 227 | hasScannedForEncodings = 0; 228 | knownRegions = ( 229 | en, 230 | Base, 231 | ); 232 | mainGroup = F94F1C7D2186F2B300D4170F; 233 | productRefGroup = F94F1C872186F2B300D4170F /* Products */; 234 | projectDirPath = ""; 235 | projectRoot = ""; 236 | targets = ( 237 | F94F1C852186F2B300D4170F /* AppStart */, 238 | F94F1C9D2186F2B500D4170F /* AppStartTests */, 239 | F94F1CA82186F2B500D4170F /* AppStartUITests */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXResourcesBuildPhase section */ 245 | F94F1C842186F2B300D4170F /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | F94F1CBE2186F2E300D4170F /* bj.png in Resources */, 250 | F94F1CBC2186F2DB00D4170F /* movie.mp4 in Resources */, 251 | F94F1C962186F2B500D4170F /* LaunchScreen.storyboard in Resources */, 252 | F94F1C932186F2B500D4170F /* Assets.xcassets in Resources */, 253 | F94F1C912186F2B400D4170F /* Main.storyboard in Resources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | F94F1C9C2186F2B500D4170F /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | F94F1CA72186F2B500D4170F /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXResourcesBuildPhase section */ 272 | 273 | /* Begin PBXSourcesBuildPhase section */ 274 | F94F1C822186F2B300D4170F /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | F94F1C8E2186F2B400D4170F /* ViewController.m in Sources */, 279 | F94F1C992186F2B500D4170F /* main.m in Sources */, 280 | F94F1C8B2186F2B300D4170F /* AppDelegate.m in Sources */, 281 | F94F1CC12186F2ED00D4170F /* ZHMoviePlayerController.m in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | F94F1C9A2186F2B500D4170F /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | F94F1CA32186F2B500D4170F /* AppStartTests.m in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | F94F1CA52186F2B500D4170F /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | F94F1CAE2186F2B500D4170F /* AppStartUITests.m in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | /* End PBXSourcesBuildPhase section */ 302 | 303 | /* Begin PBXTargetDependency section */ 304 | F94F1CA02186F2B500D4170F /* PBXTargetDependency */ = { 305 | isa = PBXTargetDependency; 306 | target = F94F1C852186F2B300D4170F /* AppStart */; 307 | targetProxy = F94F1C9F2186F2B500D4170F /* PBXContainerItemProxy */; 308 | }; 309 | F94F1CAB2186F2B500D4170F /* PBXTargetDependency */ = { 310 | isa = PBXTargetDependency; 311 | target = F94F1C852186F2B300D4170F /* AppStart */; 312 | targetProxy = F94F1CAA2186F2B500D4170F /* PBXContainerItemProxy */; 313 | }; 314 | /* End PBXTargetDependency section */ 315 | 316 | /* Begin PBXVariantGroup section */ 317 | F94F1C8F2186F2B400D4170F /* Main.storyboard */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | F94F1C902186F2B400D4170F /* Base */, 321 | ); 322 | name = Main.storyboard; 323 | sourceTree = ""; 324 | }; 325 | F94F1C942186F2B500D4170F /* LaunchScreen.storyboard */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | F94F1C952186F2B500D4170F /* Base */, 329 | ); 330 | name = LaunchScreen.storyboard; 331 | sourceTree = ""; 332 | }; 333 | /* End PBXVariantGroup section */ 334 | 335 | /* Begin XCBuildConfiguration section */ 336 | F94F1CB02186F2B500D4170F /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_ANALYZER_NONNULL = YES; 341 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 343 | CLANG_CXX_LIBRARY = "libc++"; 344 | CLANG_ENABLE_MODULES = YES; 345 | CLANG_ENABLE_OBJC_ARC = YES; 346 | CLANG_ENABLE_OBJC_WEAK = YES; 347 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 348 | CLANG_WARN_BOOL_CONVERSION = YES; 349 | CLANG_WARN_COMMA = YES; 350 | CLANG_WARN_CONSTANT_CONVERSION = YES; 351 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 354 | CLANG_WARN_EMPTY_BODY = YES; 355 | CLANG_WARN_ENUM_CONVERSION = YES; 356 | CLANG_WARN_INFINITE_RECURSION = YES; 357 | CLANG_WARN_INT_CONVERSION = YES; 358 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 359 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 360 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 361 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 362 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 363 | CLANG_WARN_STRICT_PROTOTYPES = YES; 364 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 365 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 366 | CLANG_WARN_UNREACHABLE_CODE = YES; 367 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 368 | CODE_SIGN_IDENTITY = "iPhone Developer"; 369 | COPY_PHASE_STRIP = NO; 370 | DEBUG_INFORMATION_FORMAT = dwarf; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | ENABLE_TESTABILITY = YES; 373 | GCC_C_LANGUAGE_STANDARD = gnu11; 374 | GCC_DYNAMIC_NO_PIC = NO; 375 | GCC_NO_COMMON_BLOCKS = YES; 376 | GCC_OPTIMIZATION_LEVEL = 0; 377 | GCC_PREPROCESSOR_DEFINITIONS = ( 378 | "DEBUG=1", 379 | "$(inherited)", 380 | ); 381 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 382 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 383 | GCC_WARN_UNDECLARED_SELECTOR = YES; 384 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 385 | GCC_WARN_UNUSED_FUNCTION = YES; 386 | GCC_WARN_UNUSED_VARIABLE = YES; 387 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 388 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 389 | MTL_FAST_MATH = YES; 390 | ONLY_ACTIVE_ARCH = YES; 391 | SDKROOT = iphoneos; 392 | }; 393 | name = Debug; 394 | }; 395 | F94F1CB12186F2B500D4170F /* Release */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | ALWAYS_SEARCH_USER_PATHS = NO; 399 | CLANG_ANALYZER_NONNULL = YES; 400 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 402 | CLANG_CXX_LIBRARY = "libc++"; 403 | CLANG_ENABLE_MODULES = YES; 404 | CLANG_ENABLE_OBJC_ARC = YES; 405 | CLANG_ENABLE_OBJC_WEAK = YES; 406 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 407 | CLANG_WARN_BOOL_CONVERSION = YES; 408 | CLANG_WARN_COMMA = YES; 409 | CLANG_WARN_CONSTANT_CONVERSION = YES; 410 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 411 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 412 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 413 | CLANG_WARN_EMPTY_BODY = YES; 414 | CLANG_WARN_ENUM_CONVERSION = YES; 415 | CLANG_WARN_INFINITE_RECURSION = YES; 416 | CLANG_WARN_INT_CONVERSION = YES; 417 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 419 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 420 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 421 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 422 | CLANG_WARN_STRICT_PROTOTYPES = YES; 423 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 424 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 425 | CLANG_WARN_UNREACHABLE_CODE = YES; 426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 427 | CODE_SIGN_IDENTITY = "iPhone Developer"; 428 | COPY_PHASE_STRIP = NO; 429 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 430 | ENABLE_NS_ASSERTIONS = NO; 431 | ENABLE_STRICT_OBJC_MSGSEND = YES; 432 | GCC_C_LANGUAGE_STANDARD = gnu11; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 435 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 436 | GCC_WARN_UNDECLARED_SELECTOR = YES; 437 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 438 | GCC_WARN_UNUSED_FUNCTION = YES; 439 | GCC_WARN_UNUSED_VARIABLE = YES; 440 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 441 | MTL_ENABLE_DEBUG_INFO = NO; 442 | MTL_FAST_MATH = YES; 443 | SDKROOT = iphoneos; 444 | VALIDATE_PRODUCT = YES; 445 | }; 446 | name = Release; 447 | }; 448 | F94F1CB32186F2B500D4170F /* Debug */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 452 | CODE_SIGN_STYLE = Automatic; 453 | DEVELOPMENT_TEAM = 8J48HY82XT; 454 | INFOPLIST_FILE = AppStart/Info.plist; 455 | LD_RUNPATH_SEARCH_PATHS = ( 456 | "$(inherited)", 457 | "@executable_path/Frameworks", 458 | ); 459 | PRODUCT_BUNDLE_IDENTIFIER = com.renhejinfu.AppStart; 460 | PRODUCT_NAME = "$(TARGET_NAME)"; 461 | TARGETED_DEVICE_FAMILY = "1,2"; 462 | }; 463 | name = Debug; 464 | }; 465 | F94F1CB42186F2B500D4170F /* Release */ = { 466 | isa = XCBuildConfiguration; 467 | buildSettings = { 468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 469 | CODE_SIGN_STYLE = Automatic; 470 | DEVELOPMENT_TEAM = 8J48HY82XT; 471 | INFOPLIST_FILE = AppStart/Info.plist; 472 | LD_RUNPATH_SEARCH_PATHS = ( 473 | "$(inherited)", 474 | "@executable_path/Frameworks", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = com.renhejinfu.AppStart; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | TARGETED_DEVICE_FAMILY = "1,2"; 479 | }; 480 | name = Release; 481 | }; 482 | F94F1CB62186F2B500D4170F /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | BUNDLE_LOADER = "$(TEST_HOST)"; 486 | CODE_SIGN_STYLE = Automatic; 487 | DEVELOPMENT_TEAM = 8J48HY82XT; 488 | INFOPLIST_FILE = AppStartTests/Info.plist; 489 | LD_RUNPATH_SEARCH_PATHS = ( 490 | "$(inherited)", 491 | "@executable_path/Frameworks", 492 | "@loader_path/Frameworks", 493 | ); 494 | PRODUCT_BUNDLE_IDENTIFIER = com.renhejinfu.AppStartTests; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | TARGETED_DEVICE_FAMILY = "1,2"; 497 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AppStart.app/AppStart"; 498 | }; 499 | name = Debug; 500 | }; 501 | F94F1CB72186F2B500D4170F /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | buildSettings = { 504 | BUNDLE_LOADER = "$(TEST_HOST)"; 505 | CODE_SIGN_STYLE = Automatic; 506 | DEVELOPMENT_TEAM = 8J48HY82XT; 507 | INFOPLIST_FILE = AppStartTests/Info.plist; 508 | LD_RUNPATH_SEARCH_PATHS = ( 509 | "$(inherited)", 510 | "@executable_path/Frameworks", 511 | "@loader_path/Frameworks", 512 | ); 513 | PRODUCT_BUNDLE_IDENTIFIER = com.renhejinfu.AppStartTests; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | TARGETED_DEVICE_FAMILY = "1,2"; 516 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AppStart.app/AppStart"; 517 | }; 518 | name = Release; 519 | }; 520 | F94F1CB92186F2B500D4170F /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | CODE_SIGN_STYLE = Automatic; 524 | DEVELOPMENT_TEAM = 8J48HY82XT; 525 | INFOPLIST_FILE = AppStartUITests/Info.plist; 526 | LD_RUNPATH_SEARCH_PATHS = ( 527 | "$(inherited)", 528 | "@executable_path/Frameworks", 529 | "@loader_path/Frameworks", 530 | ); 531 | PRODUCT_BUNDLE_IDENTIFIER = com.renhejinfu.AppStartUITests; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | TARGETED_DEVICE_FAMILY = "1,2"; 534 | TEST_TARGET_NAME = AppStart; 535 | }; 536 | name = Debug; 537 | }; 538 | F94F1CBA2186F2B500D4170F /* Release */ = { 539 | isa = XCBuildConfiguration; 540 | buildSettings = { 541 | CODE_SIGN_STYLE = Automatic; 542 | DEVELOPMENT_TEAM = 8J48HY82XT; 543 | INFOPLIST_FILE = AppStartUITests/Info.plist; 544 | LD_RUNPATH_SEARCH_PATHS = ( 545 | "$(inherited)", 546 | "@executable_path/Frameworks", 547 | "@loader_path/Frameworks", 548 | ); 549 | PRODUCT_BUNDLE_IDENTIFIER = com.renhejinfu.AppStartUITests; 550 | PRODUCT_NAME = "$(TARGET_NAME)"; 551 | TARGETED_DEVICE_FAMILY = "1,2"; 552 | TEST_TARGET_NAME = AppStart; 553 | }; 554 | name = Release; 555 | }; 556 | /* End XCBuildConfiguration section */ 557 | 558 | /* Begin XCConfigurationList section */ 559 | F94F1C812186F2B300D4170F /* Build configuration list for PBXProject "AppStart" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | F94F1CB02186F2B500D4170F /* Debug */, 563 | F94F1CB12186F2B500D4170F /* Release */, 564 | ); 565 | defaultConfigurationIsVisible = 0; 566 | defaultConfigurationName = Release; 567 | }; 568 | F94F1CB22186F2B500D4170F /* Build configuration list for PBXNativeTarget "AppStart" */ = { 569 | isa = XCConfigurationList; 570 | buildConfigurations = ( 571 | F94F1CB32186F2B500D4170F /* Debug */, 572 | F94F1CB42186F2B500D4170F /* Release */, 573 | ); 574 | defaultConfigurationIsVisible = 0; 575 | defaultConfigurationName = Release; 576 | }; 577 | F94F1CB52186F2B500D4170F /* Build configuration list for PBXNativeTarget "AppStartTests" */ = { 578 | isa = XCConfigurationList; 579 | buildConfigurations = ( 580 | F94F1CB62186F2B500D4170F /* Debug */, 581 | F94F1CB72186F2B500D4170F /* Release */, 582 | ); 583 | defaultConfigurationIsVisible = 0; 584 | defaultConfigurationName = Release; 585 | }; 586 | F94F1CB82186F2B500D4170F /* Build configuration list for PBXNativeTarget "AppStartUITests" */ = { 587 | isa = XCConfigurationList; 588 | buildConfigurations = ( 589 | F94F1CB92186F2B500D4170F /* Debug */, 590 | F94F1CBA2186F2B500D4170F /* Release */, 591 | ); 592 | defaultConfigurationIsVisible = 0; 593 | defaultConfigurationName = Release; 594 | }; 595 | /* End XCConfigurationList section */ 596 | }; 597 | rootObject = F94F1C7E2186F2B300D4170F /* Project object */; 598 | } 599 | --------------------------------------------------------------------------------