[iOS] Build of framework including WebP.framework for achitecture arm64 not working
Problem Description
When I compile a xcframework with WebP embedded with the headers, I receive the error bellow:
ld: in /Users/Projects/libs/ikolb-apps-libs/WebP.framework/WebP(libwebpencode_la-config_enc.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/rafagan/Library/Developer/Xcode/DerivedData/iKolbAppsLibs-aamrawtqkbohumbztkmrcnjeixgh/Build/Intermediates.noindex/iKolbAppsLibs.build/Release-iphonesimulator/iKolbAppsLibs.build/Objects-normal/arm64/Binary/iKolbAppsLibs normal arm64
(1 failure)
There's a way to provide this library with arm64 support?
Reproduction Steps
Run something like below in shell:
xcodebuild archive \
-scheme $FRAMEWORK_NAME \
-configuration Release \
-project "${PROJECT_DIR}" \
-archivePath "${TMP_DIR}/simulator/$FRAMEWORK_NAME" \
-verbose \
-sdk iphonesimulator \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES \
clean build
@rafagan @amrit-1901 hello, I'm having the same issue. Any updates on this?
Any workaround?
Still running into this issue, can't run the app on my m1 mac
Got it working by just changing Architectures to x86_64 for your project at the root
Got it working by just changing Architectures to x86_64 for your project at the root
My solution only works for simulator :(
Got it working by just changing Architectures to x86_64 for your project at the root
My solution only works for simulator :(
ok here you go , heres a little, this is just for local development to build to ios simulator but for deployment (say with expo) this script doesn't need to run so just make sure that the architecture is standard for deployment node.js script i created
`const fs = require("fs")
const filePath = "./ios/app.xcodeproj/project.pbxproj"
fs.readFile(filePath, "utf8", function (err, data) { if (err) { return console.log(err) }
let result = data.replace(/ARCHS = "$(ARCHS_STANDARD)";/g, "ARCHS = x86_64;")
fs.writeFile(filePath, result, "utf8", function (err) { if (err) return console.log(err) console.log("File has been successfully updated") }) })`
