接入google登录

This commit is contained in:
cebgcontract 2022-09-07 19:43:44 +08:00
parent 94ea41d4be
commit 9dee3a2d73
10 changed files with 283 additions and 40 deletions

View File

@ -242,10 +242,46 @@ bool jsb_scanQRCode(se::State& s) {
} }
SE_BIND_FUNC(jsb_scanQRCode) SE_BIND_FUNC(jsb_scanQRCode)
bool jsb_signWithGoogle(se::State& s) {
const auto& args = s.args();
size_t argc = args.size();
if (argc >= 1) {
bool ok;
std::string funid;
ok = seval_to_std_string(args[0], &funid);
SE_PRECONDITION2(ok, false, "Error processing arguments");
NSString *nfunid = [NSString stringWithCString:funid.c_str() encoding:NSUTF8StringEncoding];
UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
[window.rootViewController signWithGoogle:nfunid];
return true;
}
return false;
}
SE_BIND_FUNC(jsb_signWithGoogle)
bool jsb_signOutGoogle(se::State& s) {
const auto& args = s.args();
size_t argc = args.size();
if (argc >= 1) {
bool ok;
std::string funid;
ok = seval_to_std_string(args[0], &funid);
SE_PRECONDITION2(ok, false, "Error processing arguments");
NSString *nfunid = [NSString stringWithCString:funid.c_str() encoding:NSUTF8StringEncoding];
UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
[window.rootViewController signOutGoogle:nfunid];
return true;
}
return false;
}
SE_BIND_FUNC(jsb_signOutGoogle)
bool jsb_register_walletevent_modules(se::Object* global) { bool jsb_register_walletevent_modules(se::Object* global) {
getOrCreatePlainObject_r("jsb", global, &__jsbObj); getOrCreatePlainObject_r("jsb", global, &__jsbObj);
__jsbObj->defineFunction("jcCallback", _SE(jsb_wallet_callback)); __jsbObj->defineFunction("jcCallback", _SE(jsb_wallet_callback));
__jsbObj->defineFunction("scanQRCode", _SE(jsb_scanQRCode)); __jsbObj->defineFunction("scanQRCode", _SE(jsb_scanQRCode));
__jsbObj->defineFunction("signWithGoogle", _SE(jsb_signWithGoogle));
__jsbObj->defineFunction("signOutGoogle", _SE(jsb_signOutGoogle));
return true; return true;
} }

View File

@ -14,5 +14,6 @@
+(void)toWallet:(NSString *)url; +(void)toWallet:(NSString *)url;
-(void)scanQRCode:(NSString *)funid title:(NSString *) title; -(void)scanQRCode:(NSString *)funid title:(NSString *) title;
-(void)signWithGoogle:(NSString *)funid;
-(void)signOutGoogle:(NSString *)funid;
@end @end

View File

