Last active
January 26, 2022 06:36
-
-
Save hendych/94a9a444522571a2c08e4bb551d9fa0f to your computer and use it in GitHub Desktop.
convert lib arm64 built for iOS devices to arm64 simulator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In older arm64 architecture, xcode will build the library for iPhone devices. | |
# We need to change LC_VERSION_MIN_IPHONEOS to IOSSIMULATOR in the library linking command. | |
# You can check if the arm64 arch support simulator or not by running this command below: | |
# otool -l -arch arm64 lib.a | |
# We can create xcframework manually by creating folder with extension .xcframework, | |
# then inside the dir, we can create ios-arm64 and ios-arm64_x86_64-simulator folder with each contains framework | |
# or library that we want to link. | |
# | |
# But first we can remove the unused arch using this command | |
# lipo -remove <armv7/i386/x86_64> iOS/SDK.framework/SDK -output SDK | |
# Next, convert the remaining arm64 architecture from LC_VERSION_MIN_IPHONEOS to IOSSIMULATOR: | |
# https://github.com/hendych/arm64-to-sim/blob/main/Sources/arm64-to-sim/main.swift |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment