MarketingCloudSDK.bundle Inclusion Crash

These troubleshooting steps apply only to the MobilePush SDK for iOS version 8.0.13 and earlier. In version 8.1.0 and later, the SDK automatically includes the bundle.

Important

When you upgrade to the latest version of the SDK, update MarketingCloudSDK.bundle. If you don’t copy the right versions, your app can crash because the older versions of MarketingCloudSDK.bundle don’t have the required resources.

If you don’t include the latest MarketingCloudSDK.bundle in your app, you can encounter these exceptions.

NSInvalidArgumentException

Reason: +entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name 'SFMCEndpointConfigurationEntity'

NSInternalInconsistencyException

Reasons:

  • 'NSFetchRequest could not locate an NSEntityDescription for entity name 'SFMCEventConfigurationEntity''
  • 'Cannot create an NSPersistentStoreCoordinator with a nil model'

To resolve these exceptions, upgrade to the latest version of the SDK and then follow these steps.

  1. In Xcode, under Build phases > Copy Resources Bundle, remove the existing MarketingCloudSDK.bundle.
  2. Add the latest MarketingCloudSDK.bundle. See Integrate the SDK for iOS.