Prechádzať zdrojové kódy

国内广告sdk commit

xieguangming 3 rokov pred
rodič
commit
9c54a1a2e9

+ 9 - 10
NatureSDK/XenonDemo/AppDelegate.m

@@ -52,20 +52,19 @@
 //    T(self, application, launchOptions);
     
     //
-    [XenonSDK.sharedSDK initWithParameter:@"20387|1105|673842&gfqkhIOS_IOS_0001" complete:^(NSError * error) {
+    [XenonSDK.sharedSDK initWithParameter:@"20387|1105|673842&gfqkhIOS_IOS_0001" complete:^(NSError * error1) {
         //检查是否有漏单
         //[XenonSDK.sharedSDK checkOrderStatus];
         //登录
-        
-        [XenonSDK.sharedSDK hAutoWithComplete:^(id user, NSError *error) {
+        if (error1 == nil) {
+            [XenonSDK.sharedSDK hAutoWithComplete:^(id user, NSError *error) {
+                NSLog(@"user==%@",user);
+                NSLog(@"自动登录error==%@",error);
+            }];
+        }else{
+            NSLog(@"SDK初始化失败,error1==%@",error1);
             
-            
-            if(error == nil){
-                NSLog(@"登录成功,user==%@",user);
-            }else{
-                NSLog(@"自动登录:error=%@",error);
-            }
-        }];
+        }
     }];
     
     

+ 3 - 10
NatureSDK/XenonDemo/ViewController.m

@@ -188,20 +188,13 @@
 
 - (IBAction)login:(id)sender {
     
-//    [XenonSDK.sharedSDK loginWithComplete:^(id user, NSError * error) {
-//        NSLog(@"登录成功返回结果%@:=========",user);
-//    }];
-    
-    [XenonSDK.sharedSDK hAutoWithComplete:^(id user, NSError *error) {
+    [XenonSDK.sharedSDK loginWithComplete:^(id user, NSError * error) {
         
         
-        if(error == nil){
-            NSLog(@"登录成功,user==%@",user);
-        }else{
-            NSLog(@"自动登录:error=%@",error);
-        }
+        NSLog(@"登录成功返回结果%@:=========",user);
     }];
     
+    
 }
 
 - (IBAction)logout:(id)sender {

+ 3 - 3
NatureSDK/XenonSDK.xcodeproj/project.pbxproj

@@ -2065,9 +2065,9 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULE_DEBUGGING = YES;
 				CODE_SIGN_ENTITLEMENTS = NatureDemo/NatureDemo.entitlements;
-				CODE_SIGN_IDENTITY = "iPhone Developer";
+				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Manual;
-				DEVELOPMENT_TEAM = V6M5WAVJ3A;
+				DEVELOPMENT_TEAM = "";
 				ENABLE_BITCODE = NO;
 				"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
 				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@@ -2091,7 +2091,7 @@
 				);
 				PRODUCT_BUNDLE_IDENTIFIER = com.eyou.gfqkh;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				PROVISIONING_PROFILE_SPECIFIER = gfqkh_dev1;
+				PROVISIONING_PROFILE_SPECIFIER = "";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "";
 			};

BIN
NatureSDK/XenonSDK.xcworkspace/xcuserdata/fq.xcuserdatad/UserInterfaceState.xcuserstate


+ 44 - 12
NatureSDK/XenonSDK.xcworkspace/xcuserdata/fq.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -19,31 +19,63 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "523B46BD-EC03-4F67-8F1E-F3E39DC1D4E1"
+            uuid = "4F34BEB3-CC30-4F06-8BD4-CFFD5B64152B"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "XenonDemo/ViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "193"
+            endingLineNumber = "193"
+            landmarkName = "-login:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "508EEA05-54BE-441D-845E-8BF5E7DEEA1E"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "XenonSDK/XenonSDK.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "609"
-            endingLineNumber = "609"
-            landmarkName = "-hAutoWithComplete:"
+            startingLineNumber = "350"
+            endingLineNumber = "350"
+            landmarkName = "-logoutWithComplete:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "B8FFC37A-A6CB-4924-B4F0-58EBBDECBEFF"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "XenonSDK/XenonSDK.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "807"
+            endingLineNumber = "807"
+            landmarkName = "-setUser:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "EB79EEDF-38F7-4F3C-AE97-BEC520C26ED1"
+            uuid = "F8BC4CB7-6F77-442E-86A7-1FF5E70FE782"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "XenonSDK/XenonSDK.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "598"
-            endingLineNumber = "598"
+            startingLineNumber = "597"
+            endingLineNumber = "597"
             landmarkName = "-hAutoWithComplete:"
             landmarkType = "7">
          </BreakpointContent>
@@ -51,16 +83,16 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "475C5FE4-A562-40A2-A748-7AA87F342F0C"
+            uuid = "3FE8BF0A-7171-42E9-A508-B99954B4035A"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "XenonDemo/ViewController.m"
+            filePath = "XenonSDK/XenonSDK.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "197"
-            endingLineNumber = "197"
-            landmarkName = "-login:"
+            startingLineNumber = "608"
+            endingLineNumber = "608"
+            landmarkName = "-hAutoWithComplete:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 14 - 16
NatureSDK/XenonSDK/Supporting Files/XenonSDK-Export.h

@@ -137,49 +137,47 @@
 //3.2 打开全屏广告
 -(void)openBUDFullScreenVideoAd:(NSString *)adName callback:(void (^)(BOOL))callback;
 
-
-//新插屏广告(新增)
--(void)openBUDNewInterstitialAd:(NSString *)adName  callback:(void (^)(BOOL))callback;
-
 //3.3 打开开屏广告
 -(void)openBUDSplashAd:(NSString *)adName callback:(void (^)(BOOL))callback;
 
+//3.4.1 打开新插屏广告(新增)
+-(void)openBUDNewInterstitialAd:(NSString *)adName  callback:(void (^)(BOOL))callback;
 
-
-//3.4 打开插屏广告
+//3.4.2 打开旧版插屏广告
 -(void)openBUDInterstitialAd:(NSString *)adName width:(CGFloat)w Height:(CGFloat)h callback:(void (^)(BOOL))callback;
 
 //3.5 打开视频激励广告
 -(void)openBUDExpressRewardedVideoAd:(NSString *)adName callback:(void (^)(BOOL,BOOL))callback;
 
-//3.6.1 打开(模板)Banner广告
+//3.6 打开(模板)Banner广告
 -(void)openBUDNativeBannerAd:(NSString *)adName WithX:(CGFloat)x Y:(CGFloat)y  Width:(CGFloat)w Height:(CGFloat)h callback:(void (^)(BOOL))callback;
 
-//3.6.2 关闭Banner广告
+//3.7 关闭Banner广告
 -(void)closeBUDBannerAd:(NSString *)adName;
 
-//3.7 打开原生广告
+//3.8 打开原生广告
 -(void)openBUDNativeAd:(NSString *)adName WidthCGRect:(CGRect)rect BUSize:(NSInteger)size callback:(void (^)(BOOL))callback;
 
-//================4.优量惠广告================/
+//================4.优量汇广告================/
+//4.1 init
 -(void)YLHAdSDKinit;
 
-//4.1 打开开屏广告(视频V+)
+//4.2 打开开屏广告(视频V+)
 -(void)openYLHSplashAd:(NSString *)adName supportZoomoutView:(BOOL)flag callback:(void (^)(BOOL))callback;
 
-//4.2 打开插屏半屏广告
+//4.3 打开插屏半屏广告
 -(void)openYLHInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))callback;
 
-//4.3 打开全屏广告
+//4.4 打开全屏广告
 -(void)openYLHFullScreenAd:(NSString *)adName callback:(void (^)(BOOL))callback;
 
-//4.4 打开视频激励广告
+//4.5 打开视频激励广告
 -(void)openYLHExpressRewardedVideoAd:(NSString *)adName callback:(void (^)(BOOL,BOOL))callback;
 
-//4.5 打开横幅广告
+//4.6 打开横幅广告
 -(void)openYLHExpressBannerAd:(NSString *)adName callback:(void (^)(BOOL))callback;
 
-//4.6 打开原生广告
+//4.7 打开原生广告
 -(void)openYLHExpressNativeAdWithPlacementId:(NSString *)placementId AdName:(NSString *)adName Frame:(CGRect)rect callback:(void (^)(BOOL))callback;
 
 

+ 3 - 4
NatureSDK/XenonSDK/XenonSDK.m

@@ -591,10 +591,9 @@
 ///自动登录
 - (void)hAutoWithComplete:(void (^)(id user, NSError* error))complete {
     [XSNetwork showHudLoading];
-    //XSUser* user1 = [XSDataCenter valueForKey:@"User.current"];
     
-    //PS:通过这种方式获取到的user有值不会为空,其他方法获取的值为空,不准确!!!
-    XSUser *user1 = self.user;
+    //获取上次保存的登录信息.
+    XSUser* user1 = [XSDataCenter valueForKey:@"User.current"];
     
     //未注册,
     if (user1.uid.length == 0) {
@@ -608,7 +607,7 @@
 
 
             [ws setUser:object];
-            XenonSDK.sharedSDK.user = object;
+            //XenonSDK.sharedSDK.user = object;
             [XSNetwork showHudSuccess:@"登录成功!"];
             complete(object,nil);
         }];

+ 41 - 0
README.md

@@ -0,0 +1,41 @@
+SDK version:1.0
+国内广告:(穿山甲, 优量汇,TopOn聚合平台)
+一、穿山甲广告
+1.1 sdk初始化
+1.2 打开全屏广告
+1.3 打开开屏广告
+1.4.1 打开新插屏广告
+1.4.2 打开旧插屏广告
+1.5 打开视频激励广告
+1.6 打开横幅广告
+1.7 关闭横幅广告
+1.8 打开原生广告
+
+二、优量汇广告
+2.1 sdk初始化
+2.2 打开开屏广告
+2.3 打开插屏(半屏)广告
+2.4 打开全屏广告
+2.5 打开视频激励广告
+2.6 打开横幅广告
+2.7 打开原生广告
+
+
+三、TopOn聚合广告
+3.1 sdk初始化
+3.2 打开开屏广告
+3.3 打开插屏广告
+3.4 打开横幅广告
+3.5 打开原生广告
+
+
+四、统计:(TalkingData SDK)
+1.TalkingData游戏运营统计
+2.TalkingData应用分析统计
+
+
+五、登录接口:
+1. 自动登录
+  
+
+

+ 40 - 0
功能介绍.txt

@@ -0,0 +1,40 @@
+SDK version:1.0
+国内广告:(穿山甲, 优量汇,TopOn聚合平台)
+一、穿山甲广告
+1.1 sdk初始化
+1.2 打开全屏广告
+1.3 打开开屏广告
+1.4.1 打开新插屏广告
+1.4.2 打开旧插屏广告
+1.5 打开视频激励广告
+1.6 打开横幅广告
+1.7 关闭横幅广告
+1.8 打开原生广告
+
+二、优量汇广告
+2.1 sdk初始化
+2.2 打开开屏广告
+2.3 打开插屏(半屏)广告
+2.4 打开全屏广告
+2.5 打开视频激励广告
+2.6 打开横幅广告
+2.7 打开原生广告
+
+
+三、TopOn聚合广告
+3.1 sdk初始化
+3.2 打开开屏广告
+3.3 打开插屏广告
+3.4 打开横幅广告
+3.5 打开原生广告
+
+
+四、统计:(TalkingData SDK)
+1.TalkingData游戏运营统计
+2.TalkingData应用分析统计
+
+
+五、登录接口:
+1. 自动登录
+  
+