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

iOS build : Undefined symbol #59

Open
Raphy opened this issue Jun 7, 2023 · 1 comment
Open

iOS build : Undefined symbol #59

Raphy opened this issue Jun 7, 2023 · 1 comment

Comments

@Raphy
Copy link

Raphy commented Jun 7, 2023

I've a Flutter app for iOS and Android with different flavors (Development, Staging and Production).

I've configured the Runner and the Sharing Extension to be compatible with these flavors (because the identifier is not the same according the environment, the app groups is also configured).

I've tested by running in debug and everything works.
But when I want to build a release, I've the following error :

$> flutter build ipa --release -t lib/main_development.dart --flavor Development 
Changing current working directory to: /Users/raphy/Development/example-app

💪 Building with sound null safety 💪

Archiving com.example.app.dev...
Automatically signing iOS for device deployment using specified development team in Xcode project: XXXXXXX
Running pod install...                                              3,3s
Upgrading Pods-Runner-frameworks.sh
Running Xcode build...                                                  
Xcode archive done.                                         34,8s
Failed to build iOS app
Error (Xcode): Undefined symbol: _FlutterMethodNotImplemented


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterBasicMessageChannel


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterError


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterMethodChannel


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterStandardMessageCodec


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterStandardReader


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterStandardReaderWriter


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterStandardTypedData


Error (Xcode): Undefined symbol: _OBJC_CLASS_$_FlutterStandardWriter


Error (Xcode): Undefined symbol: _OBJC_METACLASS_$_FlutterStandardReader


Error (Xcode): Undefined symbol: _OBJC_METACLASS_$_FlutterStandardReaderWriter


Error (Xcode): Undefined symbol: _OBJC_METACLASS_$_FlutterStandardWriter


Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)


Encountered error while archiving for device.

When I remove the extension, everything works back again.

$> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.11, on macOS 13.3.1 22E772610a darwin-arm64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2022.1)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

• No issues found!

I've checked the build settings, the build phases, the entitlements, the certificates and everything seems to be ok...
I really do not have any idea to get this error fixed

@Mounix99
Copy link
Contributor

Mounix99 commented Jun 8, 2023

@Raphy Hi! I have faced the same problem. Fix for me was change in Runner -> Info -> configurations like this
Screenshot 2023-06-08 at 08 15 01

I also used build version generated by bitrise service, so for passing apple review I should rewrite values in Share Extension -> General -> Identity by my hands cause generated flutter build and buildShortVersion doesn't fit for iOS extensions
Screenshot 2023-06-08 at 08 19 28

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

2 participants