Onesignal-flutter-sdk: Error when building and archiving iOS build - Flutter 2.0.3

Created on 5 Apr 2021  路  10Comments  路  Source: OneSignal/OneSignal-Flutter-SDK

Description:
I upgraded my flutter to the new version and when I tried to build with --release flag I got some errors, I already update the package to the 3.0.0-beta1.

I think it can be a compability issue with firebase... I don't know yet.

Link OneSignalNotificationServiceExtension (arm64) 0.4 seconds
Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FlutterStandardTypedData", referenced from: objc-class-ref in firebase_remote_config(FLTFirebaseRemoteConfigPlugin.o) "_OBJC_CLASS_$_FlutterError", referenced from: objc-class-ref in firebase_core(FLTFirebasePlugin.o) objc-class-ref in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o) objc-class-ref in onesignal_flutter(OSFlutterCategories.o) "_OBJC_CLASS_$_FlutterMethodChannel", referenced from: objc-class-ref in firebase_analytics(FLTFirebaseAnalyticsPlugin.o) objc-class-ref in firebase_core(FLTFirebaseCorePlugin.o) objc-class-ref in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o) objc-class-ref in firebase_remote_config(FLTFirebaseRemoteConfigPlugin.o) objc-class-ref in onesignal_flutter(OSFlutterOutcomeEventsController.o) objc-class-ref in onesignal_flutter(OneSignalPlugin.o) objc-class-ref in onesignal_flutter(OSFlutterTagsController.o) ... "_FlutterMethodNotImplemented", referenced from: -[FLTFirebaseAnalyticsPlugin handleMethodCall:result:] in firebase_analytics(FLTFirebaseAnalyticsPlugin.o) -[FLTFirebaseCorePlugin handleMethodCall:result:] in firebase_core(FLTFirebaseCorePlugin.o) -[FLTFirebaseDynamicLinksPlugin handleMethodCall:result:] in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o) -[FLTFirebaseRemoteConfigPlugin handleMethodCall:result:] in firebase_remote_config(FLTFirebaseRemoteConfigPlugin.o) -[OSFlutterOutcomeEventsController handleMethodCall:result:] in onesignal_flutter(OSFlutterOutcomeEventsController.o) -[OneSignalPlugin handleMethodCall:result:] in onesignal_flutter(OneSignalPlugin.o) -[OSFlutterTagsController handleMethodCall:result:] in onesignal_flutter(OSFlutterTagsController.o) ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment
onesignal_flutter: ^3.0.0-beta1
firebase: ^9.0.0
firebase_analytics: ^7.1.1
firebase_core: ^1.0.0
firebase_dynamic_links: ^0.8.0
firebase_remote_config: ^0.9.0-dev.1
Flutter 2.0.3

Steps to Reproduce Issue:

  1. Install the OneSignal Flutter SDK using pub into your project
  2. Initialize the SDK using OneSignal.shared.setAppId(your_app_id)
  3. use promptUserForPushNotificationPermission() and setNotificationWillShowInForegroundHandler(onReceive)
  4. use setNotificationOpenedHandler(onOpen);

Anything else:
image

Most helpful comment

Solution:

  1. Go to Runner ->Info.
  2. Go to the Configurations category.
  3. Expand all your configurations.

Replace the following configurations for your service:

  1. Debug -> Runner ->OneSignalServiceExtension -> Pods-OneSignalServiceExtension.debug.

  2. Release ->Runner -> OneSignalServiceExtension ->Pods-OneSignalServiceExtension.release.

  3. Profile ->Runner -> OneSignalServiceExtension ->Pods-OneSignalServiceExtension.profile.

This goes for all your extensions in the application.

Close Xcode and then run the following command in a terminal:
shell script flutter clean; rm ios/Podfile.lock pubspec.lock; rm -rf ios/Pods ios/Runner.xcworkspace; flutter run

All 10 comments

I am getting the same issue here.

Any solutions? @lucasratske

Any solutions? @lucasratske

Nope, still waiting... I've tried a lot of changes and nothing works

Same here... well let's wait! Thanks

Solution:

  1. Go to Runner ->Info.
  2. Go to the Configurations category.
  3. Expand all your configurations.

Replace the following configurations for your service:

  1. Debug -> Runner ->OneSignalServiceExtension -> Pods-OneSignalServiceExtension.debug.

  2. Release ->Runner -> OneSignalServiceExtension ->Pods-OneSignalServiceExtension.release.

  3. Profile ->Runner -> OneSignalServiceExtension ->Pods-OneSignalServiceExtension.profile.

This goes for all your extensions in the application.

Close Xcode and then run the following command in a terminal:
shell script flutter clean; rm ios/Podfile.lock pubspec.lock; rm -rf ios/Pods ios/Runner.xcworkspace; flutter run

Thanks @Holofox, this fixed it for us

Thanks @Holofox, you rocks

Thanks! But what do I replace those configurations with?

I have the same issue. I spent two days to research and as a result - recreate ios folder.
But when I add one signal extension I got this problem. And now I don't understand how I should set up this configuration
小薪懈屑芯泻 褝泻褉邪薪邪 2021-05-04 胁 16 51 26

Same here @rovkinmax, I do not understand how to set that configuration to make it work. I tried it all and nothing...

Was this page helpful?
0 / 5 - 0 ratings