Skip to content

Instantly share code, notes, and snippets.

@joshuafinch
Created June 14, 2019 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuafinch/5dc0c52307f767717493755e14c87636 to your computer and use it in GitHub Desktop.
Save joshuafinch/5dc0c52307f767717493755e14c87636 to your computer and use it in GitHub Desktop.
Unable to Integrate Adobe Target framework
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 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
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
@joshuafinch
Copy link
Author

We're using the following:

(latest stable) Swift 5
(latest stable) Xcode 10.2.1
(latest stable) CocoaPods 1.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment