Setup failing/Deprecated

AmityUIKitManager.setup() deprecated, but while calling register app getting crashed

Hello, may we know your current uikit version, please? Also, could you help provide the crash/error log as well?

hi @amitysupport :

I am using 3.2.0

What would happen if you remove AmityUIKitManager.setup() and those crossed-out lines since they are not in use?

Hi @amitysupport ,

Says AmityUIKitManager.setup() should call before register

Seems like you will need the AmityUIKitManager.setup

Could you please see the sample code below and adjust your code flow please?

AmityUIKitManager.setup(
            apiKey: "{YOUR_API_KEY}" , //e.g. "b0eeed0e39d23er567fs963d81f070xxxxx",
            region: .EU // could be .EU, .US or .SG depending on the server region of your Amity application
        )

AmityUIKitManager.registerDevice(withUserId:"{}", displayName: "", sessionHandler: sessionHandler)

Hi Team @amitysupport

setup() method is not available. As I shared in the first question screenshot.

Hello, our team has double-checked this, and it appears to still be available. However, it might conflict with your code at line 53.

Could you please replace that with the code we provided?

1 Like

Hi Team @amitysupport:
How i will be able to change functions inside AmityUIKIt Framework? Line no 53 is class of framework please see the attachment for reference. I tried with a fresh project also same issue persists(Ignore Toolchain error in screenshot )

Thanks

Hello, may I confirm if this one is the packaged UIKit that you installed via SPM?

Hi @amitysupport
No. installed via cocoapods

pod ‘AmityUIKit’

It seems that you followed the steps on here and install our packaged uikit: Installing UIKit (deprecated) - Amity Docs which was marked as deprecated. Please migrate to opensource uikit per our recommendation in another topic: Installation via SPM is getting failed, and you should be able to update the code/change functions.

Note: We’re currently investigating the issue related to realm that you’re facing.

1 Like