Browse Source

内购备份

apple 5 years ago
parent
commit
c8ffc01a3b

BIN
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate


+ 30 - 3
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSearchViewController.m

@@ -254,7 +254,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
 
 
 - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
 - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
     //   message.body  --  Allowed types are NSNumber, NSString, NSDate, NSArray,NSDictionary, and NSNull.
     //   message.body  --  Allowed types are NSNumber, NSString, NSDate, NSArray,NSDictionary, and NSNull.
-    NSLog(@"原生收到了js发送过来的消息message.name = %@ message.body = %@",message.name,message.body);
+//    NSLog(@"原生收到了js发送过来的消息message.name = %@ message.body = %@",message.name,message.body);
     if ([message.name isEqualToString:@"loginByWeixin"]) {
     if ([message.name isEqualToString:@"loginByWeixin"]) {
         [self jsLoginByWeixin:message.body];
         [self jsLoginByWeixin:message.body];
     }else if ([message.name isEqualToString:@"share"]) {
     }else if ([message.name isEqualToString:@"share"]) {
@@ -310,7 +310,7 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     NSError *err = nil;
     NSError *err = nil;
     NSData *dataFromString = [prompt dataUsingEncoding:NSUTF8StringEncoding];
     NSData *dataFromString = [prompt dataUsingEncoding:NSUTF8StringEncoding];
     NSDictionary *paramdict = [NSJSONSerialization JSONObjectWithData:dataFromString options:NSJSONReadingMutableContainers error:&err];
     NSDictionary *paramdict = [NSJSONSerialization JSONObjectWithData:dataFromString options:NSJSONReadingMutableContainers error:&err];
-    NSLog(@"拦截prompt:%@",paramdict);
+//    NSLog(@"拦截prompt:%@",paramdict);
     if (!err){
     if (!err){
         NSString *type = [paramdict objectForKey:@"jsName"];
         NSString *type = [paramdict objectForKey:@"jsName"];
         if (type && [type isEqualToString:@"getUserToken"]) {
         if (type && [type isEqualToString:@"getUserToken"]) {
@@ -486,10 +486,37 @@ NSString *const new_AesKey_1 = @"mGlAgnIBB8bx2nch";
     
     
     //监听购买结果
     //监听购买结果
     [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
     [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
+    
+    
+    [self performSelector:@selector(rrrrrrr) withObject:nil afterDelay:5];
+}
+-(void)rrrrrrr {
+    //测试跳转抖音
+    NSURL *url = [NSURL URLWithString:@"snssdk1128://aweme/live"];
+    if ([[UIApplication sharedApplication] canOpenURL:url]) {
+      if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) {
+        //iOS 10.0+
+          NSLog(@"iOS 10+");
+          if (@available(iOS 10.0, *)) {
+              [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
+              }];
+          } else {
+              // Fallback on earlier versions
+              [[UIApplication sharedApplication] openURL:url];
+          }
+          [[UIApplication sharedApplication] openURL:url];
+     }else{
+         NSLog(@"iOS 2~10");
+         //iOS 2~10
+          [[UIApplication sharedApplication] openURL:url];
+     }
+    }else{
+        //一般是没有安装
+        NSLog(@"跳转下载app链接");
+    }
 }
 }
 
 
 
 
-
 -(void)bottomOneListening {
 -(void)bottomOneListening {
     if(self.tabBarController.selectedIndex == 0) {
     if(self.tabBarController.selectedIndex == 0) {
         [self judgeIsHiddenBottom];
         [self judgeIsHiddenBottom];

+ 1 - 0
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYNewSubViewController.m

@@ -818,6 +818,7 @@ NSString *const new_AesKey_2 = @"mGlAgnIBB8bx2nch";
 
 
 //拨打电话
 //拨打电话
 -(void)jsCallPhone:(NSDictionary *)dict {
 -(void)jsCallPhone:(NSDictionary *)dict {
+    
     NSString *phone = [NSString stringWithFormat:@"%@",dict[@"phone"]];
     NSString *phone = [NSString stringWithFormat:@"%@",dict[@"phone"]];
     NSMutableString *tel = [[NSMutableString alloc]initWithFormat:@"telprompt://%@",phone];
     NSMutableString *tel = [[NSMutableString alloc]initWithFormat:@"telprompt://%@",phone];
     dispatch_async(dispatch_get_main_queue(), ^{
     dispatch_async(dispatch_get_main_queue(), ^{

+ 13 - 0
ios/JianYuIOS/JianYuIOS/Info.plist

@@ -54,6 +54,16 @@
 				<string>jianyuiosapp</string>
 				<string>jianyuiosapp</string>
 			</array>
 			</array>
 		</dict>
 		</dict>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string></string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>snssdk1128</string>
+			</array>
+		</dict>
 	</array>
 	</array>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
 	<string>$(CURRENT_PROJECT_VERSION)</string>
 	<string>$(CURRENT_PROJECT_VERSION)</string>
@@ -70,6 +80,9 @@
 		<string>weixin</string>
 		<string>weixin</string>
 		<string>mqqapi</string>
 		<string>mqqapi</string>
 		<string>mqq</string>
 		<string>mqq</string>
+		<string>douyinopensdk</string>
+		<string>douyinsharesdk</string>
+		<string>snssdk1128</string>
 	</array>
 	</array>
 	<key>LSRequiresIPhoneOS</key>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<true/>