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 build failed libonesignal.a does not contain bitcode when running flutter run command #29

Closed
esthrim opened this issue Oct 9, 2018 · 4 comments

Comments

@esthrim
Copy link

esthrim commented Oct 9, 2018

Description:

I followed the guide in one signal documentation, change the package version to 1.0.2 and when I run flutter run it shows below error message

Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    === BUILD TARGET Pods-Runner OF PROJECT Pods WITH CONFIGURATION Debug ===
    ld: '/Users/macmini1/Projects/flutter/myproject/build/ios/Debug-iphoneos/onesignal/libonesignal.a(onesignal-dummy.o)' does not contain bitcode. 
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), 
obtain an updated library from the vendor, or disable bitcode for this target.
 file '/Users/macmini1/Projects/flutter/myproject/build/ios/Debug-iphoneos/onesignal/libonesignal.a' for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not build the precompiled application for the device.

Environment
onesignal: ^1.0.2

flutter doctor :
`
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-US)
• Flutter version 0.8.2 at /Users/macmini1/Program/flutter
• Framework revision 5ab9e70727 (5 weeks ago), 2018-09-07 12:33:05 -0700
• Engine revision 58a1894a1c
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/macmini1/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 1.9.2
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 29.0.2
• Dart plugin version 181.5540.11
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.27.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.19.0

[✓] Connected devices (2 available)
• LG M400 • LGM400GAGM6TZS556S • android-arm • Android 7.0 (API 24)
• iPhone •aa1f8ca15b21ddb3f2bfcf3acd92cd2a2fc1075 • ios • iOS 11.4

• No issues found!`

Steps to Reproduce Issue:

  1. add flutter dependencies onesignal: 1.0.2 (run flutter packages get)
  2. add below line to pod file. :
   target 'OneSignalNotificationServiceExtension' do
      pod 'OneSignalDynamic', '>= 2.8.8', '< 3.0'
   end

run pod install

  1. add target OneSignalServiceExtension in xCode. change the code with the one that from one signal flutter documentation.

  2. add appgroup capabilities and so on (following the documentation in onesignal flutter documentation)

  3. flutter run

and then error happens like I described above.

@rlee1990
Copy link

rlee1990 commented Oct 9, 2018

Change it to
target 'OneSignalNotificationServiceExtension' do use_frameworks! pod 'OneSignalDynamic', '>= 2.8.8', '< 3.0' end

@rlee1990
Copy link

rlee1990 commented Oct 9, 2018

but then you will also have the same issue as in #21

@esthrim
Copy link
Author

esthrim commented Oct 12, 2018

@rlee1990 I tried it but it still the same error..

@esthrim
Copy link
Author

esthrim commented Oct 25, 2018

After I do this solution the error is gone.

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