@ -11,8 +11,11 @@
#import "QRCodeReaderDelegate.h" #import "QRCodeReaderDelegate.h"
#include <string> #include <string>
#include "WalletEvent.h" #include "WalletEvent.h"
#import <GoogleSignIn/GoogleSignIn.h>
@import GoogleSignIn;
static NSString * const kClientID =
@"165555585193-alshovj5m91vlmj8uuhb11e6msvq32gm.apps.googleusercontent.com";
@implementation UIViewController (Wallet) @implementation UIViewController (Wallet)
@ -52,36 +55,102 @@
}]; }];
[self presentViewController:vc animated:YES completion:NULL]; [self presentViewController:vc animated:YES completion:NULL];
}); });
} }
else { else {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Error" UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Error"
message:@"The camera is need to scan QR codes" message:@"The camera is need to scan QR codes"
preferredStyle:UIAlertControllerStyleAlert]; preferredStyle:UIAlertControllerStyleAlert];
//We add buttons to the alert controller by creating UIAlertActions: //We add buttons to the alert controller by creating UIAlertActions:
UIAlertAction *actionOk = [UIAlertAction actionWithTitle:@"Cancel" UIAlertAction *actionOk = [UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel style:UIAlertActionStyleCancel
handler: ^(UIAlertAction *action){ handler: ^(UIAlertAction *action){
NSLog(@"alert cancel pressed"); NSLog(@"alert cancel pressed");
}]; //You can use a block here to handle a press on this button }]; //You can use a block here to handle a press on this button
// //
UIAlertAction *setting = [UIAlertAction actionWithTitle:@"Setting" UIAlertAction *setting = [UIAlertAction actionWithTitle:@"Setting"
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler: ^(UIAlertAction *action){ handler: ^(UIAlertAction *action){
NSLog(@"setting pressed"); NSLog(@"setting pressed");
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]){ if ([[UIApplication sharedApplication] canOpenURL:url]){
[[UIApplication sharedApplication] openURL:url]; [[UIApplication sharedApplication] openURL:url];
} }
}]; }];
[alertController addAction:actionOk]; [alertController addAction:actionOk];
[alertController addAction:setting]; [alertController addAction:setting];
[self presentViewController:alertController animated:YES completion:nil]; [self presentViewController:alertController animated:YES completion:nil];
}); });
std::string sresult = "{errcode: 1, errmsg: 'no camera permission'}"; std::string sresult = "{errcode: 1, errmsg: 'no camera permission'}";
WalletEvent::Emit(sfunid.c_str(), sresult.c_str()); WalletEvent::Emit(sfunid.c_str(), sresult.c_str());
} }
}
-(void)signToGoogle {
GIDConfiguration *_configuration = [[GIDConfiguration alloc] initWithClientID:kClientID];
[GIDSignIn.sharedInstance signInWithConfiguration:_configuration
presentingViewController:self
completion:^(GIDGoogleUser *user, NSError *error) {
if (error) {
NSLog(@"Status: Authentication error: %@", error);
}
[self refreshUserInfo];
[self refreshTokenID: user];
}];
}
-(void) refreshTokenID:(GIDGoogleUser *)user {
[user.authentication doWithFreshTokens:^(GIDAuthentication * _Nullable authentication,
NSError * _Nullable error) {
if (error) { return; }
if (authentication == nil) { return; }
NSString *idToken = authentication.idToken;
// Send ID token to backend (example below).
NSLog(@"idToken: %@", idToken);
}];
}
-(void)signWithGoogle:(NSString *)funid {
[GIDSignIn.sharedInstance restorePreviousSignInWithCompletion:^(GIDGoogleUser * _Nullable user,
NSError * _Nullable error) {
if (error) {
// Show the app's signed-out state.
[self signToGoogle];
} else {
// Show the app's signed-in state.
[self refreshTokenID: user];
}
}];
}
-(void)signOutGoogle:(NSString *)funid {
[GIDSignIn.sharedInstance signOut];
}
- (void)reportAuthStatus {
GIDGoogleUser *googleUser = [GIDSignIn.sharedInstance currentUser];
if (googleUser.authentication) {
NSLog(@"Status: Authenticated");
} else {
// To authenticate, use Google Sign-In button.
NSLog(@"Status: Not authenticated");
}
[self refreshUserInfo];
}
- (void)refreshUserInfo {
if (GIDSignIn.sharedInstance.currentUser.authentication == nil) {
return;
}
NSLog(@"email: %@", GIDSignIn.sharedInstance.currentUser.profile.email);
NSLog(@"username: %@", GIDSignIn.sharedInstance.currentUser.profile.name);
NSLog(@"userid: %@", GIDSignIn.sharedInstance.currentUser.userID);
NSLog(@"givenName: %@", GIDSignIn.sharedInstance.currentUser.profile.givenName);
NSLog(@"familyName: %@", GIDSignIn.sharedInstance.currentUser.profile.familyName);
NSLog(@"hostedDomain: %@", GIDSignIn.sharedInstance.currentUser.hostedDomain);
} }

View File

@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>NSCameraUsageDescription</key>
<string>The camera is need to scan QR codes</string>
<key>UIApplicationExitsOnSuspend</key>
<false/>
<key>CADisableMinimumFrameDuration</key> <key>CADisableMinimumFrameDuration</key>
<false/> <false/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
@ -24,6 +20,17 @@
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.1</string> <string>0.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.165555585193-alshovj5m91vlmj8uuhb11e6msvq32gm</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0</string> <string>0</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
@ -33,6 +40,10 @@
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true/> <true/>
</dict> </dict>
<key>NSCameraUsageDescription</key>
<string>The camera is need to scan QR codes</string>
<key>UIApplicationExitsOnSuspend</key>
<false/>
<key>UILaunchStoryboardName~ipad</key> <key>UILaunchStoryboardName~ipad</key>
<string>LaunchScreen-iPad</string> <string>LaunchScreen-iPad</string>
<key>UILaunchStoryboardName~iphone</key> <key>UILaunchStoryboardName~iphone</key>

6
Podfile Normal file
View File

