Ver código fonte

feat:替换google Facebook 配置

“wangdongchao” 1 ano atrás
pai
commit
1857ef5a81

+ 18 - 8
Asteria.xcodeproj/project.pbxproj

@@ -229,6 +229,7 @@
 		8810F5A22BFF448C00346FD4 /* ASMyCartNoDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5A12BFF448C00346FD4 /* ASMyCartNoDataView.m */; };
 		8810F5A82C01849C00346FD4 /* ASGoodsReviewFootCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */; };
 		8810F5AB2C045FD600346FD4 /* ToolStripePayment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5AA2C045FD600346FD4 /* ToolStripePayment.swift */; };
+		884A49EF2C36896E001B8449 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 884A49EE2C36896E001B8449 /* GoogleService-Info.plist */; };
 		88516B6E2C12E51600F2E396 /* ASLoginBindingC.m in Sources */ = {isa = PBXBuildFile; fileRef = 88516B6D2C12E51600F2E396 /* ASLoginBindingC.m */; };
 		8C24ECE114420CDEE7B9B22B /* Pods_Asteria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54DCE8001991D89B696E7D44 /* Pods_Asteria.framework */; };
 		9A1247942A1B082300126226 /* Fuction_Tool.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A1247932A1B082300126226 /* Fuction_Tool.m */; };
@@ -809,6 +810,7 @@
 		8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsReviewFootCell.m; sourceTree = "<group>"; };
 		8810F5A92C045FD600346FD4 /* Asteria-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Asteria-Bridging-Header.h"; sourceTree = "<group>"; };
 		8810F5AA2C045FD600346FD4 /* ToolStripePayment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolStripePayment.swift; sourceTree = "<group>"; };
+		884A49EE2C36896E001B8449 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
 		88516B6C2C12E51600F2E396 /* ASLoginBindingC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASLoginBindingC.h; sourceTree = "<group>"; };
 		88516B6D2C12E51600F2E396 /* ASLoginBindingC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASLoginBindingC.m; sourceTree = "<group>"; };
 		9A1247922A1B082300126226 /* Fuction_Tool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fuction_Tool.h; sourceTree = "<group>"; };
@@ -1545,6 +1547,7 @@
 				817244A929F3B2EE005FA9C9 /* Assets.xcassets */,
 				817244AB29F3B2EE005FA9C9 /* LaunchScreen.storyboard */,
 				817244AE29F3B2EE005FA9C9 /* Info.plist */,
+				884A49EE2C36896E001B8449 /* GoogleService-Info.plist */,
 				817244AF29F3B2EE005FA9C9 /* main.m */,
 			);
 			path = Asteria;
@@ -2779,6 +2782,7 @@
 				814F5D0E2A11B76F003847A9 /* Roboto-BlackItalic.ttf in Resources */,
 				9A3F5CB22B3BF63A00DDB6A7 /* Goods.xcassets in Resources */,
 				814F5D072A11B76F003847A9 /* Roboto-Regular.ttf in Resources */,
+				884A49EF2C36896E001B8449 /* GoogleService-Info.plist in Resources */,
 				817244AD29F3B2EE005FA9C9 /* LaunchScreen.storyboard in Resources */,
 				9AD6A53E2A120CC3001DE3D9 /* Login.xcassets in Resources */,
 				814F5D0D2A11B76F003847A9 /* LICENSE.txt in Resources */,
@@ -3355,11 +3359,14 @@
 				CODE_SIGN_ENTITLEMENTS = Asteria/Asteria.entitlements;
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = BUGL3DWWB7;
+				DEVELOPMENT_TEAM = 6749KGSMFB;
 				GCC_PREFIX_HEADER = "$(SRCROOT)/Asteria/PreFixHeader.h";
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = Asteria/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = Asteria;
+				INFOPLIST_KEY_NSCameraUsageDescription = "\"Asteria\"Your consent is required to access the camera.";
+				INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "\"Asteria\"Your consent is required to access the album.";
+				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "\"Asteria\"Your consent is required to access the album.";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
 				INFOPLIST_KEY_UIMainStoryboardFile = "";
@@ -3372,7 +3379,7 @@
 				);
 				MARKETING_VERSION = 1.0;
 				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_BUNDLE_IDENTIFIER = com.info.LYAsteria.Asteria;
+				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
 				SWIFT_OBJC_BRIDGING_HEADER = "Asteria/Fuction/Cart/PayManager/Asteria-Bridging-Header.h";
@@ -3394,11 +3401,14 @@
 				CODE_SIGN_ENTITLEMENTS = Asteria/Asteria.entitlements;
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = BUGL3DWWB7;
+				DEVELOPMENT_TEAM = 6749KGSMFB;
 				GCC_PREFIX_HEADER = "$(SRCROOT)/Asteria/PreFixHeader.h";
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = Asteria/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = Asteria;
+				INFOPLIST_KEY_NSCameraUsageDescription = "\"Asteria\"Your consent is required to access the camera.";
+				INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "\"Asteria\"Your consent is required to access the album.";
+				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "\"Asteria\"Your consent is required to access the album.";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
 				INFOPLIST_KEY_UIMainStoryboardFile = "";
