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

[HELP] Cannot build ios using flutter #92

Closed
AzamudinInnoractive opened this issue Sep 19, 2023 · 12 comments
Closed

[HELP] Cannot build ios using flutter #92

AzamudinInnoractive opened this issue Sep 19, 2023 · 12 comments
Assignees

Comments

@AzamudinInnoractive
Copy link

Screenshot 2023-09-19 at 4 57 32 PM
@joshi-kt joshi-kt self-assigned this Sep 19, 2023
@joshi-kt
Copy link
Contributor

@AzamudinInnoractive This issue is due to the latest XCode 15 beta version and it will be fixed in the next flutter release. Until then you can use latest app store version of XCode for building your app.

@AzamudinInnoractive
Copy link
Author

Screenshot 2023-09-19 at 5 32 02 PM

Im using latest app store version @himanshujoshi848

@joshi-kt
Copy link
Contributor

@AzamudinInnoractive We will be releasing a fix for this XCode 15 build issue with the next flutter release. Till then, you can use XCode 14 for building your project.

@joshi-kt
Copy link
Contributor

@AzamudinInnoractive We will be releasing a fix for this XCode 15 build issue with the next flutter release. Till then, you can use XCode 14 for building your project.

For your reference the issue is listed here. We are releasing the updated flutter plugin with all XCode 15 related issues fixed on 21 September. Thanks for your patience.

@AzamudinInnoractive
Copy link
Author

@himanshujoshi848 thanks for the update. will wait for new plugin release.

@AzamudinInnoractive
Copy link
Author

after revert to 14.3, the error resolved but app crash when starting the chat @himanshujoshi848

@joshi-kt
Copy link
Contributor

can we get your implementation code ?

@AzamudinInnoractive
Copy link
Author

AzamudinInnoractive commented Sep 25, 2023

void startInquiry(BuildContext context, WidgetRef ref) {
if (ref.watch(inquiryEmailProvider).isEmpty) {
  ref.read(inquiryEmailProvider.notifier).state =
      ref.read(publicDashboardDataProvider.notifier).kommunicateUserEmail;
}

if (ref.watch(inquiryNameProvider).isEmpty) {
  ref.read(inquiryNameProvider.notifier).state = ref
      .read(publicDashboardDataProvider.notifier)
      .kommunicateUserFullName;
}

if (ref.watch(inquiryPhoneProvider).isEmpty) {
  ref.read(inquiryPhoneProvider.notifier).state = ref
      .read(publicDashboardDataProvider.notifier)
      .kommunicateUserContactNumber;
}

dynamic user = {
  'userId': ref.watch(
      inquiryEmailProvider), //Replace it with the userId of the logged in user
  'password': '', //Put password here if user has password, ignore otherwise
  'email': ref.watch(inquiryEmailProvider),
  'displayName': ref.watch(inquiryNameProvider),
  'contactNumber': ref.watch(inquiryPhoneProvider),
};

dynamic conversationObject = {
  'appId': dotenv.env[
      "KOMMUNICATE_APP_ID"], // The [APP_ID](https://dashboard.kommunicate.io/settings/install) obtained from Kommunicate dashboard.
  'kmUser': jsonDecode(jsonEncode(user)),
  'isSingleConversation': false,
};

if (ref.watch(conversationIdProvider).isNotEmpty) {
  KommunicateFlutterPlugin.openParticularConversation(
      ref.watch(conversationIdProvider));
  ref.read(isLoadingProvider.notifier).state = false;
  return;
}

KommunicateFlutterPlugin.buildConversation(conversationObject)
    .then((clientConversationId) {
  debugPrint(
      "Conversation builder success : " + clientConversationId.toString());
  ref.read(isLoadingProvider.notifier).state = false;
  ref.read(conversationIdProvider.notifier).state =
      clientConversationId.toString();
}).catchError((error) {
  debugPrint("Conversation builder error : " + error.toString());
}).whenComplete(() {
  debugPrint("Conversation builder when completed");
});

}

@AzamudinInnoractive
Copy link
Author

this is the error i received before crash

Could not cast value of type '__NSDictionaryI' (0x1128c8bf8) to 'NSString' (0x1128c87d0).

@joshi-kt
Copy link
Contributor

@AzamudinInnoractive don't decode the User object before passing it to 'kmUser'. You can use this conversation object :

dynamic conversationObject = {
  'appId': dotenv.env[
      "KOMMUNICATE_APP_ID"], // The [APP_ID](https://dashboard.kommunicate.io/settings/install) obtained from Kommunicate dashboard.
  'kmUser': jsonEncode(user),
  'isSingleConversation': false,
};

If the issue still persists or if you face any other issue you can contact our support team and book a call. Thanks !

@joshi-kt
Copy link
Contributor

@AzamudinInnoractive We have resolved all issues related to XCode 15 in our latest flutter release 1.7.2 . Thanks for your patience.

@waheed45103
Copy link

@himanshujoshi848 I have checked, this issue resolved in 1.7.2. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants