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

App Store Connect Upload Failure Invalid Executable. The executable contains bitcode. #176

Open
1 of 5 tasks
iamriajul opened this issue Oct 12, 2024 · 5 comments
Open
1 of 5 tasks

Comments

@iamriajul
Copy link

iamriajul commented Oct 12, 2024

Prepare Build for App Store Connect
Error
Invalid Executable. The executable 'Runner.app/Frameworks/AgoraRtmKit.framework/AgoraRtmKit' contains bitcode.

Note there are workaround available online, eg: https://medium.com/@abdulahad2024/fixing-bitcode-issues-in-xcode-16-how-to-resolve-invalid-executable-errors-when-uploading-ios-da07a5a39c7c

But this should be fixed within the package.

RTM Release: 2.2.1
Flutter: 3.24.3
Xcode: 16.0
macOS: 14.5 Sonoma (Xcode Cloud Environment)

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

When you try to upload the app to App Store Connect using Xcode 16.

Expected results

It should upload without any problems.

Actual results

Prepare Build for App Store Connect
Error
Invalid Executable. The executable 'Runner.app/Frameworks/AgoraRtmKit.framework/AgoraRtmKit' contains bitcode.

Code sample

No response

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.7 23H124 darwin-x64, locale
    en-BD)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.2.2)
[✓] VS Code (version 1.94.2)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!
@Anderzzon
Copy link

Anderzzon commented Oct 14, 2024

I had to add this code in the post_install do |installer| block in the pod-file:

bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
       def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
         framework_path = File.join(Dir.pwd, framework_relative_path)
         command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
         puts "Stripping bitcode: #{command}"
         system(command)
       end

       framework_paths = [
         "ios/Pods/AgoraRtm_iOS/AgoraRtmKit.xcframework/ios-arm64_armv7/AgoraRtmKit.framework/AgoraRtmKit"
       ]

       framework_paths.each do |framework_relative_path|
         strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
       end

Edit: I'm not sure, but you also might need to run pod update --repo-update --project-directory=ios before running flutter build ios

@AbdallahMohamed220
Copy link

any update for this issues ?

@sunil-singh-chaudhary
Copy link

did you find any solution same bug for me too

@yjt1216
Copy link

yjt1216 commented Nov 28, 2024

me too
bitcode

@peilinok
Copy link
Contributor

Hi all
I have checked the information for all binary files of version 2.2.1 and found no Bitcode present. Could you provide the UUID of the AgoraRtmKit.framework that is actually included in your packaged app?

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