react-native-zendesk-messaging icon indicating copy to clipboard operation
react-native-zendesk-messaging copied to clipboard

Release build failing on XCode Version 16.0 (16A242d) Mac OS Sequoia (15.0 (24A335))

Open adilsaeed31 opened this issue 1 year ago • 5 comments
trafficstars

Describe the bug Release build failing on XCode Version 16.0 (16A242d) Mac OS Sequoia (15.0 (24A335))

To Reproduce Steps to reproduce the behavior: Generate a release build with Zendesk Logger packages

Expected behavior Should generate a normal build

Screenshots Screenshot 2024-09-17 at 6 44 50 PM

Environment (please complete the following information):

  • Platform: Mac OS Sequoia (15.0 (24A335))
  • React Native Version 0.74
  • Zendesk SDK Version : react-native-zendesk-messaging: ^0.2.1

Additional context I have a React native project and I'm using this package now after updating to Mac Sequoia the build is failing and showing the above error. It's super urgent, We have a launch of our app on Sep 19th, 2024, Could you please tell me the fix?

Thank you.

adilsaeed31 avatar Sep 17 '24 15:09 adilsaeed31

+1

sina3p2p avatar Sep 20 '24 21:09 sina3p2p

+1

ehtisham-ali-emumba avatar Sep 23 '24 13:09 ehtisham-ali-emumba

have someone solved it?

Andriiklymiuk avatar Oct 07 '24 10:10 Andriiklymiuk

@Andriiklymiuk No it's still the same.

masaeed-phcc avatar Oct 07 '24 10:10 masaeed-phcc

This is an issue with the Zendesk native SDKs that this library is depending on. Xcode 16 has stricter bitcode validation compared to earlier versions, that's why this is now popping up.

You should be able use a code snippet from this link to remove leftover bitcode from any frameworks. Just add any frameworks that cause bitcode issues to the framework_paths array. https://support.zendesk.com/hc/en-us/community/posts/8057481044378/comments/8115692442010

post_install do |installer|
    
    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 = [
     "Pods/ZendeskSDKConfigurationsSDK/SDKConfigurations.xcframework/ios-arm64/SDKConfigurations.framework/SDKConfigurations"
   ]
   
   framework_paths.each do |framework_relative_path|
     strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
   end
   
end

mikkoseppa avatar Oct 08 '24 18:10 mikkoseppa

This is an issue with the Zendesk native SDKs that this library is depending on. Xcode 16 has stricter bitcode validation compared to earlier versions, that's why this is now popping up.

You should be able use a code snippet from this link to remove leftover bitcode from any frameworks. Just add any frameworks that cause bitcode issues to the framework_paths array. https://support.zendesk.com/hc/en-us/community/posts/8057481044378/comments/8115692442010

post_install do |installer|
    
    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 = [
     "Pods/ZendeskSDKConfigurationsSDK/SDKConfigurations.xcframework/ios-arm64/SDKConfigurations.framework/SDKConfigurations"
   ]
   
   framework_paths.each do |framework_relative_path|
     strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
   end
   
end

this didnt work for me

kfchan-git avatar Oct 14 '24 09:10 kfchan-git

i've made a temporary fix by navigating to ios/Pods/ZendeskSDKLogger/ZendeskSDKLogger.xcframework/ios-arm64 and running

xcrun bitcode_strip -r ZendeskSDKLogger.framework/ZendeskSDKLogger -o ZendeskSDKLogger.framework/ZendeskSDKLogger

feel free to correct me if there is a better solution

kfchan-git avatar Nov 07 '24 07:11 kfchan-git

i've made a temporary fix by navigating to ios/Pods/ZendeskSDKLogger/ZendeskSDKLogger.xcframework/ios-arm64 and running

xcrun bitcode_strip -r ZendeskSDKLogger.framework/ZendeskSDKLogger -o ZendeskSDKLogger.framework/ZendeskSDKLogger

feel free to correct me if there is a better solution

do we need to run that command every time before generating the final release build?

adilsaeed31 avatar Nov 07 '24 08:11 adilsaeed31

i've made a temporary fix by navigating to ios/Pods/ZendeskSDKLogger/ZendeskSDKLogger.xcframework/ios-arm64 and running

xcrun bitcode_strip -r ZendeskSDKLogger.framework/ZendeskSDKLogger -o ZendeskSDKLogger.framework/ZendeskSDKLogger

feel free to correct me if there is a better solution

do we need to run that command every time before generating the final release build?

i just run it after every pod-install

kfchan-git avatar Nov 07 '24 08:11 kfchan-git

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 07 '24 10:12 stale[bot]

Same problem here

enmanuel-mctekk avatar Feb 17 '25 20:02 enmanuel-mctekk

The App Store is displaying the following iOS SDK warning:

ITMS-90725: SDK Version Issue
This app was built with the iOS 17.4 SDK. Starting April 24, 2025, all iOS and iPadOS apps must be built with the iOS 18 SDK or later, included in Xcode 16 or later, in order to be uploaded to App Store Connect or submitted for distribution.

Actions Taken:

  • Upgraded Expo to version 52.
  • Updated the iOS build image in eas.json:
    • From: Xcode 15.3
    • To: Xcode 16 (macos-sequoia-15-xcode-16)

Current Issue:

  • Encountering the same Bitcode-related error

ChrisWiles avatar Apr 05 '25 18:04 ChrisWiles

same issue

hitmanche avatar Apr 18 '25 10:04 hitmanche

This needs to be reopened, for peoiple using eas its not easily possible to remove the bitcode before release.

jaslloyd avatar Apr 26 '25 12:04 jaslloyd

@leegeunhyeok Excuse the direct tag but any ideas...the only other alternative for us is to remove it completely.

jaslloyd avatar Apr 26 '25 12:04 jaslloyd

I bandaged this issue with EAS by using a post-install build hook:

Create eas-build-post-install.sh:

#!/bin/bash
set -euo pipefail

# Temporary workaround for Zendesk bitcode issue
# See: https://github.com/leegeunhyeok/react-native-zendesk-messaging/issues/52#issuecomment-2461551783

ORIGINAL_DIR=$(pwd)

echo "🔎 Navigating to Zendesk binary directory..."

cd ios/Pods/ZendeskSDKLogger/ZendeskSDKLogger.xcframework/ios-arm64/

if [ -f "ZendeskSDKLogger.framework/ZendeskSDKLogger" ]; then
  echo "⚡ Stripping bitcode..."
  xcrun bitcode_strip -r ZendeskSDKLogger.framework/ZendeskSDKLogger -o ZendeskSDKLogger.framework/ZendeskSDKLogger
  echo "✅ Bitcode strip complete!"
else
  echo "❌ ZendeskSDKLogger binary not found. Skipping."
fi

# Return to the original working directory
cd "$ORIGINAL_DIR"

In package.json scripts:

"eas-build-post-install": "./eas-build-post-install.sh"

pfcodes avatar Apr 28 '25 08:04 pfcodes