Hello Tech Geeks, I’m getting an error with my iO...
# ios
a
Hello Tech Geeks, I’m getting an error with my iOS framework while using on M1-chip mac. “Could not find module ‘KycSDK’ for target ‘arm64-apple-ios-simulator’; found:x86_64-apple-ios-simulator, x86_64,”
p
You’re probably not building an artifact for arm64-apple-ios-simulator architecture. Could you show your
shared
module’s
build.gradle.kts
?
a
Hi Paul, Thank you for quick reply. It’s iOS/Swift framework not android. So, I don’t have gradle file. I’m attaching a screen shot of architecture configuration (Build setting)
@Paul Weber
p
Ah, sorry.
Hold up, I’ll quickly check Xcode myself
a
sure
This error with M1 mac…. I have Intel base
p
Yeah,
arm64-apple-ios-simulator
is the ios simulator on m1 macs. Still looking 🙂
How are you building this framework artifact? manually via
xcodebuild
or via a gradle script?
a
manually via xcodebuild
p
Meh, can’t really find something to help you, sorry.
a
NP, Thank you for quick response 🙂
p
The only thing I do know is that you need to ship an
XCFramework
instead of whatever you shipped before
s
Yes, if you're shipping a framework for someone to consume, use an xcframework with both simulator slices. If you're just building it as part of an application build, just use the embedAndSignXcode gradle task. One temporary workaround to not have to do the xcframework is to run Xcode in Rosetta mode. That can be necessary if another third party isn't shipping an arm simulator binary. It slows Xcode down some and makes using SwiftUI difficult if not impossible which is why I say temporary.
a
@Sam I’m not able too see option Rosetta to open Xcode in Rosetta mode. How can I enable Rosetta mode for XCODE. I’m using Intel base mac not M1-chip
s
You don’t need it. It is only for M1 macs.
s
To open Xcode with Rosetta, you right click on Xcode and then Get Info. On the pane that opened, there should be a Open with Rosetta checkbox