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

  1. Follow the CocoaPods instructions using MarketingCloudSDK as a dependency in the podfile. See CocoaPods - MarketingCloudSDK:

    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

  1. Download the SDK.
  2. Copy the MarketingCloudSDK directory from your downloads to your project directory.

  3. Open your application project and select the appropriate target.

  4. 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.

  5. Add MarketingCloudSDK.bundle to Copy Bundle Resources in your target’s Build Phases settings.

  6. Add -ObjC to your target’s Other Linker Flags build settings.

    Review additional information from Apple about this linker flag.

Next Steps

Configure the SDK