I'm getting this error log in some situations which I haven't identified yet.

<MarketingCloudSDK+Base.m:(409)> iOS file protection is enabled and data is not available even after 5 seconds of waiting

This happens when I execute sfmc_setEventDelegate, but it's not a pattern, for instance, I can't replicate it locally. I just noticed it started spiking in Firebase as a Non-Fatal log, when we released MarketingCloud integration in our app.

sfmc_setEventDelegate is being called in the app delegate didFinishLaunchingWithOptions.

This is only happening in our production environment (our non-prod environment applications) aren't getting the same issue.

I double checked and our app doesn't use Data Protection, so, I'm not really sure how to interpret this issue... any help is appreciated.

Another thing that's weird and I cannot really explain is, the crash is being reported to be when I execute sfmc_setEventDelegate, although the error logging is being sent to firebase on the catch clause of the configure method of the MarketingCloud SDK.

        do {
            try client.configure(with: builder)
        } catch let error as NSError {
            // Errors returned from configuration will be in the NSError parameter and can be used to determine
            // if you've implemented the SDK correctly.

You will need to make sure you are waiting for the client.configure(with: builder) to finish before setting any values on the SDK singleton including sfmc_setEventDelegate. The configure method is what is initializing the SDK, and setting values/delegates before the try catch finishes may result in undefined behavior.


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.