2

I would like to understand how to add version 8.0.0 of the SalesForce Marketing Cloud iOS SDK to my iOS app using either cocoapods or SPM. I am unable to do so using either of these methods.

The 8.0.0 release seemingly cannot be added to a project via cocoapods because podspecs still reference version 7.6.0. When adding via SPM, xcode is unable to resolve package graph (because package.swift is missing in the repo, I am using this repo in Xcode.

It is worth mentioning that the release notes for version 8.0.0 here state: "Introducing Swift Packages - Discontinuation of CocoaPods support in favor of Swift Package Manager". Although the documentation here still mentions cocoapods integration steps for version 8.0.0.

Am I doing something wrong or has this release inadvertently broken cocoapods integration without adding support for SPM (as per the release notes)?

P.S.: My preference is to include the SDK using SPM. I already have version 7.6.0 integrated via cocoapods and it works fine.

1
1

Thank You for pointing it out. The SDK >= 8.0.0 is available only via SPM. Cocoapods reference for this version is a result of automated version update in our documentation. I will work on updating it accordingly.

As of 8.0.0 SDK will be only available via SPM. SDK versions < 8.0.0 will continue to have a cocoapods releases.

Including the SDK >= 8.0.0 requires adding two SPM dependencies

9
  • Thank you @SandraTopczewska. This sorted out the issue. I also saw the new documentation page that has been added and that helped too. Nov 8 '21 at 7:56
  • Does this work on spm? i am stuck at starting package resolution when i try to install MarketingCloudSDK-iOS via SPM Nov 17 '21 at 10:51
  • Yes it works via SPM, it may take a bit for it to download for the first time as I believe SPM would scan through all tags, and there are a few. Try pointing directly to a version for quicker output. Nov 18 '21 at 14:16
  • @SandraTopczewska - It does work but I am unable to upload my app build to the appstore because adding a bundle to the archive isn't allowed. I will spend more time on this but do you have any insights into how we could resolve this? Dec 9 '21 at 18:14
  • @SandraTopczewska - I was able to get around the initial "Invalid Bundle Structure' issue by removing the MarketingCloudSDK framework file from the bundle we copied over as part of the SPM integration. However, after this I'm getting mores error during upload, like "ERROR ITMS-90205: "Invalid Bundle. The bundle at 'LearningApp.app/Frameworks/ MarketingCloudSDK.framework' contains disallowed nested bundles." and "RROR ITMS-90206: "Invalid Bundle. The bundle at 'LearningApp.app/Frameworks/ MarketingCloudSDK.framework' contains disallowed file 'Frameworks'." Could you please advise. Dec 10 '21 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.