diff --git a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate index 71c2831..a49267f 100644 Binary files a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate and b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 9f360e4..6889475 100644 --- a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -254,8 +254,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "240" - endingLineNumber = "240" + startingLineNumber = "243" + endingLineNumber = "243" landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:" landmarkType = "7"> @@ -270,8 +270,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "218" - endingLineNumber = "218" + startingLineNumber = "221" + endingLineNumber = "221" landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:" landmarkType = "7"> @@ -494,8 +494,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "154" - endingLineNumber = "154" + startingLineNumber = "157" + endingLineNumber = "157" landmarkName = "-showRootViewController" landmarkType = "7"> @@ -574,27 +574,11 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "557" - endingLineNumber = "557" + startingLineNumber = "560" + endingLineNumber = "560" landmarkName = "-handlePushMsg:" landmarkType = "7"> - - - - diff --git a/tongxin/AppDelegate.m b/tongxin/AppDelegate.m index 4e7905d..566c98b 100644 --- a/tongxin/AppDelegate.m +++ b/tongxin/AppDelegate.m @@ -16,6 +16,8 @@ #import #import +#import +#import //微信SDK头文件 #import @@ -65,6 +67,7 @@ [userDefault setValue:@"童信APP活着的状态" forKey:@"APPStatus"]; [User loadFormFile]; [self showRootViewController]; + [self requestIDFATracking]; [self getadSwitch]; self.window.backgroundColor = [UIColor whiteColor]; @@ -783,6 +786,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response - (void)applicationDidBecomeActive:(UIApplication *)application { // 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. //MARK:重新启动在应用程序处于非活动状态时暂停(或尚未启动)的任何任务。如果应用程序以前在后台,可以选择刷新用户界面。 + [self requestIDFATracking]; if(self.backgroudMsg){ //MARK: 取消本地推送 @@ -876,7 +880,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response #endif #endif BUAdSDKConfiguration *configuration = [BUAdSDKConfiguration configuration]; - configuration.appID = @"5408119"; + configuration.appID = @"5424285"; [BUAdSDKManager startWithAsyncCompletionHandler:^(BOOL success, NSError *error) { @@ -887,12 +891,13 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } }]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [self requestIDFATracking]; - }); +// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ +// [self requestIDFATracking]; +// }); } -- (void)requestIDFATracking { +- (void)requestIDFATracking +{ if (@available(iOS 14, *)) { // iOS14及以上版本需要先请求权限 [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { @@ -907,10 +912,13 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } else { // iOS14以下版本依然使用老方法 // 判断在设置-隐私里用户是否打开了广告跟踪 - if ([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]) { + if ([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]) + { NSString *idfa = [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString]; NSLog(@"%@",idfa); - } else { + } + else + { NSLog(@"请在设置-隐私-广告中打开广告跟踪功能"); } } @@ -922,7 +930,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response { CGRect frame = [UIScreen mainScreen].bounds; self.startTime = CACurrentMediaTime(); - BUSplashAd *splashAd = [[BUSplashAd alloc] initWithSlotID:@"888361613" adSize:frame.size]; + BUSplashAd *splashAd = [[BUSplashAd alloc] initWithSlotID:@"888432838" adSize:frame.size]; splashAd.supportCardView = YES; splashAd.supportZoomOutView = YES; @@ -946,12 +954,14 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response ///当材料加载失败时调用此方法 - (void)splashAdLoadFail:(nonnull BUSplashAd *)splashAd error:(BUAdError * _Nullable)error { [self disYulan]; + [self pbu_logWithSEL:_cmd msg:@""]; } ///当闪屏视图渲染失败时调用此方法 - (void)splashAdRenderFail:(nonnull BUSplashAd *)splashAd error:(BUAdError * _Nullable)error { [self disYulan]; + [self pbu_logWithSEL:_cmd msg:@""]; } ///当渲染成功时调用这个方法 @@ -976,8 +986,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response - (void)disYulan { - MyTabBarViewController *mytabVC = (MyTabBarViewController*)[UICommon currentVC].tabBarController; - [mytabVC removeTransitionImageView]; + [self.tabbarView removeTransitionImageView]; } @@ -1010,4 +1019,5 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } + @end diff --git a/tongxin/Assets.xcassets/通用/Discover_banner.imageset/Contents.json b/tongxin/Assets.xcassets/通用/Discover_banner.imageset/Contents.json new file mode 100644 index 0000000..dd4428f --- /dev/null +++ b/tongxin/Assets.xcassets/通用/Discover_banner.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Discover_banner@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/tongxin/Assets.xcassets/通用/Discover_banner.imageset/Discover_banner@2x.png b/tongxin/Assets.xcassets/通用/Discover_banner.imageset/Discover_banner@2x.png new file mode 100644 index 0000000..f1b61e0 Binary files /dev/null and b/tongxin/Assets.xcassets/通用/Discover_banner.imageset/Discover_banner@2x.png differ diff --git a/tongxin/Base.lproj/Main.storyboard b/tongxin/Base.lproj/Main.storyboard index 4d06dfd..baacfeb 100644 --- a/tongxin/Base.lproj/Main.storyboard +++ b/tongxin/Base.lproj/Main.storyboard @@ -46,7 +46,7 @@