@@ -3410,7 +3420,7 @@
 					"@executable_path/Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = com.info.LYAsteria.Asteria;
+				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
 				SWIFT_OBJC_BRIDGING_HEADER = "Asteria/Fuction/Cart/PayManager/Asteria-Bridging-Header.h";
@@ -3426,7 +3436,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = BUGL3DWWB7;
+				DEVELOPMENT_TEAM = 6749KGSMFB;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
@@ -3437,7 +3447,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = com.info.LYAsteria.Asteria.NotificationServiceExtension;
+				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app.NotificationServiceExtension;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SKIP_INSTALL = YES;
@@ -3453,7 +3463,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = BUGL3DWWB7;
+				DEVELOPMENT_TEAM = 6749KGSMFB;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
@@ -3464,7 +3474,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = com.info.LYAsteria.Asteria.NotificationServiceExtension;
+				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app.NotificationServiceExtension;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SKIP_INSTALL = YES;

+ 5 - 0
Asteria/ASUI/SimpleBase/ASBaseViewController.m

@@ -136,6 +136,11 @@
 }
 
 - (void)popAndToLogin {
+    
+    if (self.navigationController != nil) {
+        [self.navigationController popToRootViewControllerAnimated:false];
+    }
+    
     QMUITabBarViewController *tabVC = (QMUITabBarViewController *)((AppDelegate *)UIApplication.sharedApplication.delegate).window.rootViewController;
     
     tabVC.selectedIndex = 0;

+ 6 - 2
Asteria/ASUI/SizeDefine.h

@@ -10,8 +10,12 @@
 
 #import "LYTools.h"
 
-#define Facebook_AppID  @"698496945214003"
-#define Google_clientID @"288779326635-d24uma05320uitu5dr62mdtltnsf62c8.apps.googleusercontent.com"
+//#define Facebook_AppID  @"698496945214003"
+#define Facebook_AppID  @"1253597085440260"
+
+//#define Google_clientID @"288779326635-d24uma05320uitu5dr62mdtltnsf62c8.apps.googleusercontent.com"
+#define Google_clientID @"203797423430-b04oap5s9qsgrg8fnsjnu9cntbceqrej.apps.googleusercontent.com"
+
 
 #define serviceEmailAdr @"server@asteria.com"
 #define mailServiceUrlStr ([NSString stringWithFormat:@"mailto:%@", serviceEmailAdr])

+ 1 - 1
Asteria/Fuction/Login/V/LoginThirdAuthV.m

@@ -254,7 +254,7 @@
             return;
         }
 
-        NSString *name = user.profile.name;
+//        NSString *name = user.profile.name;
         NSString *givenName = user.profile.givenName;
         NSString *familyName = user.profile.familyName;
         NSMutableDictionary *paramsDic= [NSMutableDictionary dictionary];

+ 2 - 1
Asteria/Fuction/Login/VC/ASLoginBindingC.m

@@ -64,7 +64,8 @@
     if (self.bindFinishBlock) {
         self.bindFinishBlock(parDIc);
         
-        [self dismissViewControllerAnimated:YES completion:nil];
+        [self.navigationController popViewControllerAnimated:YES];
+//        [self dismissViewControllerAnimated:YES completion:nil];
     }
 }
 

+ 25 - 12
Asteria/Fuction/Login/VC/AS_LoginC.m

