앱스플라이어 SDK 추가
This commit is contained in:
parent
dfac57ee23
commit
d019f44a0e
|
@ -5,6 +5,8 @@
|
||||||
<key>aps-environment</key>
|
<key>aps-environment</key>
|
||||||
<string>development</string>
|
<string>development</string>
|
||||||
<key>com.apple.developer.associated-domains</key>
|
<key>com.apple.developer.associated-domains</key>
|
||||||
<array/>
|
<array>
|
||||||
|
<string>applinks:voiceon-test.onelink.me</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"originHash" : "7e8c8a802e9b50376703e11841c54f22c1f47d510e9210bd5c4a9d52ea36c5db",
|
"originHash" : "e2b266c250e8dfef68a5b39f94cb7106349e1dc72b7b5f653706ce88e5d8bba3",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "abseil-cpp-binary",
|
"identity" : "abseil-cpp-binary",
|
||||||
|
@ -46,6 +46,15 @@
|
||||||
"version" : "10.19.1"
|
"version" : "10.19.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"identity" : "appsflyerframework-static",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/AppsFlyerSDK/AppsFlyerFramework-Static",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "2369fd501848792ec268dd47d3105bc42f9203da",
|
||||||
|
"version" : "6.16.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"identity" : "facebook-ios-sdk",
|
"identity" : "facebook-ios-sdk",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
|
|
|
@ -2,6 +2,33 @@
|
||||||
<!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>NSAdvertisingAttributionReportEndpoint</key>
|
||||||
|
<string>https://appsflyer-skadnetwork.com/</string>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>fb608674328645232</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>voiceon-test</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>FacebookAppID</key>
|
||||||
|
<string>608674328645232</string>
|
||||||
|
<key>FacebookAutoLogAppEventsEnabled</key>
|
||||||
|
<true/>
|
||||||
|
<key>FacebookClientToken</key>
|
||||||
|
<string>3775e6ea83236a685d264b6c5a1bbb4d</string>
|
||||||
|
<key>FacebookDisplayName</key>
|
||||||
|
<string>보이스온 - Test1</string>
|
||||||
<key>FirebaseAppDelegateProxyEnabled</key>
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>GADApplicationIdentifier</key>
|
<key>GADApplicationIdentifier</key>
|
||||||
|
@ -222,22 +249,5 @@
|
||||||
<string>fetch</string>
|
<string>fetch</string>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>fb608674328645232</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>FacebookAppID</key>
|
|
||||||
<string>608674328645232</string>
|
|
||||||
<key>FacebookClientToken</key>
|
|
||||||
<string>3775e6ea83236a685d264b6c5a1bbb4d</string>
|
|
||||||
<key>FacebookDisplayName</key>
|
|
||||||
<string>보이스온 - Test1</string>
|
|
||||||
<key>FacebookAutoLogAppEventsEnabled</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -2,6 +2,33 @@
|
||||||
<!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>NSAdvertisingAttributionReportEndpoint</key>
|
||||||
|
<string>https://appsflyer-skadnetwork.com/</string>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>fb612448298237287</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>voiceon</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>FacebookAppID</key>
|
||||||
|
<string>612448298237287</string>
|
||||||
|
<key>FacebookAutoLogAppEventsEnabled</key>
|
||||||
|
<true/>
|
||||||
|
<key>FacebookClientToken</key>
|
||||||
|
<string>32af760f4a7b7cb7e3b1e7ffd0b0da70</string>
|
||||||
|
<key>FacebookDisplayName</key>
|
||||||
|
<string>보이스온</string>
|
||||||
<key>FirebaseAppDelegateProxyEnabled</key>
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>GADApplicationIdentifier</key>
|
<key>GADApplicationIdentifier</key>
|
||||||
|
@ -222,22 +249,5 @@
|
||||||
<string>fetch</string>
|
<string>fetch</string>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>fb612448298237287</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>FacebookAppID</key>
|
|
||||||
<string>612448298237287</string>
|
|
||||||
<key>FacebookClientToken</key>
|
|
||||||
<string>32af760f4a7b7cb7e3b1e7ffd0b0da70</string>
|
|
||||||
<key>FacebookDisplayName</key>
|
|
||||||
<string>보이스온</string>
|
|
||||||
<key>FacebookAutoLogAppEventsEnabled</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<string>development</string>
|
<string>development</string>
|
||||||
<key>com.apple.developer.associated-domains</key>
|
<key>com.apple.developer.associated-domains</key>
|
||||||
<array>
|
<array>
|
||||||
<string>applinks:sodalive.page.link</string>
|
<string>applinks:voiceon.onelink.me</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
import AppsFlyerLib
|
||||||
import FBSDKCoreKit
|
import FBSDKCoreKit
|
||||||
import FirebaseCore
|
import FirebaseCore
|
||||||
import FirebaseMessaging
|
import FirebaseMessaging
|
||||||
|
@ -33,6 +34,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
|
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
AppEvents.shared.activateApp()
|
AppEvents.shared.activateApp()
|
||||||
|
|
||||||
|
setupAppsFlyer()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,6 +59,65 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
|
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void) -> Bool {
|
||||||
|
AppsFlyerLib.shared().continue(userActivity, restorationHandler: nil)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
private func setupAppsFlyer() {
|
||||||
|
if let infoDic = Bundle.main.infoDictionary, let devKey = infoDic["AppsFlyerDevKey"] as? String, let appId = infoDic["AppsFlyerAppID"] as? String {
|
||||||
|
AppsFlyerLib.shared().appsFlyerDevKey = devKey
|
||||||
|
AppsFlyerLib.shared().appleAppID = appId
|
||||||
|
} else {
|
||||||
|
AppsFlyerLib.shared().appsFlyerDevKey = "tWF2wbJ5nSkya5Ru9mGcPU"
|
||||||
|
AppsFlyerLib.shared().appleAppID = "6461721697"
|
||||||
|
}
|
||||||
|
|
||||||
|
AppsFlyerLib.shared().waitForATTUserAuthorization(timeoutInterval: 60)
|
||||||
|
|
||||||
|
AppsFlyerLib.shared().delegate = self
|
||||||
|
AppsFlyerLib.shared().deepLinkDelegate = self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension AppDelegate: AppsFlyerLibDelegate {
|
||||||
|
func onConversionDataSuccess(_ conversionInfo: [AnyHashable : Any]) {
|
||||||
|
DEBUG_LOG("AppsFlyer Conversion Data: \(conversionInfo)")
|
||||||
|
}
|
||||||
|
|
||||||
|
func onConversionDataFail(_ error: any Error) {
|
||||||
|
DEBUG_LOG("AppsFlyer Conversion Data Failed: \(error.localizedDescription)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension AppDelegate: DeepLinkDelegate {
|
||||||
|
func didResolveDeepLink(_ result: DeepLinkResult) {
|
||||||
|
switch result.status {
|
||||||
|
case .notFound:
|
||||||
|
DEBUG_LOG("[AFSDK] Deep link not found")
|
||||||
|
return
|
||||||
|
case .failure:
|
||||||
|
DEBUG_LOG("Error \(result.error!)")
|
||||||
|
return
|
||||||
|
case .found:
|
||||||
|
DEBUG_LOG("[AFSDK] Deep link found")
|
||||||
|
}
|
||||||
|
|
||||||
|
guard let deepLinkObj:DeepLink = result.deepLink else {
|
||||||
|
DEBUG_LOG("[AFSDK] Could not extract deep link object")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if(deepLinkObj.isDeferred == true) {
|
||||||
|
DEBUG_LOG("[AFSDK] This is a deferred deep link")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DEBUG_LOG("[AFSDK] This is a direct deep link")
|
||||||
|
}
|
||||||
|
|
||||||
|
DEBUG_LOG("deepLinkValue: \(deepLinkObj.deeplinkValue ?? "")")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AppDelegate: MessagingDelegate {
|
extension AppDelegate: MessagingDelegate {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import SwiftUI
|
||||||
import AppTrackingTransparency
|
import AppTrackingTransparency
|
||||||
|
|
||||||
import FBSDKCoreKit
|
import FBSDKCoreKit
|
||||||
|
import AppsFlyerLib
|
||||||
|
|
||||||
@main
|
@main
|
||||||
struct SodaLiveApp: App {
|
struct SodaLiveApp: App {
|
||||||
|
@ -24,11 +25,13 @@ struct SodaLiveApp: App {
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
||||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||||
|
|
||||||
|
AppsFlyerLib.shared().start()
|
||||||
ATTrackingManager.requestTrackingAuthorization { _ in }
|
ATTrackingManager.requestTrackingAuthorization { _ in }
|
||||||
}
|
}
|
||||||
.onOpenURL { url in
|
.onOpenURL { url in
|
||||||
DEBUG_LOG("I have received a URL through a custom scheme! \(url.absoluteString)")
|
DEBUG_LOG("I have received a URL through a custom scheme! \(url.absoluteString)")
|
||||||
ApplicationDelegate.shared.application(UIApplication.shared, open: url, options: [:])
|
ApplicationDelegate.shared.application(UIApplication.shared, open: url, options: [:])
|
||||||
|
AppsFlyerLib.shared().handleOpen(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue