diff --git a/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate b/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate index 5222669..c53dfc0 100644 Binary files a/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate and b/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/HDwallpaper/AppDelegate.m b/HDwallpaper/AppDelegate.m index 273bf2f..7092888 100644 --- a/HDwallpaper/AppDelegate.m +++ b/HDwallpaper/AppDelegate.m @@ -11,6 +11,7 @@ #import #import "AWM_NetManager.h" +#import @interface AppDelegate () @property (nonatomic,strong) NSTimer *attTimer; @end @@ -28,29 +29,30 @@ NSInteger cowardly_0 = [[NSUserDefaults standardUserDefaults] integerForKey:@"de cowardly_0 *= patently_6; [[NSUserDefaults standardUserDefaults] setInteger:cowardly_0 forKey:@"delight_j"]; - - [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { - // 获取到权限后,依然使用老方法获取idfa - if(status == ATTrackingManagerAuthorizationStatusNotDetermined) { - - if(self.attTimer == nil) { - self.attTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(checkATT) userInfo:nil repeats:YES]; - [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { - if (status != ATTrackingManagerAuthorizationStatusNotDetermined) { - NSLog(@"用户已做出选择"); - [self invalidATTTimer]; - } - else { - NSLog(@"用户未做出选择,可能是弹框未弹出..."); - } - }]; + if (@available(iOS 14.0,*)) { + [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { + // 获取到权限后,依然使用老方法获取idfa + if(status == ATTrackingManagerAuthorizationStatusNotDetermined) { + + if(self.attTimer == nil) { + self.attTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(checkATT) userInfo:nil repeats:YES]; + [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { + if (status != ATTrackingManagerAuthorizationStatusNotDetermined) { + NSLog(@"用户已做出选择"); + [self invalidATTTimer]; + } + else { + NSLog(@"用户未做出选择,可能是弹框未弹出..."); + } + }]; + } + } - - } - else{ - [self invalidATTTimer]; - } - }]; + else{ + [self invalidATTTimer]; + } + }]; + } } -(void)invalidATTTimer{ @@ -80,7 +82,10 @@ NSString *noble_W = [unfasten_4 stringFromDate:[NSDate date]]; // // [[AWM_WallPapaerADManager shareInstance] configureAD]; // - [self checkATT]; + + [self checkATT]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window.backgroundColor = [UIColor whiteColor]; // [AWM_NetManager uploadAD_Start]; diff --git a/TallPaper.xcodeproj/project.pbxproj b/TallPaper.xcodeproj/project.pbxproj index b7fb8dc..0880984 100644 --- a/TallPaper.xcodeproj/project.pbxproj +++ b/TallPaper.xcodeproj/project.pbxproj @@ -573,6 +573,10 @@ CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 8B4CW938L2; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8B4CW938L2; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/HDwallpaper", + ); GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = "$(SRCROOT)/HDwallpaper/PrefixHeader.pch"; GENERATE_INFOPLIST_FILE = YES; @@ -618,6 +622,10 @@ CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 8B4CW938L2; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8B4CW938L2; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/HDwallpaper", + ); GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = "$(SRCROOT)/HDwallpaper/PrefixHeader.pch"; GENERATE_INFOPLIST_FILE = YES; diff --git a/TallPaper.xcodeproj/xcshareddata/xcschemes/HD wallpaper.xcscheme b/TallPaper.xcodeproj/xcshareddata/xcschemes/HD wallpaper.xcscheme index 6a3e1e0..1bb87b2 100644 --- a/TallPaper.xcodeproj/xcshareddata/xcschemes/HD wallpaper.xcscheme +++ b/TallPaper.xcodeproj/xcshareddata/xcschemes/HD wallpaper.xcscheme @@ -31,7 +31,7 @@ shouldAutocreateTestPlan = "YES">