Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not work in iOS #25

Closed
kleberandrade opened this issue Mar 8, 2022 · 8 comments
Closed

Not work in iOS #25

kleberandrade opened this issue Mar 8, 2022 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@kleberandrade
Copy link

Dear,

I have LiveChat working on Android, but it doesn't work on iOS. When clicking the button to open LiveChat, the application closes.

Flutter: 2.10.3
LiveChat: 1.4.0

All info.pList and Podfile settings have been done.

Best Regards

@Mastersam07
Copy link
Owner

Mastersam07 commented Mar 8, 2022

Hello @kleberandrade how are you calling the plugin?

Can you try:

Livechat.beginChat(LICENSE_NO, GROUP_ID, VISITOR_NAME, VISITOR_EMAIL, {}); where {} is for empty or no custom params.

@kleberandrade
Copy link
Author

kleberandrade commented Mar 8, 2022

Yes, I just don't pass this empty brace {}, I'll test it.

Livechat.beginChat(
      AppEnvParams.liveChatLicense,
      AppEnvParams.liveChatGroupId,
      controller.name,
      controller.email,
    );

@Mastersam07
Copy link
Owner

Let me know if that works

@kleberandrade
Copy link
Author

kleberandrade commented Mar 8, 2022

Hi @Mastersam07

Follow me function

  Future<void> _openLiveChat() async {
    AnalyticsHelper.trackEvent(
      'chat',
      {
        'name': controller.name,
        'email': controller.email,
      },
    );

    Livechat.beginChat(
      AppEnvParams.liveChatLicense,
      AppEnvParams.liveChatGroupId,
      controller.name,
      controller.email,
      {},
    );
  }

When clicking on the button to open the chat, on iOS, the application closes and presents the following error.

flutter: -- BiometricModule INITIALIZED
flutter: -- SplashModule DISPOSED
flutter: -- HomeModule INITIALIZED
flutter: -- BiometricModule DISPOSED
flutter: -- FaqModule INITIALIZED
Could not cast value of type 'NSNull' (0x1f2ac3c60) to 'NSDictionary' (0x1f2ac3800).
Could not cast value of type 'NSNull' (0x1f2ac3c60) to 'NSDictionary' (0x1f2ac3800).
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001ba8069e8 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1ba8069e8 <+8>:  b.lo   0x1ba806a04               ; <+36>
    0x1ba8069ec <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1ba8069f0 <+16>: mov    x29, sp
    0x1ba8069f4 <+20>: bl     0x1ba802670               ; cerror_nocancel
Target 0: (Runner) stopped.
Lost connection to device.

On android it works normally.

@Mastersam07
Copy link
Owner

@kleberandrade I will send a fix for this shortly

@Mastersam07 Mastersam07 self-assigned this Mar 8, 2022
@Mastersam07 Mastersam07 added the bug Something isn't working label Mar 8, 2022
@Mastersam07 Mastersam07 pinned this issue Mar 8, 2022
@kleberandrade
Copy link
Author

Thanks @Mastersam07 . We use the plugin in the app and would not want to switch from LiveChat to another support service.

@Mastersam07
Copy link
Owner

Mastersam07 commented Jul 27, 2022

This could be related to #23 . However, a more permanent fix would be shipped in the coming days.

@Mastersam07
Copy link
Owner

Closing this as this had been fixed earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants