Created
June 14, 2019 09:48
-
-
Save joshuafinch/5dc0c52307f767717493755e14c87636 to your computer and use it in GitHub Desktop.
Unable to Integrate Adobe Target framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ACPCore | |
import ACPAnalytics | |
import ACPUserProfile | |
import ACPTarget | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
#if DEBUG | |
ACPCore.setLogLevel(.debug) | |
#else | |
ACPCore.setLogLevel(.warning) | |
#endif | |
ACPCore.configure(withAppId: "our-app-id-here") | |
ACPAnalytics.registerExtension() | |
ACPUserProfile.registerExtension() | |
ACPIdentity.registerExtension() | |
ACPLifecycle.registerExtension() | |
ACPSignal.registerExtension() | |
ACPTarget.registerExtension() | |
ACPCore.start { | |
ACPCore.lifecycleStart(nil) | |
} | |
// Other setup code here | |
return true | |
} | |
func applicationDidEnterBackground(_ application: UIApplication) { | |
ACPCore.lifecyclePause() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the `empty.m` file located at `ACPTarget/iOS/empty.m` in the ACPTarget Pod | |
// It fails to let the application compile + link the frameworks due to incorrect references in this file. | |
// Removing the marked lines below will allow the application to compile and link correctly. | |
#import "ACPCore.h" // This shouldn't be imported (as its not accessible from the ACPTarget framework) | |
#import "ACPTarget.h" | |
#import "ACPIdentity.h" // This shouldn't be imported (as its not accessible from the ACPTarget framework) | |
#import "ACPTargetOrder.h" | |
#import "ACPTargetParameters.h" | |
#import "ACPTargetPrefetchObject.h" | |
#import "ACPTargetProduct.h" | |
#import "ACPTargetRequestObject.h" | |
@implementation ACPTarget (ForceLoad) @end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://cdn.jsdelivr.net/cocoa/' | |
platform :ios, '10.0' | |
install! 'cocoapods', | |
:generate_multiple_pod_projects => true, | |
:incremental_installation => true | |
inhibit_all_warnings! | |
use_frameworks! | |
target 'OurApp' do | |
pod 'ACPAnalytics', '~> 2.0' | |
pod 'ACPUserProfile', '~> 2.0' | |
pod 'ACPCore', '~> 2.0' | |
pod 'ACPTarget', '~> 2.0' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're using the following:
(latest stable) Swift 5
(latest stable) Xcode 10.2.1
(latest stable) CocoaPods 1.7.1