Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Documentation out of date. MessangerAccount no longer exists.

    Posted 09-01-2025 08:24

    Genesys Cloud Developer Center

    The documentation (linked) shows setting up the MessengerAccount and injecting it into the ChatController.

    We have just updated to 1.16 of the SDK and this type no longer exists.

    It looks like the `GenesysCloudCore.Account` is what we should be using but there are no initialiser params for this.

    Please could you update the documentation.

    And also update to support SPM. Everything that I am doing right now to add Genesys through SPM is exactly what you need to do so that we don't have to do this as developers.


    #MobileMessenger

    ------------------------------
    Oliver Foggin
    ------------------------------


  • 2.  RE: Documentation out of date. MessangerAccount no longer exists.

    Posted 09-01-2025 08:28
    Edited by Oliver Foggin 09-01-2025 08:28

    It looks like the property `customAttributes` no longer exists too.

    What should my updated code look like if this was the old code?

    let messengerAccount = MessengerAccount(

        deploymentId: deploymentId,

        domain: domain,

        logging: shouldEnableLogging

    )

    messengerAccount.customAttributes = [

        "chatAgent": "mobile",

        "deviceDetails": "iOS",

        "redactedPropertyA""someValue",

        "redactedPropertyB""someValue",

    ]

    I know that I need to use the `GenesysCloudCore.Account` but this only looks like this...

    @objc open class Account : NSObject {

        public var apiKey: String?

        public var info: [String : [String : String]]?

        public var sessionInfo: GenesysCloudCore.SessionInfo

        override dynamic public init()

        @objc deinit

    }

    So there isn't an obvious way to update this.

    Thanks



    ------------------------------
    Oliver Foggin
    ------------------------------



  • 3.  RE: Documentation out of date. MessangerAccount no longer exists.

    Posted 09-01-2025 09:39

    Hi Oliver,

    MessengerAccount still exists. You need to import GenesysCloudMessenger to use it.

    Previously it was imported by GenesysCloud, this is the change. It was not intentional, and will be fixed in the next release.

    But until then, please try the workaround to import GenesysCloudMessenger.

    Thank you.



    ------------------------------
    Monika Tamasi
    Mobile Development Manager
    ------------------------------



  • 4.  RE: Documentation out of date. MessangerAccount no longer exists.

    Posted 09-01-2025 09:44
    Edited by Oliver Foggin 09-01-2025 09:55

    Thanks @Akosne Tamasi

    It looks like there is a change to the `didFailWithError` delegate function to make the `error` optional.

    Just wondering what the reason for that is and how we should treat the case where the `error` is nil? Does that mean there wasn't an error? Or there was an error but we don't get to see it? Also, is there a scenario when that would happen?

    Right now we offer the user an option to reconnect based on the error type. Or close the chat if it's a "fatal" error.

    How should we handle the error being nil?

    Thanks



    ------------------------------
    Oliver Foggin
    ------------------------------



  • 5.  RE: Documentation out of date. MessangerAccount no longer exists.

    Posted 09-01-2025 11:04

    Hmm...

    @Akosne Tamasi

    With the 1.16 SDK I'm getting a crash at run time of the app. Before the app is even able to load...

    Symbol not found: _OBJC_CLASS_$_MessengerTransportPushProvider
      Referenced from: <2B3FD654-DAB0-3941-A073-B041D2313FF3> /<REDACTED>/Build/Products/Debug-iphonesimulator/GenesysCloudMessenger.framework/GenesysCloudMessenger
      Expected in:     <76231908-CA57-3C94-9759-AEA72FC4658B> /<REDACTED>/Build/Products/Debug-iphonesimulator/MessengerTransport.framework/MessengerTransport

    There's more to the message after this but it's all just stack trace stuff. This seems to be the main issue.

    This is happening on initial boot of the app. Not when the chat is loaded.



    ------------------------------
    Oliver Foggin
    ------------------------------



  • 6.  RE: Documentation out of date. MessangerAccount no longer exists.

    Posted 09-01-2025 11:55

    We've sorted this now using the https://github.com/MyPureCloud/mobile-messenger-genesyscloud-spm SPM package!

    This should be at the top of the docs! Much better integration this way!

    Thanks



    ------------------------------
    Oliver Foggin
    ------------------------------



  • 7.  RE: Documentation out of date. MessangerAccount no longer exists.

    Posted 09-02-2025 04:36

    Thank you for the feedbacks, and I'm happy SPM worked for you. 

    We created the bug report for the import and the crash you reported, they will be fixed in the next release asap.



    ------------------------------
    Monika Tamasi
    Mobile Development Manager
    ------------------------------