优化fb日志上报
This commit is contained in:
parent
d79882f6af
commit
23f6445726
@ -33,7 +33,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#import <TikTokOpenSDK/TikTokOpenSDKApplicationDelegate.h>
|
#import <TikTokOpenSDK/TikTokOpenSDKApplicationDelegate.h>
|
||||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
@import FBSDKCoreKit;
|
||||||
@import FirebaseCore;
|
@import FirebaseCore;
|
||||||
|
|
||||||
// we assume that app delegate is never changed and we can cache it, instead of re-query UIApplication every time
|
// we assume that app delegate is never changed and we can cache it, instead of re-query UIApplication every time
|
||||||
@ -399,6 +399,9 @@ extern "C" void UnityCleanupTrampoline()
|
|||||||
[[TikTokOpenSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
[[TikTokOpenSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||||
[[FBSDKApplicationDelegate sharedInstance] application:application
|
[[FBSDKApplicationDelegate sharedInstance] application:application
|
||||||
didFinishLaunchingWithOptions:launchOptions];
|
didFinishLaunchingWithOptions:launchOptions];
|
||||||
|
if (@available(iOS 14.0, *)) {
|
||||||
|
[[FBSDKSettings sharedSettings] setIsAdvertiserTrackingEnabled:TRUE];
|
||||||
|
}
|
||||||
[FIRApp configure];
|
[FIRApp configure];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
@ -455,6 +458,7 @@ extern "C" void UnityCleanupTrampoline()
|
|||||||
_startUnityScheduled = true;
|
_startUnityScheduled = true;
|
||||||
[self performSelector: @selector(startUnity:) withObject: application afterDelay: 0];
|
[self performSelector: @selector(startUnity:) withObject: application afterDelay: 0];
|
||||||
}
|
}
|
||||||
|
[[FBSDKAppEvents shared] activateApp];
|
||||||
|
|
||||||
_didResignActive = false;
|
_didResignActive = false;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#import "UIViewController+Logger.h"
|
#import "UIViewController+Logger.h"
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import "NSString+Customer.h"
|
#import "NSString+Customer.h"
|
||||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
@import FBSDKCoreKit;
|
||||||
@import FirebaseAnalytics;
|
@import FirebaseAnalytics;
|
||||||
|
|
||||||
@implementation UIViewController (Logger)
|
@implementation UIViewController (Logger)
|
||||||
@ -42,6 +42,8 @@
|
|||||||
if ([NSString isStringEmpty:name]) {
|
if ([NSString isStringEmpty:name]) {
|
||||||
name = @"custom_event";
|
name = @"custom_event";
|
||||||
}
|
}
|
||||||
|
// NSLog(@"FacebookAdvertiserIDCollectionEnabled: %@", [[FBSDKSettings sharedSettings] isAdvertiserIDCollectionEnabled] ? @"TRUE" : @"FALSE" );
|
||||||
|
// NSLog(@"FacebookAdvertiserTrackingEnabled: %@", [[FBSDKSettings sharedSettings] isAdvertiserTrackingEnabled] ? @"TRUE" : @"FALSE" );
|
||||||
[FIRAnalytics logEventWithName: name parameters: jsonDict];
|
[FIRAnalytics logEventWithName: name parameters: jsonDict];
|
||||||
[[FBSDKAppEvents shared] logEvent: name parameters: jsonDict];
|
[[FBSDKAppEvents shared] logEvent: name parameters: jsonDict];
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#import "UIViewController+Share.h"
|
#import "UIViewController+Share.h"
|
||||||
#import <FBSDKShareKit/FBSDKShareKit.h>
|
@import FBSDKShareKit;
|
||||||
|
|
||||||
@implementation UIViewController (Share)
|
@implementation UIViewController (Share)
|
||||||
|
|
||||||
|
@ -17,9 +17,8 @@
|
|||||||
#import "NSString+Customer.h"
|
#import "NSString+Customer.h"
|
||||||
#import "NSData+Base64.h"
|
#import "NSData+Base64.h"
|
||||||
#import "AppleSignIn.h"
|
#import "AppleSignIn.h"
|
||||||
#import <FBSDKLoginKit/FBSDKLoginKit.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
@import FBSDKLoginKit;
|
||||||
@import GoogleSignIn;
|
@import GoogleSignIn;
|
||||||
|
|
||||||
static NSString * const kClientID =
|
static NSString * const kClientID =
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<key>FacebookAutoLogAppEventsEnabled</key>
|
<key>FacebookAutoLogAppEventsEnabled</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>FacebookAdvertiserIDCollectionEnabled</key>
|
<key>FacebookAdvertiserIDCollectionEnabled</key>
|
||||||
<false/>
|
<true/>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>fbapi</string>
|
<string>fbapi</string>
|
||||||
|
1
Podfile
1
Podfile
@ -4,6 +4,7 @@ use_frameworks!
|
|||||||
target 'Unity-iPhone' do
|
target 'Unity-iPhone' do
|
||||||
pod 'GoogleSignIn', :path => '/Users/zhl/Downloads/sourcecode/google/GoogleSignIn-iOS/'
|
pod 'GoogleSignIn', :path => '/Users/zhl/Downloads/sourcecode/google/GoogleSignIn-iOS/'
|
||||||
pod 'TikTokOpenSDK', '~> 5.0.14'
|
pod 'TikTokOpenSDK', '~> 5.0.14'
|
||||||
|
pod 'FBSDKCoreKit'
|
||||||
pod 'FBSDKLoginKit'
|
pod 'FBSDKLoginKit'
|
||||||
pod 'FBSDKShareKit'
|
pod 'FBSDKShareKit'
|
||||||
pod 'FirebaseAnalytics'
|
pod 'FirebaseAnalytics'
|
||||||
|
Binary file not shown.
@ -78,8 +78,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Wallet.mm"
|
filePath = "Classes_cocos/UIViewController+Wallet.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "175"
|
startingLineNumber = "174"
|
||||||
endingLineNumber = "175"
|
endingLineNumber = "174"
|
||||||
landmarkName = "-nativeCb:hasErr:dataStr:"
|
landmarkName = "-nativeCb:hasErr:dataStr:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -206,8 +206,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Logger.mm"
|
filePath = "Classes_cocos/UIViewController+Logger.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "45"
|
startingLineNumber = "47"
|
||||||
endingLineNumber = "45"
|
endingLineNumber = "47"
|
||||||
landmarkName = "-logEvent:"
|
landmarkName = "-logEvent:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -222,11 +222,59 @@
|
|||||||
filePath = "Classes/UnityAppController.mm"
|
filePath = "Classes/UnityAppController.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "402"
|
startingLineNumber = "405"
|
||||||
endingLineNumber = "402"
|
endingLineNumber = "405"
|
||||||
landmarkName = "-application:didFinishLaunchingWithOptions:"
|
landmarkName = "-application:didFinishLaunchingWithOptions:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "60486E7D-44D6-4425-917D-BA6C5FEB4D22"
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Wallet.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "193"
|
||||||
|
endingLineNumber = "193"
|
||||||
|
landmarkName = "-showPage:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "DB21E235-4B65-46EF-8B7D-A2478DF2AF6E"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Logger.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "45"
|
||||||
|
endingLineNumber = "45"
|
||||||
|
landmarkName = "-logEvent:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "972534CF-6961-4EBA-A8F7-0A0C0DBA257C"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Logger.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "41"
|
||||||
|
endingLineNumber = "41"
|
||||||
|
landmarkName = "-logEvent:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
@ -216,8 +216,8 @@ function showQRCode(funId, content) {
|
|||||||
|
|
||||||
function showWebPage(funId, url) {
|
function showWebPage(funId, url) {
|
||||||
try {
|
try {
|
||||||
// jsb.showWebPage(funId, url);
|
jsb.showWebPage(funId, url);
|
||||||
jsb.openURL(url);
|
// jsb.openURL(url);
|
||||||
return JSON.stringify({ errcode: 0, data: 1 });
|
return JSON.stringify({ errcode: 0, data: 1 });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return JSON.stringify({ errcode: 1, errmsg: err });
|
return JSON.stringify({ errcode: 1, errmsg: err });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user