添加完毕att
This commit is contained in:
parent
e8b2529f59
commit
7e07fe25a0
@ -486,12 +486,13 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 0;
|
||||||
DEVELOPMENT_TEAM = U3NR9V77CM;
|
DEVELOPMENT_TEAM = U3NR9V77CM;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = "HD wallpaper/Info.plist";
|
INFOPLIST_FILE = "HD wallpaper/Info.plist";
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Trend Wallpaper";
|
INFOPLIST_KEY_CFBundleDisplayName = "Trend Wallpaper";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Save Image To Photo Library";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Save Image To Photo Library";
|
||||||
|
INFOPLIST_KEY_NSUserTrackingUsageDescription = "我们想使用您的设备的广告追踪权限来为您推荐个性化的广告";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = "";
|
INFOPLIST_KEY_UIMainStoryboardFile = "";
|
||||||
@ -502,7 +503,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.1;
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.trendwallpaper.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.trendwallpaper.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@ -520,12 +521,13 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 0;
|
||||||
DEVELOPMENT_TEAM = U3NR9V77CM;
|
DEVELOPMENT_TEAM = U3NR9V77CM;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = "HD wallpaper/Info.plist";
|
INFOPLIST_FILE = "HD wallpaper/Info.plist";
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Trend Wallpaper";
|
INFOPLIST_KEY_CFBundleDisplayName = "Trend Wallpaper";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Save Image To Photo Library";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Save Image To Photo Library";
|
||||||
|
INFOPLIST_KEY_NSUserTrackingUsageDescription = "我们想使用您的设备的广告追踪权限来为您推荐个性化的广告";
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard;
|
||||||
INFOPLIST_KEY_UIMainStoryboardFile = "";
|
INFOPLIST_KEY_UIMainStoryboardFile = "";
|
||||||
@ -536,7 +538,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.1;
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.trendwallpaper.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.trendwallpaper.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|||||||
Binary file not shown.
@ -7,18 +7,56 @@
|
|||||||
#import "WPForMyViewController.h"
|
#import "WPForMyViewController.h"
|
||||||
|
|
||||||
#import "WallPapaerADManager.h"
|
#import "WallPapaerADManager.h"
|
||||||
@interface AppDelegate ()
|
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||||
|
#import <AdSupport/ASIdentifierManager.h>
|
||||||
|
|
||||||
|
@interface AppDelegate ()
|
||||||
|
@property (nonatomic,strong) NSTimer *attTimer;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//检查idfa的att弹框
|
||||||
|
- (void)checkATT{
|
||||||
|
[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];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)invalidATTTimer{
|
||||||
|
if( _attTimer ){
|
||||||
|
[_attTimer invalidate];
|
||||||
|
}
|
||||||
|
_attTimer = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
[[WallPapaerADManager shareInstance] configureAD];
|
[[WallPapaerADManager shareInstance] configureAD];
|
||||||
|
|
||||||
|
[self checkATT];
|
||||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||||
self.window.backgroundColor = [UIColor whiteColor];
|
self.window.backgroundColor = [UIColor whiteColor];
|
||||||
[self.window makeKeyAndVisible];
|
[self.window makeKeyAndVisible];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user