shakebugs / shake-react-native

Bug reporting SDK for React Native apps.
https://shakebugs.com
12 stars 1 forks source link

Xcode 16 beta error when uploading build to testflight #6

Closed EugeniuszX closed 1 month ago

EugeniuszX commented 5 months ago

2024-06-26 10 34 50

surafelbm commented 2 months ago

@EugeniuszX , were you able to fix this?

lundb1tr commented 2 months ago

Also seeing this.

surafelbm commented 2 months ago

@lundb1tr , adding a script inside podfile post-install to remove the bitcode seems to work here is the code:

# Bitcode stripping logic
  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

  # Add the paths for Shake framework here
  framework_paths = [
    "Pods/Shake/Sources/Shake.xcframework/ios-arm64/Shake.framework/Shake",
    "Pods/Shake/Sources/Shake.xcframework/ios-arm64_x86_64-simulator/Shake.framework/Shake"
  ]

  # Execute bitcode stripping for the specified paths
  framework_paths.each do |framework_relative_path|
    strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
  end
lundb1tr commented 2 months ago

@lundb1tr , adding a script inside podfile post-install to remove the bitcode seems to work here is the code:

# Bitcode stripping logic
  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

  # Add the paths for Shake framework here
  framework_paths = [
    "Pods/Shake/Sources/Shake.xcframework/ios-arm64/Shake.framework/Shake",
    "Pods/Shake/Sources/Shake.xcframework/ios-arm64_x86_64-simulator/Shake.framework/Shake"
  ]

  # Execute bitcode stripping for the specified paths
  framework_paths.each do |framework_relative_path|
    strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
  end

Thank you, I will look into implementing this as part of our release flow for the version of the app that has Shake.

mstanic-shake commented 1 month ago

https://github.com/shakebugs/shake-ios/issues/38

Please check this issue