Add the SDK to Your App
To implement the MarketingCloudSDK framework in your application, either use CocoaPods or manually set up the SDK.
If you are looking to add 8.x version or migrate from older versions to 8.x version, follow Migrating to 8.x guide.
Option 1: Implement the SDK with CocoaPods
target 'MyApp' do pod 'MarketingCloudSDK', '~> 7.6' end
Open the .xcworkspace created by the install process with Xcode and start using the SDK.
Do NOT open .xcodeproj. An error occurs if you open up a project file instead of a workspace.
Option 2: Implement the SDK manually
- Download the SDK.
- Copy the MarketingCloudSDK directory from your downloads to your project directory.
- Open your application project and select the appropriate target.
- Add MarketingCloudSDK.xcframework to Linked Frameworks and Libraries in your target’s General settings.
The below step #5 is needed until MarketingCloudSDK version 8.0.13. Post this version, manual addition of bundle to the application is removed and is automated.
- Add MarketingCloudSDK.bundle to Copy Bundle Resources in your target’s Build Phases settings.
- Add -ObjC to your target’s Other Linker Flags build settings.
Review additional information from Apple about this linker flag.