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

Error when building and archiving iOS build - Flutter 2.0.3 #374

Closed
lucasratske opened this issue Apr 5, 2021 · 11 comments
Closed

Error when building and archiving iOS build - Flutter 2.0.3 #374

lucasratske opened this issue Apr 5, 2021 · 11 comments

Comments

@lucasratske
Copy link

lucasratske commented Apr 5, 2021

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

@nickscamara
Copy link

I am getting the same issue here.

@nickscamara
Copy link

Any solutions? @lucasratske

@lucasratske
Copy link
Author

Any solutions? @lucasratske

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

@nickscamara
Copy link

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

@Holofox
Copy link
Contributor

Holofox commented Apr 13, 2021

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:

flutter clean; rm ios/Podfile.lock pubspec.lock; rm -rf ios/Pods ios/Runner.xcworkspace; flutter run

@Holofox Holofox mentioned this issue Apr 13, 2021
@phcs971
Copy link

phcs971 commented Apr 13, 2021

Thanks @Holofox, this fixed it for us

@lucasratske
Copy link
Author

Thanks @Holofox, you rocks

@nickscamara
Copy link

Thanks! But what do I replace those configurations with?

@rovkinmax
Copy link

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

@nickscamara
Copy link

nickscamara commented May 4, 2021

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

@TheKurdishProgrammer
Copy link

sorry to renew this, but mine still not working, i have tried the mentioned solution, recreated iOS folder, recreated pod, clean build.
can someone please provide another solution?

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

6 participants