bugfender / BugfenderSDK-iOS

Bugfender SDK for iOS, a remote logger tailor-made for mobile
https://bugfender.com
Other
76 stars 31 forks source link

Xcode 16 build failure because of bitcode not supported any more #86

Closed liangwangcm closed 1 week ago

liangwangcm commented 3 weeks ago
image
jgimenez commented 3 weeks ago

Hi there, thanks for the report. Our team is already testing the SDK on the betas and we expect to release an updated version soon if we find any updates are needed. At the moment, though, we have not found this error.

Could you please provide more details on how to reproduce the problem? Are you using Swift Package Manager, CocoaPods or something else? A sample project would be great, because project-specific details matter.

Please feel free to contact our support at support.bugfender.com if you want to share private files.

jgimenez commented 2 weeks ago

Hi there, this is a friendly reminder that we can't act on this issue unless we understand what's the problem. If you have any more information, please share it with us so we can investigate. Thanks.

jgimenez commented 2 weeks ago

Our team finally reproduced the issue. It looks like SwiftPM automatically strips the Bitcode when it's not needed, but CocoaPods keeps it.

We still ship the SDK with Bitcode for backwards compatibility, but since Apple no longer accepts Bitcode, we will likely issue a new major version (version 2) without it in the next weeks.

However, removing Bitcode when installing with CocoaPods is easy. Add this to your Podfile:

  post_install do |installer|
    # Find bitcode_strip
    bitcode_strip_path = `xcrun -sdk iphoneos --find bitcode_strip`.chop!

    # Strip Bitcode sections from the framework
    system("#{bitcode_strip_path} #{Dir.pwd}/Pods/BugfenderSDK/BugfenderSDK.xcframework/ios-arm64_x86_64-simulator/BugfenderSDK.framework/BugfenderSDK -r -o #{Dir.pwd}/Pods/BugfenderSDK/BugfenderSDK.xcframework/ios-arm64_x86_64-simulator/BugfenderSDK.framework/BugfenderSDK")
    system("#{bitcode_strip_path} #{Dir.pwd}/Pods/BugfenderSDK/BugfenderSDK.xcframework/ios-arm64_x86_64-maccatalyst/BugfenderSDK.framework/BugfenderSDK -r -o #{Dir.pwd}/Pods/BugfenderSDK/BugfenderSDK.xcframework/ios-arm64_x86_64-maccatalyst/BugfenderSDK.framework/BugfenderSDK")
    system("#{bitcode_strip_path} #{Dir.pwd}/Pods/BugfenderSDK/BugfenderSDK.xcframework/ios-arm64/BugfenderSDK.framework/BugfenderSDK -r -o #{Dir.pwd}/Pods/BugfenderSDK/BugfenderSDK.xcframework/ios-arm64/BugfenderSDK.framework/BugfenderSDK")
  end
jgimenez commented 1 week ago

We have just released the SDK version 2.0.0, without Bitcode.