https://kotlinlang.org logo
#ios
Title
# ios
a

Akash

01/07/2022, 6:13 PM
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

Paul Weber

01/07/2022, 6:16 PM
You’re probably not building an artifact for arm64-apple-ios-simulator architecture. Could you show your
shared
module’s
build.gradle.kts
?
a

Akash

01/07/2022, 6:26 PM
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

Paul Weber

01/07/2022, 6:27 PM
Ah, sorry.
Hold up, I’ll quickly check Xcode myself
a

Akash

01/07/2022, 6:28 PM
sure
This error with M1 mac…. I have Intel base
p

Paul Weber

01/07/2022, 6:29 PM
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

Akash

01/07/2022, 6:32 PM
manually via xcodebuild
p

Paul Weber

01/07/2022, 6:37 PM
Meh, can’t really find something to help you, sorry.
a

Akash

01/07/2022, 6:38 PM
NP, Thank you for quick response 🙂
p

Paul Weber

01/07/2022, 6:39 PM
The only thing I do know is that you need to ship an
XCFramework
instead of whatever you shipped before
s

Sam

01/08/2022, 2:19 PM
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

Akash

01/08/2022, 3:24 PM
@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

Sam

01/08/2022, 10:43 PM
You don’t need it. It is only for M1 macs.
s

Sebastien Leclerc Lavallee

01/10/2022, 5:02 AM
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
11 Views