0

it's Ian, an iOS dev.

My client wants to migrate the push notifications campaigns management of their iOS and Android apps to Salesforce.

I'm facing compile issues after adding the marketing libraries when we try to archive and ship the project to the AppStore using MarketingCloudSDK v8.0.10 & SFMCSDK v1.0.6 (Option 2: Implement the SDK manually). However, running the app in the simulator has worked a few times using older SDK versions.

  1. Add MarketingCloudSDK.xcframework v8.0.10 to project Libraries
  2. Add SFMCSDK.xcframework v1.0.6 to project Libraries.
  3. Add MarketingCloudSDK.bundle to Copy Bundle Resources
    • File from MarketingCloudSDK-iOS-8.0.10/Sources/MarketingCloudSDKResources/Resources/MarketingCloudSDK.bundle

Archive errors

Do you have any news on how to fix it? I've seen people having similar issues.

Environments

My development computer
  • Macbook Pro 16" with Intel CUs (i9)
    • 8 CPU @ 2.4GHz
    • 64 GB RAM
Circle CI
  • MacOS machines with Intel CPUs
    • 4 CPU @ 3.2 GHZ
    • 8 GB RAM

CircleCI deploy job

Error logs

/Users/ian/Projects/Xcode/.../<module-includes>:2:9: Non-portable path to file '"Headers/SFMCSdk-Swift.h"'; specified path differs in case from file name on disk

/Users/ian/Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphoneos/MarketingCloudSDK.framework/Headers/MarketingCloudSDK+Base.h:12:9: Could not build module 'SFMCSDK'

Could not build Objective-C module 'MarketingCloudSDK'

Many thanks in advance for your help.

Updates after receiving feedback

Neither the project nor the target app treats the warnings as errors. enter image description here

5
  • Have you tried setting "Treat Warnings as Errors" to "No?" Mar 20, 2023 at 18:38
  • Many thanks for your quick reply @EthanYehuda. Looking at the Build settings of the app, it seems the warnings are not treated as errors. I've added a screenshot to the Question description. Would it be possible to make a quick Teams call this week? Looking at the GitHub repositories, it seems you are the ideal Salesforce iOS SDK developer to ask doubts. My client has a few million users in the UK, so I'm sure we can work out something. Their platforms already use Salesforce for email marketing. Therefore, there's an existing contract between both companies. Mar 20, 2023 at 19:01
  • Please ensure this setting is set to no for "Apple Clang - Warning Policies" and "Swift Compiler - Warning Policies." If you still have issues, please open a support ticket. Mar 23, 2023 at 14:36
  • 1
    Hi @EthanYehuda, many thanks for your support. Thanks to your latest suggestion, I got rid of the compile errors. I've just posted a solution with all the steps I followed. Hopefully, it will help any other iOS devs integrate the SDK manually 🙂. Apr 4, 2023 at 14:06
  • We're hoping to address the header warnings so users of the SDK can enable these flags. Say tuned and thanks for your detailed response! Apr 5, 2023 at 12:44

1 Answer 1

1

Solution

Hi, it's Ian again. I just wanted to share a few notes after integrating the MarketingCloudSDK v8.0.10 & SFMCSDK v1.0.6 successfully into my client's iOS app.

Treat Warnings as Errors

No treating warnings as errors in both Apple Clang - Warning Policies and Swift Compiler - Warning Policies was the major error cause. @Ethan Yehuda, many thanks for pointing this out.

Treat warnings as errors in Build Settings

Embed & Sign Salesforce SDKs

I got a few errors when I picked Do not Embed or Embed without signing. Now, we Embed & Sign both SDKs.

Xcode - Frameworks, Libraries, and Embedded Content

Supported Platforms

After uploading the new build to TestFlight, we received an email from Apple warning us about the lacking MacOS support by two frameworks.

AppleStore Connect email

Therefore, we stopped the distribution of this app for MacOS. Both in the AppStore:

AppStore Connect - Pricing and Availability

And removed MacOS (Designed for iPad) from Xcode's project-supported destinations:

enter image description here

For example, the Firebase SDKs support iOS, MacOS, and tvOS.

Firebase XCFrameworks

Whereas the MarketingCloudSDK & the SFMCSDK only support iOS.

Salesforce MarketingCloudSDK XCFramework

It might be good to precompile this SDK for MacOS so we can distribute the iPad version of the app into the MacOS AppStore.

MarketingCloudSDK.bundle

I also doubted which bundle file to use in the SDK 8 major version since there were two files, one in /MarketingCloudSDK (Opt 1) and another in /Sources/MarketingCloudSDKResources/Resources (Opt 2) with slightly different KB sizes.

In the end, I used Option 1.

MarketingCloudSDK.bundle files

Alternative

Using the precompiled XCFrameworks of MarketingCloudSDK v7.6.0 & SFMCSDK v1.0.0 didn't give me any of the mentioned issues.

Based on my experience, I'd recommend starting integrating the MarketingCloudSDK v7.6.0, and once you receive a push successfully, upgrade it to its latest v8.x.y version.

2
  • Please update to the latest release (MarketingCloudSDK 8.0.12 & SFMCSDK 1.0.8) Apr 10, 2023 at 15:13
  • @EthanYehuda, many thanks for letting us know about the new versions. We've added them to the project. Can we treat warnings as errors again? May 12, 2023 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .