ZDKRequestProvider fails on iOS 13 (but works fine on iOS 12).

Answered

7 Comments

  • Joey
    Comment actions Permalink

    Hi Paul-

    I spoke to our developers, and they asked if you might shed some light on what you are doing that leads to this issue, and if it might be easily reproduced. Setting an identity normally works on iOS 13, and this error is one we haven't yet seen.

    0
  • Paul Lander
    Comment actions Permalink

    Thanks for the quick response Joseph. I have some more info on my current iOS app below.

    1. Xcode 11.1, Targets -> General:

    ZendeskCoreSDK.framework - Embed & Sign

    ZendeskProviderSDK.framework - Embed & Sign

    ZendeskSDK.framework - Embed & Sign

    Nothing specific added to PLIST, e.g., no entry in Transport Settings for Zendesk

    Build phases: Always embed Swift Standard Libraries = Yes

    Frameworks search points to /5.1 (3.0.2)

     

    2. App Delegate:

    import ZendeskSDK

    import ZendeskCoreSDK

    @UIApplicationMain

    class AppDelegate: UIResponder, UIApplicationDelegate {

        var window: UIWindow?

        func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool

        {

            CoreLogger.enabled = true

            CoreLogger.logLevel = .debug

            Zendesk.initialize(appId: "MyAppID", clientId: "mobile_sdk_client_ClientID", zendeskUrl: MyUrl)

            Support.initialize(withZendesk: Zendesk.instance)

            return true

        }

     

    3. Creating the Request:

        func buildSupportRequest(requestCallback: @escaping (ZDKCreateRequest) -> Void)

        {

            let request = ZDKCreateRequest()

            request.subject = txtSubject.text ?? "The subject"

            request.requestDescription = "The description"

            request.tags = ["WPN2"]

            if let cfVersionApp = ZDKCustomField(fieldId: 360026780353, andValue: WPN2.App.Version), let cfVersionIOS = ZDKCustomField(fieldId: 360026781053, andValue: UIDevice.current.systemVersion), let cfDeviceModel = ZDKCustomField(fieldId: 360026800354, andValue: UIDevice.current.model) {

                request.customTicketFields = [cfVersionApp, cfVersionIOS, cfDeviceModel]

            }

            requestCallback(request)

        }

     

    4. The Callback:

                buildSupportRequest {

                    ZDKRequestProvider().createRequest($0)  { [unowned self] (result, error) in

                        DispatchQueue.main.async {

                            if result != nil {

                                  #UI success message

                            }

                            if error != nil {

                                  #UI warning message  // Fails on iOS 13.1.3, succeeds on iOS 12.3.1

    Error Domain=com.zendesk.core.access Code=100 "(null)"

                            }

                        }

                    }

                }

    0
  • Paul Lander
    Comment actions Permalink

    With the Xcode 11.2 update, the framework modules built with Swift 5.1 in release 3.0.2 cannot be imported by the Swift 5.1.2 compiler. The solution is to rebuild in Xcode with Build Settings: Build Libraries for Distribution set to Yes. Is an update scheduled? Thanks.

    1
  • Paul Lander
    Comment actions Permalink

    Update 11/4: There appear to be 2 distinct problems:

    1. Under iOS 13.2 the Zendesk SDK is not recognizing an anonymous identity with a request. It works fine under iOS 13.1 and iOS 12.x.

    2. With Xcode 11.2, the latest Zendesk SDK frameworks (v3.0.2) cannot be imported.

     

    1
  • Max Brunner
    Comment actions Permalink

    Hi everyone,

    Some updates around XCode 11.2 and Swift 5.1.2:

    Our iOS teams are fully committed and working right now on a new release of Support SDK to unblock you with XCode 11.2. This release will contain the Swift interface file inside our fat framework to enable module stability for our SDK. Given the high number of bugs in iOS 13.2, we expect that a new version of iOS might come around sooner than later, so the Swift interface file will get you unblocked nonetheless.

    In parallel, we're also working around the support of proper xcframeworks for our SDKs, to give you the definitive support of module stability. One of the problems we're facing here is that most of our integrators depend upon CocoaPods, which still doesn't support xcframeworks.

    We'll keep you all updated as we progress through these solutions and new releases.

    Thanks,
    Max.

    0
  • Paul Lander
    Comment actions Permalink

    Regarding the Xcode 11.2 issue, rolling back to Xcode 11.1 solves the problem of importing Zendesk frameworks built with Swift 5.1. The roll-back is straightforward and discussed here.

    Regarding the anonymous identity not being recognized and causing a failure of ZDKRequestProvider and the callback from createRequest, our workaround is to present the user with an MFMailCompose view controller, with the recipient being an email address linked to Zendesk Support.

    0
  • Max Brunner
    Comment actions Permalink

    Hi everyone,

    Just to update you that we have a new release (4.0.0) that now contains module stability. More details here: https://developer.zendesk.com/embeddables/docs/ios_support_sdk/release_notes#4.0.0

    Thanks,
    Max.

    0

Please sign in to leave a comment.

Powered by Zendesk