We're having issues with building a shared framewo...
# multiplatform
p
We're having issues with building a shared framework:
Both watchos-armv7k and watchos-arm64_32 represent two equivalent library definitions.
We're building the framework like this:
Copy code
xcodebuild -create-xcframework \
-framework ios/build/xcode-frameworks/iosArm64/SharedCode.framework \
-framework ios/build/xcode-frameworks/iosX64/SharedCode.framework \
-framework ios/build/xcode-frameworks/watchosArm64/SharedCode.framework \
-framework ios/build/xcode-frameworks/watchosX86/SharedCode.framework \
-framework ios/build/xcode-frameworks/watchosArm32/SharedCode.framework \
-output "$XCFRAMEWORK_DESTINATION_DIR"/SharedCode.xcframework
Did someone manage to get arm32 and arm64 working together for kotlin native on ios / watchos?
@Kai Limadjaja cc
l
@Paul Woitaschek Can you try making a XCFramework with this project? https://github.com/ge-org/multiplatform-swiftpackage
k
@louiscad what Platforms are you targeting with the ``watchOS { v("xxx") }`` shortcut in your configuration DSL?
l
@Kai Limadjaja I didn't use it for a watchOS project yet, but it worked nice for iOS x64 + iOS arm64
k
It looks promising. Could you point me to the file in the project where the actual build is assembled from the DSL config?
p
Thats the same:
Both watchos-arm64_32 and watchos-armv7k represent two equivalent library definitions.
@sergey.bogolepov You wrote something about changing it in the ide, but it doesn’t build in the first place
s
IDK, your error is different from the one from the issue. What are your Xcode and kotlin version?
p
It's kotlin 1.4.20 and Xcode 12.2
Just run
./bug.sh
Then you’ll get the error as above:
Both watchos-arm64_32 and watchos-armv7k represent two equivalent library definitions.
s
Thanks, I'll see what I can do!
It looks like a bug in
xcodebuild -create-xcframework
. What worked for me is creation of a fat framework from
watchosArm32
and
watchosArm64
and then adding it to xcframework instead of separate ones. Yeah, it is opposite to xcframework's motivation (moving away from fat frameworks), but there is neither documentation nor official answers on Apple developer forum, so... ¯\_(ツ)_/¯
p
Hm it's not showing up on a arm32 watch :(
We tested it on a watch series 3
@sergey.bogolepov do you have any link for an upstream bug? Due to this we have hit the 75mb limit
l
What limit are you referring to?
p
Watch apps can't be larger than 75mb
l
Per architecture?
Or did you actual get some rejection from the App Store?
p
The latter
ITMS-90389: Size Limit Exceeded - The size of watch application '/Payload/YAZIO.app/Watch/watchOS.app' (75MB) has exceeded the 75MB size limit. I don't fully understand the iOS structure, and if this is really caused by fat frameworks
l
Built in release mode?
p
Yep
s
do you have any link for an upstream bug?
Unfortunately, no.