iOS_根据系统版本编译不同的代码

RT:

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
        [APService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil];
    }
#else
    NSLog(@"else");
#endif


你可能感兴趣的:(ios,预编译,SDK版本)