0

I'm trying last versions sfmc-sdk-ios (1.0.2) and MarketingCloudSDK-iOS (8.0.2). When compiling and uploading to testflight sdks doesn't work.

The configuration is like this:

SFMCSdk.initializeSdk(ConfigBuilder()
                                .setPush(
                                    config: configuration,
                                    onCompletion: { result in
                                       
                                    }
                                ).build())

In Debug is ok, onCompletion is called and SFMCSdk.mp.getStatus() is operational, but Release the SFMCSdk.mp.getStatus() is failed, onCompletion is never called.

  • Edited to add debug info from testflight
SFMCSdk.setLogger(logLevel: .debug)
SDK initializing with version: 417
Starting Module initialization: MarketingCloudSDK.PushModule with version compatibility: 8.0.2 - 8.9.9
Failed to initialize MarketingCloudSDK.PushModule due to module version incompatibility caused by semantic versioning issue. Example: 1.0 vs 1.0.0. Semantic versioning must be aligned between the interface and module. Provided version: 416, supported versions: >= 8.0.2 <= 8.9.9
Setting `[“LAST_OPENED_DATE”: “2022-01-04 16:09:38 GMT-03:00"]` as attributes for all modules triggered.
Message `IdentityEvent` received on the event bus.
SFMCSdk.state()
{
  "modules" : {
    "cdp" : {
      "compatibility" : "1.9.0 - 2.9.9",
      "name" : "cdp",
      "pendingOperations" : "undefined",
      "status" : "inactive",
      "version" : "unavailable"
    },
    "push" : {
      "compatibility" : "8.0.2 - 8.9.9",
      "name" : "push",
      "pendingOperations" : "undefined",
      "properties" : {
        "details" : "{\n  \"iOS Data Protection\" : {\n    \"Protected Data Available\" : \"true\",\n    \"File Protection Type\" : {\n\n    }\n  }\n}"
      },
      "status" : "failed",
      "version" : "417"
    }
  },
  "version" : "417"
}

This 417 is the App Build, should be of sdk version, right?

1 Answer 1

1

I am assuming You are using same configuration both locally and via test flight. Is it possible that for the debugging purposes You could turn on detailed logs? This may shed some light on what is the issue.

To enable logs please add the following line before trying to initialize the SDK. Logger is independent of the SDK being up and running.

SFMCSdk.setLogger(logLevel: .debug)

You could also add custom log outputter to capture logs in a different way, such as:

// Crate Custom Log Outputter
class MyCustomLogOutputter: LogOutputter {
    @objc open override func out(level: LogLevel, subsystem: String, category: LoggerCategory, message: String) {
        // custom log outputting
    }
}
    
// then enable logger:
SFMCSdk.setLogger(logLevel: .debug, logOutputter: MyCustomLogOutputter())

On Completion should be called regardless if the sdk was initialized or not as it should indicate success, error, timeout or if it was cancelled. Hence it looks like logs could tell what is the issue.

16
  • Thanks for the answer. I edited it adding the debug info, didn't see anything out of the ordinary. Dec 20, 2021 at 16:40
  • We are using sfmc-sdk-ios (1.0.1) and MarketingCloudSDK-iOS (8.0.1) in prod, but we have other problem, app crash for some of our users: ``` Fatal Exception: com.salesforce.security.keychainException dictionaryItemFromKeychain: Error attempting to look up keychain item: errSecInteractionNotAllowed ``` So we try update to solve that Dec 20, 2021 at 17:47
  • This is really a comment, not an answer. With a bit more rep, you will be able to post comments.
    – identigral
    Dec 20, 2021 at 18:53
  • Please see v8.0.3
    – Bill Mote
    Dec 28, 2021 at 17:44
  • 1
    @boski, The solution is to either use newer versions of the SDK or to disable automatic versioning when pushing the App to be tested via testflight. SDK was verifying integrity and versions using Apple designated parameter and unfortunately Apple changes it on flight if it is enabled. So when You see a prompt "App Store Connect distribution options" > "Manage Version and Build Number" (disable this option). Jul 11, 2022 at 17:01

You must log in to answer this question.

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