@@ -174,24 +174,36 @@
 //获取用户是否绑定过邮箱
 - (void)requestIsBindEmail:(NSDictionary *)info{
     
+    NSDictionary *param = @{@"identifier":info[@"identifier"],
+                            @"type":self.thirdLoginParam[@"hauth_done"]};
+    
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
     K_WEAK_SELF;
-    [ASNetTools.shared postWithPath:userVerifyBindEmailUrl param:@{@"identifier":info[@"identifier"], @"type":self.thirdLoginParam[@"hauth_done"]} success:^(id _Nonnull json) {
+    [ASNetTools.shared formData_postWithPath:userVerifyBindEmailUrl param:param success:^(id _Nonnull json) {
         K_STRONG_SELF;
         [MBProgressHUD hideHUDForView:self.view animated:YES];
         
-        ASLoginBindingC *bindVC = [[ASLoginBindingC alloc] init];
-        bindVC.modalPresentationStyle = UIModalPresentationFullScreen;
-        K_WEAK_SELF;
-        bindVC.bindFinishBlock = ^(NSDictionary * _Nonnull bindInfo) {
-            K_STRONG_SELF;
-            NSString *userInfoStr = [bindInfo mj_JSONString];
+        BOOL isShowBind = [json boolValue];
+        if (isShowBind) {
+            ASLoginBindingC *bindVC = [[ASLoginBindingC alloc] init];
+//            bindVC.modalPresentationStyle = UIModalPresentationFullScreen;
+            K_WEAK_SELF;
+            bindVC.bindFinishBlock = ^(NSDictionary * _Nonnull bindInfo) {
+                K_STRONG_SELF;
+                NSString *userInfoStr = [bindInfo mj_JSONString];
+                [self.thirdLoginParam setObject:userInfoStr forKey:@"userInfo"];
+                
+                [self requestThirdLogin];
+            };
+            [self.navigationController pushViewController:bindVC animated:YES];
+//            [self presentViewController:bindVC animated:YES completion:nil];
+        } else {
+            NSDictionary *infoDic = @{@"identifier":info[@"identifier"]};
+            NSString *userInfoStr = [infoDic mj_JSONString];
             [self.thirdLoginParam setObject:userInfoStr forKey:@"userInfo"];
-            
             [self requestThirdLogin];
-        };
+        }
         
-        [self presentViewController:bindVC animated:YES completion:nil];
         
     } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
         K_STRONG_SELF;
@@ -199,6 +211,7 @@
         
         [self.view makeToast:msg duration:2 position:CSToastPositionCenter];
     }];
+
 }
 
 //三方登录接口调用
@@ -256,7 +269,7 @@
 -(EamilTFmatchV *)xxx_emailTFV{
     if (!_xxx_emailTFV) {
         _xxx_emailTFV = [[EamilTFmatchV alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
-//        _xxx_emailTFV.xxx_emailTF.text = @"845600348@qq.com";
+        _xxx_emailTFV.xxx_emailTF.text = @"845600348@qq.com";
     }
     return _xxx_emailTFV;
 }
@@ -265,7 +278,7 @@
 - (PassWordSecureBtnV *)xxx_passwordV {
     if (!_xxx_passwordV) {
         _xxx_passwordV = [[PassWordSecureBtnV alloc]initWithFrame:CGRectMake(20, CGRectGetMaxY(self.xxx_emailTFV.frame)+30, KScreenWidth-40, 50+20)];
-//        _xxx_passwordV.xxx_passwordTF.text = @"nuli322103";
+        _xxx_passwordV.xxx_passwordTF.text = @"nuli322103";
     }
     return _xxx_passwordV;
 }

+ 5 - 0
Asteria/Fuction/UserCenter/Setting/ASSettingViewController.m

@@ -205,8 +205,13 @@
     __weak typeof(self) weak_self = self;
     [ASNetTools.shared postWithPath:postLogOut param:@{} success:^(id _Nonnull json) {
         [MBProgressHUD hideHUDForView:weak_self.view animated:true];
+        
+        [DataUtil setLoginToken:@""];
+        [ASNetTools.shared updateEngine];
+                
         [weak_self popAndToLogin];
         
+        
     } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
         [MBProgressHUD hideHUDForView:weak_self.view animated:true];
         NSLog(@"err:%@",code);

+ 9 - 9
Asteria/Info.plist

@@ -8,10 +8,10 @@
 			<key>CFBundleTypeRole</key>
 			<string>Editor</string>
 			<key>CFBundleURLName</key>
-			<string></string>
+			<string>google</string>
 			<key>CFBundleURLSchemes</key>
 			<array>
-				<string>com.googleusercontent.apps.288779326635-d24uma05320uitu5dr62mdtltnsf62c8</string>
+				<string>com.googleusercontent.apps.203797423430-b04oap5s9qsgrg8fnsjnu9cntbceqrej</string>
 			</array>
 		</dict>
 		<dict>
@@ -21,7 +21,7 @@
 			<string>fb</string>
 			<key>CFBundleURLSchemes</key>
 			<array>
-				<string>fb698496945214003</string>
+				<string>fb1253597085440260</string>
 			</array>
 		</dict>
 		<dict>
@@ -130,13 +130,17 @@
 		</dict>
 	</array>
 	<key>FacebookAppID</key>
-	<string>698496945214003</string>
+	<string>1253597085440260</string>
 	<key>FacebookAutoLogAppEventsEnabled</key>
 	<true/>
 	<key>FacebookClientToken</key>
-	<string>25ed13854304577ecefe88f5a8610b44</string>
+	<string>6fb86be19cdd0863deb5bbe425d985fd</string>
 	<key>FacebookDisplayName</key>
 	<string>Asteria</string>
+	<key>GIDClientID</key>
+	<string>203797423430-b04oap5s9qsgrg8fnsjnu9cntbceqrej.apps.googleusercontent.com</string>
+	<key>ITSAppUsesNonExemptEncryption</key>
+	<false/>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>fbapi</string>
@@ -155,10 +159,6 @@
 		<string>klarna</string>
 		<string>klarnaconsent</string>
 	</array>
-	<key>GIDClientID</key>
-	<string>288779326635-d24uma05320uitu5dr62mdtltnsf62c8.apps.googleusercontent.com</string>
-	<key>ITSAppUsesNonExemptEncryption</key>
-	<false/>
 	<key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key>
 	<true/>
 	<key>NSCameraUsageDescription</key>