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

fix: add support for intel-based iOS simulator( __x86_64__) #370

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

MrFarhan
Copy link
Contributor

This PR will resolve following issues:

  • bug: Could not build Objective-C module 'react_native_turbo_image'

@duguyihou
Copy link
Owner

duguyihou commented Oct 17, 2024

@MrFarhan

Thanks for the PR. Have some questions:

  • I saw your change is in ios-arm64 folder. I think ios-arm64 means the real hardware of iOS devices. I don't think Apple have intel-based iOS devices.
  • Will it work if we apply your changes to ios-arm64_x86_64-simulator folder? In an XCFramework, ios-arm64_x86_64-simulator indicates that the framework includes slices for both the arm64 and x86_64 architectures for the iOS Simulator. From the second screenshot, it seems it only support arm64 iOS simulator.
image image

@MrFarhan
Copy link
Contributor Author

Below are the responses to your questions:

  • Yes, you are correct, ios-arm64 folder is meant for real iOS devices which use arm64 architecture. However, the issue here is with running the app on an iOS Simulator on an Intel-based Mac / macintosh PCs (which uses x86_64 architecture). This issue doesn't affect physical iOS devices.

My fix isn't targeting the hardware iOS devices, but only enabls support for the iOS Simulator on Intel-based Macs / Macintosh PCs. The code change explicitly allows the framework to support the x86_64 architecture alongside arm64, ensuring it works in both environments.

  • Yes, ideally it should work if the fix is done in ios-arm64_x86_64-simulator folder, but the issue is (i think) with configuration, when i run the project with any of my IOS simulator, it breaks on ios-arm64 swift file so the fix have to be in this file.

Note: I have followed your code of conduct and run all the lints and test cases which got pass after the fix.

@duguyihou
Copy link
Owner

@MrFarhan
Thanks for your explanation. I will merge it and release a new version.

@duguyihou duguyihou changed the title Added support of __x86_64__ (Windows / macintosh architecture) fix: add support for intel-based iOS simulator( __x86_64__) Oct 19, 2024
@duguyihou duguyihou merged commit 524aaf0 into duguyihou:main Oct 19, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants