fd
This commit is contained in:
parent
e113457cc0
commit
6652a6d330
Binary file not shown.
@ -1,23 +1,12 @@
|
|||||||
//
|
//
|
||||||
// AppDelegate.m
|
// AppDelegate.m
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "AWM_OnePageViewController.h"
|
#import "AppDelegate+LuxAppDelegate.h"
|
||||||
#import "AWM_HotViewController.h"
|
|
||||||
#import "AWM_ditViewController.h"
|
|
||||||
#import "AWM_ForMyViewController.h"
|
|
||||||
#import "AWM_SearchViewController.h"
|
|
||||||
#import "AWM_wallpaperViewController.h"
|
|
||||||
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
|
||||||
#import <AdSupport/ASIdentifierManager.h>
|
|
||||||
//#import "AWM_NetManager.h"
|
//#import "AWM_NetManager.h"
|
||||||
|
|
||||||
#import <Firebase/Firebase.h>
|
|
||||||
#import <FirebaseCore/FirebaseCore.h>
|
|
||||||
#import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
|
|
||||||
|
|
||||||
#import "LuxADManager.h"
|
|
||||||
@interface AppDelegate ()
|
@interface AppDelegate ()
|
||||||
@property (nonatomic,strong) NSTimer *attTimer;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@ -25,54 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//检查idfa的att弹框
|
|
||||||
- (void)checkATT{
|
|
||||||
|
|
||||||
NSInteger patently_6 = 4;
|
|
||||||
NSInteger cowardly_0 = [[NSUserDefaults standardUserDefaults] integerForKey:@"delight_j"];
|
|
||||||
cowardly_0 *= patently_6;
|
|
||||||
[[NSUserDefaults standardUserDefaults] setInteger:cowardly_0 forKey:@"delight_j"];
|
|
||||||
|
|
||||||
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];
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)invalidATTTimer{
|
|
||||||
|
|
||||||
NSInteger aqueduct_d = 2;
|
|
||||||
NSInteger shopworn_4 = [[NSUserDefaults standardUserDefaults] integerForKey:@"arbiter_Q"];
|
|
||||||
shopworn_4 *= aqueduct_d;
|
|
||||||
[[NSUserDefaults standardUserDefaults] setInteger:shopworn_4 forKey:@"arbiter_Q"];
|
|
||||||
|
|
||||||
|
|
||||||
if( _attTimer ){
|
|
||||||
[_attTimer invalidate];
|
|
||||||
}
|
|
||||||
_attTimer = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
|
|
||||||
@ -81,133 +22,23 @@ shopworn_4 *= aqueduct_d;
|
|||||||
NSString *noble_W = [unfasten_4 stringFromDate:[NSDate date]];
|
NSString *noble_W = [unfasten_4 stringFromDate:[NSDate date]];
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:noble_W forKey:@"shack_k"];
|
[[NSUserDefaults standardUserDefaults] setObject:noble_W forKey:@"shack_k"];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#warning app需要一个window
|
||||||
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];
|
||||||
UIViewController *vc = [UIViewController new];
|
UIViewController *vc = [UIViewController new];
|
||||||
self.window.rootViewController = vc;
|
self.window.rootViewController = vc;
|
||||||
[self.window makeKeyAndVisible];
|
[self.window makeKeyAndVisible];
|
||||||
|
|
||||||
[FIRApp configure];
|
#warning 调用以下2行配置
|
||||||
[self checkATT];
|
[self checkATT];
|
||||||
|
|
||||||
NSLog(@">>>>>>>>>HDWall.......");
|
|
||||||
[self configureADByFirebase];
|
[self configureADByFirebase];
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)configureADByFirebase {
|
|
||||||
if ([[LuxADManager shareInstance] isADSSMode] ) {
|
|
||||||
[self configureAD];
|
|
||||||
}
|
|
||||||
else {//读取firebase数据
|
|
||||||
FIRRemoteConfig *rc = [FIRRemoteConfig remoteConfig];
|
|
||||||
FIRRemoteConfigSettings *rcs = [FIRRemoteConfigSettings new];
|
|
||||||
rcs.minimumFetchInterval = 0;
|
|
||||||
rc.configSettings = rcs;
|
|
||||||
[rc fetchAndActivateWithCompletionHandler:^(FIRRemoteConfigFetchAndActivateStatus status, NSError * _Nullable error) {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
if (status == FIRRemoteConfigFetchAndActivateStatusSuccessFetchedFromRemote) {
|
|
||||||
NSString *localVer = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleShortVersionString"];
|
|
||||||
NSDictionary *value = [[rc configValueForKey:@"isopen"] JSONValue];
|
|
||||||
BOOL isadopen = [value[@"isadopen"] boolValue];
|
|
||||||
NSString *version = value[@"version"];
|
|
||||||
if (!isadopen || ( version && [version isEqualToString:localVer])) {//不展示ad
|
|
||||||
[self configureRootVC];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[self configureAD];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
||||||
[self configureADByFirebase];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)configureAD {
|
|
||||||
|
|
||||||
|
|
||||||
[[LuxADManager shareInstance] addADWithInterstitialId:@"748bee67bbad21b9" actionBlock:^(UIViewController * _Nonnull vc) {
|
|
||||||
|
|
||||||
}];//第一个一定为开屏插页
|
|
||||||
|
|
||||||
[[LuxADManager shareInstance] addADWithInterstitialId:@"e5837c56c18ee712" actionBlock:^(UIViewController * _Nonnull vc) {
|
|
||||||
AWM_ditViewController *subvc = [AWM_ditViewController new];
|
|
||||||
subvc.adIndex = 1;
|
|
||||||
[vc.navigationController pushViewController:subvc animated:NO];
|
|
||||||
}];
|
|
||||||
|
|
||||||
[[LuxADManager shareInstance] addADWithInterstitialId:@"edf0554479388c05" actionBlock:^(UIViewController * _Nonnull vc) {
|
|
||||||
AWM_SearchViewController *subvc = [AWM_SearchViewController new];
|
|
||||||
subvc.adIndex = 2;
|
|
||||||
[vc.navigationController pushViewController:subvc animated:NO];
|
|
||||||
}];
|
|
||||||
|
|
||||||
[[LuxADManager shareInstance] addADWithInterstitialId:@"5a3cff8307e36497" actionBlock:^(UIViewController * _Nonnull vc) {
|
|
||||||
AWM_wallpaperViewController *subvc = [AWM_wallpaperViewController new];
|
|
||||||
subvc.adIndex = 3;
|
|
||||||
[vc.navigationController pushViewController:subvc animated:NO];
|
|
||||||
}];
|
|
||||||
|
|
||||||
[[LuxADManager shareInstance] configureADWithAppLovinSDKKey:@"EG89nBMcGXrN1_U_svJiPhCMTsVu7TEkWvOGtVJUbh4x1Ds9cKJy8pzKr6LXKL7zQXbN3PLy4Q6MRl3oT3lgbX"];
|
|
||||||
[[LuxADManager shareInstance] showFirstOpenAD:^(NSInteger actionType) {
|
|
||||||
[self configureRootVC];
|
|
||||||
} window:self.window bgImgName:@"ssa" bgColor:nil];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)configureRootVC {
|
|
||||||
|
|
||||||
NSInteger alkali_F = 1;
|
|
||||||
NSInteger transmit_M = [[NSUserDefaults standardUserDefaults] integerForKey:@"acquit_8"];
|
|
||||||
transmit_M *= alkali_F;
|
|
||||||
[[NSUserDefaults standardUserDefaults] setInteger:transmit_M forKey:@"acquit_8"];
|
|
||||||
|
|
||||||
|
|
||||||
NSString *tab1 = KLS(@"tab1", @"A friendly greeting");
|
|
||||||
NSString *tab2 = KLS(@"tab2", @"A friendly greeting");
|
|
||||||
NSString *tab3 = KLS(@"tab3", @"A friendly greeting");
|
|
||||||
NSString *tab4 = KLS(@"tab4", @"A friendly greeting");
|
|
||||||
NSString *tab11 = KLS(@"tab11", @"A friendly greeting");
|
|
||||||
NSString *tab22 = KLS(@"tab22", @"A friendly greeting");
|
|
||||||
NSString *tab33 = KLS(@"tab33", @"A friendly greeting");
|
|
||||||
NSString *tab44 = KLS(@"tab44", @"A friendly greeting");
|
|
||||||
AWM_OnePageViewController *wpHome = [[AWM_OnePageViewController alloc] init];
|
|
||||||
wpHome.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab1] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab11] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
||||||
UINavigationController *wpHomeNV = [[UINavigationController alloc] initWithRootViewController:wpHome];
|
|
||||||
|
|
||||||
AWM_HotViewController *wpHot = [[AWM_HotViewController alloc] init];
|
|
||||||
wpHot.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab2] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab22] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
||||||
UINavigationController *wpHotNV = [[UINavigationController alloc] initWithRootViewController:wpHot];
|
|
||||||
|
|
||||||
AWM_ditViewController *wpEdit = [[AWM_ditViewController alloc] init];
|
|
||||||
wpEdit.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab3] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab33] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
||||||
UINavigationController *wpEditNV = [[UINavigationController alloc] initWithRootViewController:wpEdit];
|
|
||||||
AWM_ForMyViewController *wpMy = [[AWM_ForMyViewController alloc] init];
|
|
||||||
wpMy.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab4] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab44] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
||||||
UINavigationController *wpMyNV = [[UINavigationController alloc] initWithRootViewController:wpMy];
|
|
||||||
|
|
||||||
UITabBarController *tb = [[UITabBarController alloc] init];
|
|
||||||
tb.tabBar.backgroundColor = WP_COLOR_WITH_HEX(0xFFFFFF);
|
|
||||||
tb.tabBar.tintColor = [UIColor orangeColor];
|
|
||||||
UITabBarAppearance *skappearance = [[UITabBarAppearance alloc] init];
|
|
||||||
skappearance.backgroundColor = WP_COLOR_WITH_HEX(0x6B77F2);
|
|
||||||
tb.tabBar.standardAppearance = skappearance;
|
|
||||||
|
|
||||||
tb.viewControllers = @[wpHomeNV,wpHotNV,wpEditNV,wpMyNV];
|
|
||||||
tb.selectedIndex = 0;
|
|
||||||
self.window.rootViewController = tb;
|
|
||||||
[self.window makeKeyAndVisible];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
@ -217,7 +48,7 @@ NSDateFormatter *milkman_k = [NSDateFormatter new];
|
|||||||
NSString *innuendo_6 = [milkman_k stringFromDate:[NSDate date]];
|
NSString *innuendo_6 = [milkman_k stringFromDate:[NSDate date]];
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:innuendo_6 forKey:@"moderation_T"];
|
[[NSUserDefaults standardUserDefaults] setObject:innuendo_6 forKey:@"moderation_T"];
|
||||||
|
|
||||||
|
#warning app 变成active时调用开屏
|
||||||
[[LuxADManager shareInstance] showOpenAD];
|
[[LuxADManager shareInstance] showOpenAD];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
HDwallpaper/LuxADManager/AppDelegate+LuxAppDelegate.h
Normal file
20
HDwallpaper/LuxADManager/AppDelegate+LuxAppDelegate.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// AppDelegate+LuxAppDelegate.h
|
||||||
|
// TallPaper
|
||||||
|
//
|
||||||
|
// Created by aaa on 2024/7/30.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
#import "LuxADManager.h"
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface AppDelegate (LuxAppDelegate)
|
||||||
|
//检查idfa的att弹框
|
||||||
|
- (void)checkATT;
|
||||||
|
|
||||||
|
#pragma mark -------配置firebase
|
||||||
|
- (void)configureADByFirebase;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
191
HDwallpaper/LuxADManager/AppDelegate+LuxAppDelegate.m
Normal file
191
HDwallpaper/LuxADManager/AppDelegate+LuxAppDelegate.m
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
//
|
||||||
|
// AppDelegate+LuxAppDelegate.m
|
||||||
|
// TallPaper
|
||||||
|
//
|
||||||
|
// Created by aaa on 2024/7/30.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "AppDelegate+LuxAppDelegate.h"
|
||||||
|
#import <objc/runtime.h>
|
||||||
|
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||||
|
#import <AdSupport/ASIdentifierManager.h>
|
||||||
|
|
||||||
|
#import <Firebase/Firebase.h>
|
||||||
|
#import <FirebaseCore/FirebaseCore.h>
|
||||||
|
#import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//替换为自己需要用到的VC类头文件
|
||||||
|
#import "AWM_OnePageViewController.h"
|
||||||
|
#import "AWM_HotViewController.h"
|
||||||
|
#import "AWM_ditViewController.h"
|
||||||
|
#import "AWM_ForMyViewController.h"
|
||||||
|
#import "AWM_SearchViewController.h"
|
||||||
|
#import "AWM_wallpaperViewController.h"
|
||||||
|
|
||||||
|
@interface AppDelegate()
|
||||||
|
@property (nonatomic,strong) NSTimer *attTimer;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation AppDelegate (LuxAppDelegate)
|
||||||
|
|
||||||
|
|
||||||
|
- (NSString *)attTimer {
|
||||||
|
return objc_getAssociatedObject(self, @selector(attTimer));
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setAttTimer:(NSString *)attTimer {
|
||||||
|
objc_setAssociatedObject(self, @selector(attTimer), attTimer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//检查idfa的att弹框
|
||||||
|
- (void)checkATT{
|
||||||
|
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];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)invalidATTTimer{
|
||||||
|
if( self.attTimer ){
|
||||||
|
[self.attTimer invalidate];
|
||||||
|
}
|
||||||
|
self.attTimer = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark -------配置firebase
|
||||||
|
#warning 记得将目录下的GoogleService-Info.plist文件替换为当前app的firebase配置
|
||||||
|
- (void)configureADByFirebase {
|
||||||
|
[FIRApp configure];
|
||||||
|
if ([[LuxADManager shareInstance] isADSSMode] ) {
|
||||||
|
[self configureAD];
|
||||||
|
}
|
||||||
|
else {//读取firebase数据
|
||||||
|
FIRRemoteConfig *rc = [FIRRemoteConfig remoteConfig];
|
||||||
|
FIRRemoteConfigSettings *rcs = [FIRRemoteConfigSettings new];
|
||||||
|
rcs.minimumFetchInterval = 0;
|
||||||
|
rc.configSettings = rcs;
|
||||||
|
[rc fetchAndActivateWithCompletionHandler:^(FIRRemoteConfigFetchAndActivateStatus status, NSError * _Nullable error) {
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
if (status == FIRRemoteConfigFetchAndActivateStatusSuccessFetchedFromRemote) {
|
||||||
|
NSString *localVer = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleShortVersionString"];
|
||||||
|
NSDictionary *value = [[rc configValueForKey:@"isopen"] JSONValue];
|
||||||
|
BOOL isadopen = [value[@"isadopen"] boolValue];
|
||||||
|
NSString *version = value[@"version"];
|
||||||
|
if (!isadopen || ( version && [version isEqualToString:localVer])) {//不展示ad
|
||||||
|
[self configureRootVC];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[self configureAD];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
[self configureADByFirebase];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark -----配置AD
|
||||||
|
#warning 请把以下的id与key替换为对应项目的max 账户信息; 同时,请将每个actionBlock中的代码改为点击每个广告需要跳转的页面
|
||||||
|
- (void)configureAD {
|
||||||
|
[[LuxADManager shareInstance] addADWithInterstitialId:@"748bee67bbad21b9" actionBlock:^(UIViewController * _Nonnull vc) {
|
||||||
|
|
||||||
|
}];//第一个一定为开屏插页
|
||||||
|
|
||||||
|
[[LuxADManager shareInstance] addADWithInterstitialId:@"e5837c56c18ee712" actionBlock:^(UIViewController * _Nonnull vc) {
|
||||||
|
AWM_ditViewController *subvc = [AWM_ditViewController new];
|
||||||
|
subvc.adIndex = 1;
|
||||||
|
[vc.navigationController pushViewController:subvc animated:NO];
|
||||||
|
}];
|
||||||
|
|
||||||
|
[[LuxADManager shareInstance] addADWithInterstitialId:@"edf0554479388c05" actionBlock:^(UIViewController * _Nonnull vc) {
|
||||||
|
AWM_SearchViewController *subvc = [AWM_SearchViewController new];
|
||||||
|
subvc.adIndex = 2;
|
||||||
|
[vc.navigationController pushViewController:subvc animated:NO];
|
||||||
|
}];
|
||||||
|
|
||||||
|
[[LuxADManager shareInstance] addADWithInterstitialId:@"5a3cff8307e36497" actionBlock:^(UIViewController * _Nonnull vc) {
|
||||||
|
AWM_wallpaperViewController *subvc = [AWM_wallpaperViewController new];
|
||||||
|
subvc.adIndex = 3;
|
||||||
|
[vc.navigationController pushViewController:subvc animated:NO];
|
||||||
|
}];
|
||||||
|
|
||||||
|
[[LuxADManager shareInstance] configureADWithAppLovinSDKKey:@"EG89nBMcGXrN1_U_svJiPhCMTsVu7TEkWvOGtVJUbh4x1Ds9cKJy8pzKr6LXKL7zQXbN3PLy4Q6MRl3oT3lgbX"];
|
||||||
|
[[LuxADManager shareInstance] showFirstOpenAD:^(NSInteger actionType) {
|
||||||
|
[self configureRootVC];
|
||||||
|
} window:self.window bgImgName:@"ssa" bgColor:nil];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark -------这个地方配置A面正常的VC
|
||||||
|
- (void)configureRootVC {
|
||||||
|
NSString *tab1 = KLS(@"tab1", @"A friendly greeting");
|
||||||
|
NSString *tab2 = KLS(@"tab2", @"A friendly greeting");
|
||||||
|
NSString *tab3 = KLS(@"tab3", @"A friendly greeting");
|
||||||
|
NSString *tab4 = KLS(@"tab4", @"A friendly greeting");
|
||||||
|
NSString *tab11 = KLS(@"tab11", @"A friendly greeting");
|
||||||
|
NSString *tab22 = KLS(@"tab22", @"A friendly greeting");
|
||||||
|
NSString *tab33 = KLS(@"tab33", @"A friendly greeting");
|
||||||
|
NSString *tab44 = KLS(@"tab44", @"A friendly greeting");
|
||||||
|
AWM_OnePageViewController *wpHome = [[AWM_OnePageViewController alloc] init];
|
||||||
|
wpHome.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab1] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab11] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
||||||
|
UINavigationController *wpHomeNV = [[UINavigationController alloc] initWithRootViewController:wpHome];
|
||||||
|
|
||||||
|
AWM_HotViewController *wpHot = [[AWM_HotViewController alloc] init];
|
||||||
|
wpHot.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab2] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab22] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
||||||
|
UINavigationController *wpHotNV = [[UINavigationController alloc] initWithRootViewController:wpHot];
|
||||||
|
|
||||||
|
AWM_ditViewController *wpEdit = [[AWM_ditViewController alloc] init];
|
||||||
|
wpEdit.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab3] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab33] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
||||||
|
UINavigationController *wpEditNV = [[UINavigationController alloc] initWithRootViewController:wpEdit];
|
||||||
|
AWM_ForMyViewController *wpMy = [[AWM_ForMyViewController alloc] init];
|
||||||
|
wpMy.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"" image:[[UIImage imageNamed:tab4] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:tab44] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
||||||
|
UINavigationController *wpMyNV = [[UINavigationController alloc] initWithRootViewController:wpMy];
|
||||||
|
|
||||||
|
UITabBarController *tb = [[UITabBarController alloc] init];
|
||||||
|
tb.tabBar.backgroundColor = WP_COLOR_WITH_HEX(0xFFFFFF);
|
||||||
|
tb.tabBar.tintColor = [UIColor orangeColor];
|
||||||
|
UITabBarAppearance *skappearance = [[UITabBarAppearance alloc] init];
|
||||||
|
skappearance.backgroundColor = WP_COLOR_WITH_HEX(0x6B77F2);
|
||||||
|
tb.tabBar.standardAppearance = skappearance;
|
||||||
|
|
||||||
|
tb.viewControllers = @[wpHomeNV,wpHotNV,wpEditNV,wpMyNV];
|
||||||
|
tb.selectedIndex = 0;
|
||||||
|
self.window.rootViewController = tb;
|
||||||
|
[self.window makeKeyAndVisible];
|
||||||
|
}
|
||||||
|
@end
|
||||||
@ -27,6 +27,7 @@
|
|||||||
0004D88B2C355DF100B3E467 /* AWM_UserPravcyVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0004D88A2C355DF100B3E467 /* AWM_UserPravcyVC.m */; };
|
0004D88B2C355DF100B3E467 /* AWM_UserPravcyVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0004D88A2C355DF100B3E467 /* AWM_UserPravcyVC.m */; };
|
||||||
0004D8932C363D5200B3E467 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0004D8922C363D5200B3E467 /* Localizable.strings */; };
|
0004D8932C363D5200B3E467 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0004D8922C363D5200B3E467 /* Localizable.strings */; };
|
||||||
0004D8972C363D5800B3E467 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0004D8962C363D5800B3E467 /* InfoPlist.strings */; };
|
0004D8972C363D5800B3E467 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0004D8962C363D5800B3E467 /* InfoPlist.strings */; };
|
||||||
|
002C2B992C5882E100A01117 /* AppDelegate+LuxAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 002C2B982C5882E100A01117 /* AppDelegate+LuxAppDelegate.m */; };
|
||||||
00A555422C53B09F0055F452 /* LuxADVCControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A555412C53B09F0055F452 /* LuxADVCControl.m */; };
|
00A555422C53B09F0055F452 /* LuxADVCControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A555412C53B09F0055F452 /* LuxADVCControl.m */; };
|
||||||
00C5EEC72C52404B000553BF /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 00C5EEC62C52404B000553BF /* GoogleService-Info.plist */; };
|
00C5EEC72C52404B000553BF /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 00C5EEC62C52404B000553BF /* GoogleService-Info.plist */; };
|
||||||
00C5EECD2C527F71000553BF /* LuxADManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 00C5EECC2C527F71000553BF /* LuxADManager.m */; };
|
00C5EECD2C527F71000553BF /* LuxADManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 00C5EECC2C527F71000553BF /* LuxADManager.m */; };
|
||||||
@ -90,6 +91,8 @@
|
|||||||
0004D8912C363D5200B3E467 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
0004D8912C363D5200B3E467 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
0004D8952C363D5800B3E467 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
0004D8952C363D5800B3E467 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
00218D932C4F807A00966466 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
|
00218D932C4F807A00966466 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
|
||||||
|
002C2B972C5882E100A01117 /* AppDelegate+LuxAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+LuxAppDelegate.h"; sourceTree = "<group>"; };
|
||||||
|
002C2B982C5882E100A01117 /* AppDelegate+LuxAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+LuxAppDelegate.m"; sourceTree = "<group>"; };
|
||||||
00A555402C53B09F0055F452 /* LuxADVCControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuxADVCControl.h; sourceTree = "<group>"; };
|
00A555402C53B09F0055F452 /* LuxADVCControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuxADVCControl.h; sourceTree = "<group>"; };
|
||||||
00A555412C53B09F0055F452 /* LuxADVCControl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LuxADVCControl.m; sourceTree = "<group>"; };
|
00A555412C53B09F0055F452 /* LuxADVCControl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LuxADVCControl.m; sourceTree = "<group>"; };
|
||||||
00C5EEC62C52404B000553BF /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
00C5EEC62C52404B000553BF /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
@ -196,6 +199,7 @@
|
|||||||
00C5EECA2C527F59000553BF /* LuxADManager */ = {
|
00C5EECA2C527F59000553BF /* LuxADManager */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
00C5EEC62C52404B000553BF /* GoogleService-Info.plist */,
|
||||||
00C5EECB2C527F71000553BF /* LuxADManager.h */,
|
00C5EECB2C527F71000553BF /* LuxADManager.h */,
|
||||||
00C5EECC2C527F71000553BF /* LuxADManager.m */,
|
00C5EECC2C527F71000553BF /* LuxADManager.m */,
|
||||||
00C5EECE2C5355BE000553BF /* LuxNetManager.h */,
|
00C5EECE2C5355BE000553BF /* LuxNetManager.h */,
|
||||||
@ -206,6 +210,8 @@
|
|||||||
00C5EED22C537155000553BF /* LuxADSuperVC.m */,
|
00C5EED22C537155000553BF /* LuxADSuperVC.m */,
|
||||||
00C5EED42C537DD7000553BF /* LuxADSSModeVC.h */,
|
00C5EED42C537DD7000553BF /* LuxADSSModeVC.h */,
|
||||||
00C5EED52C537DD7000553BF /* LuxADSSModeVC.m */,
|
00C5EED52C537DD7000553BF /* LuxADSSModeVC.m */,
|
||||||
|
002C2B972C5882E100A01117 /* AppDelegate+LuxAppDelegate.h */,
|
||||||
|
002C2B982C5882E100A01117 /* AppDelegate+LuxAppDelegate.m */,
|
||||||
);
|
);
|
||||||
path = LuxADManager;
|
path = LuxADManager;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -231,7 +237,6 @@
|
|||||||
057AF7922BF1E86F00078C98 /* HDwallpaper */ = {
|
057AF7922BF1E86F00078C98 /* HDwallpaper */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
00C5EEC62C52404B000553BF /* GoogleService-Info.plist */,
|
|
||||||
75CC6F9A2C46498C0013FB06 /* Tool */,
|
75CC6F9A2C46498C0013FB06 /* Tool */,
|
||||||
0004D8992C36442700B3E467 /* Net */,
|
0004D8992C36442700B3E467 /* Net */,
|
||||||
0004D8822C35349200B3E467 /* WallPapaerADManager */,
|
0004D8822C35349200B3E467 /* WallPapaerADManager */,
|
||||||
@ -442,6 +447,7 @@
|
|||||||
files = (
|
files = (
|
||||||
057AF7AE2BF1F13400078C98 /* AWM_OnePageViewController.m in Sources */,
|
057AF7AE2BF1F13400078C98 /* AWM_OnePageViewController.m in Sources */,
|
||||||
057AF7B72BF1F14900078C98 /* AWM_ForMyViewController.m in Sources */,
|
057AF7B72BF1F14900078C98 /* AWM_ForMyViewController.m in Sources */,
|
||||||
|
002C2B992C5882E100A01117 /* AppDelegate+LuxAppDelegate.m in Sources */,
|
||||||
057AF7BA2BF1F73700078C98 /* AWM_SearchViewController.m in Sources */,
|
057AF7BA2BF1F73700078C98 /* AWM_SearchViewController.m in Sources */,
|
||||||
057AF7B12BF1F13A00078C98 /* AWM_HotViewController.m in Sources */,
|
057AF7B12BF1F13A00078C98 /* AWM_HotViewController.m in Sources */,
|
||||||
75CC6FA02C464ABF0013FB06 /* CircularProgressView.m in Sources */,
|
75CC6FA02C464ABF0013FB06 /* CircularProgressView.m in Sources */,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user