@ -0,0 +1,6 @@
platform :ios, '9.0'
use_frameworks!
target 'Unity-iPhone' do
pod 'GoogleSignIn', :path => '/Users/zhl/Downloads/sourcecode/ios/GoogleSignIn-iOS/'
end

View File

@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
00000000008063A1000160D3 /* libiPhone-lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A1C72A0E8063A1000160D3 /* libiPhone-lib.a */; }; 00000000008063A1000160D3 /* libiPhone-lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A1C72A0E8063A1000160D3 /* libiPhone-lib.a */; };
03F528631B447098000F4FB8 /* Il2CppOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F528621B447098000F4FB8 /* Il2CppOptions.cpp */; }; 03F528631B447098000F4FB8 /* Il2CppOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F528621B447098000F4FB8 /* Il2CppOptions.cpp */; };
11D10E290B9C7BABBF144797 /* Pods_Unity_iPhone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B0207025791C682891488AD /* Pods_Unity_iPhone.framework */; };
1859EA9B19214E7B0022C3D3 /* MetalHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1859EA9A19214E7B0022C3D3 /* MetalHelper.mm */; }; 1859EA9B19214E7B0022C3D3 /* MetalHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1859EA9A19214E7B0022C3D3 /* MetalHelper.mm */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
35DD4E0BA71A8E4480E79156 /* LaunchScreen-iPhonePortrait.png in Resources */ = {isa = PBXBuildFile; fileRef = A03A47E096662C4BAF1D598F /* LaunchScreen-iPhonePortrait.png */; }; 35DD4E0BA71A8E4480E79156 /* LaunchScreen-iPhonePortrait.png in Resources */ = {isa = PBXBuildFile; fileRef = A03A47E096662C4BAF1D598F /* LaunchScreen-iPhonePortrait.png */; };
@ -242,6 +243,7 @@
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* ProductName.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProductName.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1D6058910D05DD3D006BFB54 /* ProductName.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProductName.app; sourceTree = BUILT_PRODUCTS_DIR; };
4A5A4C7E840E8BFA450026D8 /* IUnityGraphics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IUnityGraphics.h; path = Classes/Unity/IUnityGraphics.h; sourceTree = SOURCE_ROOT; }; 4A5A4C7E840E8BFA450026D8 /* IUnityGraphics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IUnityGraphics.h; path = Classes/Unity/IUnityGraphics.h; sourceTree = SOURCE_ROOT; };
4B0207025791C682891488AD /* Pods_Unity_iPhone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Unity_iPhone.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4C5D493DAA759EC62F5C506E /* LaunchScreen-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "LaunchScreen-iPhone.xib"; sourceTree = SOURCE_ROOT; }; 4C5D493DAA759EC62F5C506E /* LaunchScreen-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "LaunchScreen-iPhone.xib"; sourceTree = SOURCE_ROOT; };
4E090A331F27884B0077B28D /* StoreReview.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StoreReview.m; sourceTree = "<group>"; }; 4E090A331F27884B0077B28D /* StoreReview.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StoreReview.m; sourceTree = "<group>"; };
5623C57317FDCB0800090B9E /* Unity-iPhone Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "Unity-iPhone Tests.xctest"; path = ProductName.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5623C57317FDCB0800090B9E /* Unity-iPhone Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "Unity-iPhone Tests.xctest"; path = ProductName.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@ -260,6 +262,7 @@
5BAA49C5B6C1A0380C7D1843 /* IUnityGraphicsMetal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IUnityGraphicsMetal.h; path = Classes/Unity/IUnityGraphicsMetal.h; sourceTree = SOURCE_ROOT; }; 5BAA49C5B6C1A0380C7D1843 /* IUnityGraphicsMetal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IUnityGraphicsMetal.h; path = Classes/Unity/IUnityGraphicsMetal.h; sourceTree = SOURCE_ROOT; };
5BAD78601F2B5A59006103DE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 5BAD78601F2B5A59006103DE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
5C824C7597221AFF9649D008 /* LaunchScreen-iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchScreen-iPad.png"; sourceTree = SOURCE_ROOT; }; 5C824C7597221AFF9649D008 /* LaunchScreen-iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LaunchScreen-iPad.png"; sourceTree = SOURCE_ROOT; };
64D951E2E197936FF46DBB4A /* Pods-Unity-iPhone.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Unity-iPhone.debug.xcconfig"; path = "Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone.debug.xcconfig"; sourceTree = "<group>"; };
65204119BF754354B5DD4D0C /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; 65204119BF754354B5DD4D0C /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
7F36C10E13C5C673007FBDD9 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 7F36C10E13C5C673007FBDD9 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
7F36C10F13C5C673007FBDD9 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; 7F36C10F13C5C673007FBDD9 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
@ -353,6 +356,7 @@
AAC3E38C1A68945900F6174A /* RegisterFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterFeatures.h; sourceTree = "<group>"; }; AAC3E38C1A68945900F6174A /* RegisterFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterFeatures.h; sourceTree = "<group>"; };
AAFE69D019F187C200638316 /* UnityViewControllerListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnityViewControllerListener.h; sourceTree = "<group>"; }; AAFE69D019F187C200638316 /* UnityViewControllerListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnityViewControllerListener.h; sourceTree = "<group>"; };
AAFE69D119F187C200638316 /* UnityViewControllerListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UnityViewControllerListener.mm; sourceTree = "<group>"; }; AAFE69D119F187C200638316 /* UnityViewControllerListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UnityViewControllerListener.mm; sourceTree = "<group>"; };
B41A4D99DD320B1E06F51AE6 /* Pods-Unity-iPhone.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Unity-iPhone.release.xcconfig"; path = "Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone.release.xcconfig"; sourceTree = "<group>"; };
C6CC4EECB3BBA57C6F9A8015 /* IUnityInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IUnityInterface.h; path = Classes/Unity/IUnityInterface.h; sourceTree = SOURCE_ROOT; }; C6CC4EECB3BBA57C6F9A8015 /* IUnityInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IUnityInterface.h; path = Classes/Unity/IUnityInterface.h; sourceTree = SOURCE_ROOT; };
D52A8D9F288E6547006574E8 /* libuv_a.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libuv_a.a; sourceTree = "<group>"; }; D52A8D9F288E6547006574E8 /* libuv_a.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libuv_a.a; sourceTree = "<group>"; };
D5538BA3287E9908000BDFB6 /* WalletEvent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WalletEvent.cpp; sourceTree = "<group>"; }; D5538BA3287E9908000BDFB6 /* WalletEvent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WalletEvent.cpp; sourceTree = "<group>"; };
@ -492,10 +496,12 @@
D8A1C7240E80637F000160D3 /* RegisterMonoModules.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterMonoModules.cpp; path = Libraries/RegisterMonoModules.cpp; sourceTree = SOURCE_ROOT; }; D8A1C7240E80637F000160D3 /* RegisterMonoModules.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterMonoModules.cpp; path = Libraries/RegisterMonoModules.cpp; sourceTree = SOURCE_ROOT; };
D8A1C7250E80637F000160D3 /* RegisterMonoModules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterMonoModules.h; path = Libraries/RegisterMonoModules.h; sourceTree = SOURCE_ROOT; }; D8A1C7250E80637F000160D3 /* RegisterMonoModules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterMonoModules.h; path = Libraries/RegisterMonoModules.h; sourceTree = SOURCE_ROOT; };
D8A1C72A0E8063A1000160D3 /* libiPhone-lib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libiPhone-lib.a"; path = "Libraries/libiPhone-lib.a"; sourceTree = SOURCE_ROOT; }; D8A1C72A0E8063A1000160D3 /* libiPhone-lib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libiPhone-lib.a"; path = "Libraries/libiPhone-lib.a"; sourceTree = SOURCE_ROOT; };
DF09136C644F6C0DE6044DC4 /* Pods-Unity-iPhone.releaseforrunning.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Unity-iPhone.releaseforrunning.xcconfig"; path = "Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone.releaseforrunning.xcconfig"; sourceTree = "<group>"; };
FC0B20A11B7A4F0B00FDFC55 /* OnDemandResources.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OnDemandResources.mm; sourceTree = "<group>"; }; FC0B20A11B7A4F0B00FDFC55 /* OnDemandResources.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OnDemandResources.mm; sourceTree = "<group>"; };
FC3D7EBE16D2621600D1BD0D /* CrashReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrashReporter.h; sourceTree = "<group>"; }; FC3D7EBE16D2621600D1BD0D /* CrashReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrashReporter.h; sourceTree = "<group>"; };
FC85CCB916C3ED8000BAF7C7 /* CrashReporter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CrashReporter.mm; sourceTree = "<group>"; }; FC85CCB916C3ED8000BAF7C7 /* CrashReporter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CrashReporter.mm; sourceTree = "<group>"; };
FC85CCBA16C3ED8000BAF7C7 /* PLCrashReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PLCrashReporter.h; sourceTree = "<group>"; }; FC85CCBA16C3ED8000BAF7C7 /* PLCrashReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PLCrashReporter.h; sourceTree = "<group>"; };
FD1C45EFD70F96442D46270D /* Pods-Unity-iPhone.releaseforprofiling.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Unity-iPhone.releaseforprofiling.xcconfig"; path = "Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone.releaseforprofiling.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -530,6 +536,7 @@
D0DD4D8D8AC82F06A4331428 /* libil2cpp.a in Frameworks */, D0DD4D8D8AC82F06A4331428 /* libil2cpp.a in Frameworks */,
E9D340DABD2259166E8A82AF /* Metal.framework in Frameworks */, E9D340DABD2259166E8A82AF /* Metal.framework in Frameworks */,
D5F2D102287C092D003C2B62 /* libcocos2d.a in Frameworks */, D5F2D102287C092D003C2B62 /* libcocos2d.a in Frameworks */,
11D10E290B9C7BABBF144797 /* Pods_Unity_iPhone.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -576,6 +583,7 @@
910F4CC7BAC9F179C0C2F5D1 /* LaunchScreen-iPhoneLandscape.png */, 910F4CC7BAC9F179C0C2F5D1 /* LaunchScreen-iPhoneLandscape.png */,
90994FBFA981DC89AB1ADF90 /* LaunchScreen-iPad.xib */, 90994FBFA981DC89AB1ADF90 /* LaunchScreen-iPad.xib */,
5C824C7597221AFF9649D008 /* LaunchScreen-iPad.png */, 5C824C7597221AFF9649D008 /* LaunchScreen-iPad.png */,
B874123C858A9B88D7B58415 /* Pods */,
); );
name = CustomTemplate; name = CustomTemplate;
sourceTree = "<group>"; sourceTree = "<group>";
@ -606,6 +614,7 @@
56BCBA380FCF049A0030C3B2 /* SystemConfiguration.framework */, 56BCBA380FCF049A0030C3B2 /* SystemConfiguration.framework */,
830B5C100E5ED4C100C7819F /* UIKit.framework */, 830B5C100E5ED4C100C7819F /* UIKit.framework */,
65204119BF754354B5DD4D0C /* Metal.framework */, 65204119BF754354B5DD4D0C /* Metal.framework */,
4B0207025791C682891488AD /* Pods_Unity_iPhone.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -727,6 +736,17 @@
name = UnityAds; name = UnityAds;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
B874123C858A9B88D7B58415 /* Pods */ = {
isa = PBXGroup;
children = (
B41A4D99DD320B1E06F51AE6 /* Pods-Unity-iPhone.release.xcconfig */,
FD1C45EFD70F96442D46270D /* Pods-Unity-iPhone.releaseforprofiling.xcconfig */,
DF09136C644F6C0DE6044DC4 /* Pods-Unity-iPhone.releaseforrunning.xcconfig */,
64D951E2E197936FF46DBB4A /* Pods-Unity-iPhone.debug.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
D5AB1D2728BF782200AA6AFA /* QRCodeReaderViewController */ = { D5AB1D2728BF782200AA6AFA /* QRCodeReaderViewController */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -931,11 +951,13 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Unity-iPhone" */; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Unity-iPhone" */;
buildPhases = ( buildPhases = (
6CEA41FA163B3F3677EADF3F /* [CP] Check Pods Manifest.lock */,
1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588D0D05DD3D006BFB54 /* Resources */,
83D0C1FD0E6C8D7700EBCE5D /* CopyFiles */, 83D0C1FD0E6C8D7700EBCE5D /* CopyFiles */,
1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */, 1D60588F0D05DD3D006BFB54 /* Frameworks */,
033966F41B18B03000ECD701 /* ShellScript */, 033966F41B18B03000ECD701 /* ShellScript */,
3019DFB992AFEEDC432FD501 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -972,7 +994,7 @@
attributes = { attributes = {
TargetAttributes = { TargetAttributes = {
1D6058900D05DD3D006BFB54 = { 1D6058900D05DD3D006BFB54 = {
DevelopmentTeam = 8TB4N4YTJ3; DevelopmentTeam = 3M965CAG25;
ProvisioningStyle = Automatic; ProvisioningStyle = Automatic;
SystemCapabilities = { SystemCapabilities = {
com.apple.GameControllers.appletvos = { com.apple.GameControllers.appletvos = {
@ -998,6 +1020,7 @@
en, en,
); );
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
projectDirPath = ""; projectDirPath = "";
projectReferences = ( projectReferences = (
{ {
@ -1064,6 +1087,52 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"$PROJECT_DIR/MapFileParser.sh\""; shellScript = "\"$PROJECT_DIR/MapFileParser.sh\"";
}; };
3019DFB992AFEEDC432FD501 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AppAuth/AppAuth.framework",
"${BUILT_PRODUCTS_DIR}/GTMAppAuth/GTMAppAuth.framework",
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
"${BUILT_PRODUCTS_DIR}/GoogleSignIn/GoogleSignIn.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppAuth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMAppAuth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleSignIn.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6CEA41FA163B3F3677EADF3F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Unity-iPhone-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -1264,6 +1333,7 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = { 1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 64D951E2E197936FF46DBB4A /* Pods-Unity-iPhone.debug.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = ( ARCHS = (
@ -1274,13 +1344,14 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = 8TB4N4YTJ3; DEVELOPMENT_TEAM = 3M965CAG25;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
@ -1321,6 +1392,8 @@
OTHER_CPLUSPLUSFLAGS = ( OTHER_CPLUSPLUSFLAGS = (
"$(inherited)", "$(inherited)",
"$(OTHER_CFLAGS)", "$(OTHER_CFLAGS)",
"-fmodules",
"-fcxx-modules",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -1349,6 +1422,7 @@
}; };
1D6058950D05DD3E006BFB54 /* Release */ = { 1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = B41A4D99DD320B1E06F51AE6 /* Pods-Unity-iPhone.release.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = ( ARCHS = (
@ -1359,13 +1433,14 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
DEVELOPMENT_TEAM = 8TB4N4YTJ3; DEVELOPMENT_TEAM = 3M965CAG25;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_ENABLE_CPP_EXCEPTIONS = YES; GCC_ENABLE_CPP_EXCEPTIONS = YES;
@ -1403,6 +1478,8 @@
OTHER_CPLUSPLUSFLAGS = ( OTHER_CPLUSPLUSFLAGS = (
"$(inherited)", "$(inherited)",
"$(OTHER_CFLAGS)", "$(OTHER_CFLAGS)",
"-fmodules",
"-fcxx-modules",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -1560,6 +1637,7 @@
}; };
56E860811D6757FF00A1AB2B /* ReleaseForRunning */ = { 56E860811D6757FF00A1AB2B /* ReleaseForRunning */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = DF09136C644F6C0DE6044DC4 /* Pods-Unity-iPhone.releaseforrunning.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = ( ARCHS = (
@ -1570,6 +1648,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
@ -1577,7 +1656,7 @@
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 8TB4N4YTJ3; DEVELOPMENT_TEAM = 3M965CAG25;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_ENABLE_CPP_EXCEPTIONS = YES; GCC_ENABLE_CPP_EXCEPTIONS = YES;
@ -1615,6 +1694,8 @@
OTHER_CPLUSPLUSFLAGS = ( OTHER_CPLUSPLUSFLAGS = (
"$(inherited)", "$(inherited)",
"$(OTHER_CFLAGS)", "$(OTHER_CFLAGS)",
"-fmodules",
"-fcxx-modules",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -1715,6 +1796,7 @@
}; };
56E860841D67581C00A1AB2B /* ReleaseForProfiling */ = { 56E860841D67581C00A1AB2B /* ReleaseForProfiling */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = FD1C45EFD70F96442D46270D /* Pods-Unity-iPhone.releaseforprofiling.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = ( ARCHS = (
@ -1725,13 +1807,14 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
DEVELOPMENT_TEAM = 8TB4N4YTJ3; DEVELOPMENT_TEAM = 3M965CAG25;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_ENABLE_CPP_EXCEPTIONS = YES; GCC_ENABLE_CPP_EXCEPTIONS = YES;
@ -1769,6 +1852,8 @@
OTHER_CPLUSPLUSFLAGS = ( OTHER_CPLUSPLUSFLAGS = (
"$(inherited)", "$(inherited)",
"$(OTHER_CFLAGS)", "$(OTHER_CFLAGS)",
"-fmodules",
"-fcxx-modules",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Unity-iPhone.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -240,3 +240,20 @@ function scanQRCode(funId, title) {
} }
} }
function signWithGoogle(funId) {
try {
jsb.signWithGoogle(funId);
} catch(err) {
return JSON.stringify({errcode: 1, errmsg: err});
}
}
function signOutGoogle(funId) {
try {
jsb.signOutGoogle(funId);
return JSON.stringify({errcode: 0, data: 'success'});
} catch(err) {
return JSON.stringify({errcode: 1, errmsg: err});
}
}