ios端google;修改ios打包时pod数据源为清华

This commit is contained in:
Caiyanpeng committed 2022-01-20 16:30:58 +08:00
1 parent 58a8233697
commit 7bb5bafbd2
14 files changed
+143 -9

No files matched your search

@@ -0,0 +1,36 @@
<?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>CLIENT_ID</key>
<string>492440200766-spo9287smn7epmlarib2pek9kficsq86.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.492440200766-spo9287smn7epmlarib2pek9kficsq86</string>
<key>ANDROID_CLIENT_ID</key>
<string>492440200766-0fqskhb6ebtag1hlqpo7fo93cuaarsl6.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyCapHL0ck1BuzfS2Drbup4VRO0jf_9fp_U</string>
<key>GCM_SENDER_ID</key>
<string>492440200766</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.ZhiXingPai.PowerFun</string>
<key>PROJECT_ID</key>
<string>powerfun-c1019</string>
<key>STORAGE_BUCKET</key>
<string>powerfun-c1019.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:492440200766:ios:87037cb11ad738c0e4d36f</string>
</dict>
</plist>
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8f722ab35ffa939418fdbda7f0793bc7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -14,6 +14,8 @@
#import <FBSDKShareKit/FBSDKShareKit.h>
#import <FBSDKGamingServicesKit/FBSDKGamingServicesKit.h>
#import <Foundation/NSJSONSerialization.h>
@import Firebase;
@import GoogleSignIn;
extern void UnitySendMessage(const char *,const char *,const char *);
@interface IOSWechatController : UnityAppController<WXApiDelegate>
@@ -49,6 +51,12 @@ options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
return [WXApi handleOpenURL:url delegate:self];
}
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//google登录
[FIRApp configure];
}
- (void)onResp:(BaseResp *)resp
{
NSLog(@"47");
+15
View File
@@ -0,0 +1,15 @@
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'UnityFramework' do
pod 'FBSDKCoreKit', '~> 11.0'
pod 'FBSDKCoreKit_Basics', '~> 11.0'
pod 'FBSDKGamingServicesKit', '~> 11.0'
pod 'FBSDKLoginKit', '~> 11.0'
pod 'FBSDKShareKit', '~> 11.0'
pod 'Firebase/Auth'
pod 'GoogleSignIn'
end
target 'Unity-iPhone' do
end
use_frameworks!
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f168de8faf0b96c4f8bf9708edb05015
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+4 -1
View File
@@ -1,4 +1,7 @@
# import <AuthenticationServices/AuthenticationServices.h>
#import <AuthenticationServices/AuthenticationServices.h>
@import Firebase;
@import GoogleSignIn;
#import "UnityAppController.h"
@interface AppleAuth: NSObject<ASAuthorizationControllerDelegate,ASAuthorizationProvider>
- (void)authorizationAppleID;
+25
View File
@@ -40,7 +40,27 @@ static AppleAuth * _appleAuth;
[authorizationController performRequests];
}
}
- (void) authorizationGoogleID{
NSLog(@"cypgoogle");
GIDConfiguration *config = [[GIDConfiguration alloc] initWithClientID:[FIRApp defaultApp].options.clientID];
__weak __auto_type weakSelf = self;
UnityAppController * root = (UnityAppController*)[UIApplication sharedApplication].delegate;
[GIDSignIn.sharedInstance signInWithConfiguration:config presentingViewController:root.rootViewController callback:^(GIDGoogleUser * _Nullable user, NSError * _Nullable error) {
__auto_type strongSelf = weakSelf;
if (strongSelf == nil) { return; }
if (error == nil) {
GIDAuthentication *authentication = user.authentication;
UnitySendMessage("LoginPanel", "OnMobileGoogleLoginResp", [NSString stringWithFormat:@"true;%@|%@",user.userID,authentication.idToken ].UTF8String);
// FIRAuthCredential *credential =
// [FIRGoogleAuthProvider credentialWithIDToken:authentication.idToken
// accessToken:authentication.accessToken];
// ...
} else {
// ...
}
}];
}
#pragma mark- ASAuthorizationControllerDelegate
// 授权成功
- (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization API_AVAILABLE(ios(13.0)) {
@@ -121,4 +141,9 @@ static AppleAuth * _appleAuth;
void authorizationAppleID(){
AppleAuth * a = [AppleAuth instance];
[a authorizationAppleID];
}
void authorizationGoogleID(){
AppleAuth * a = [AppleAuth instance];
[a authorizationGoogleID];
}