Paul Woitaschek

    Paul Woitaschek

    1 year ago
    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:
    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
    louiscad

    louiscad

    1 year ago
    @Paul Woitaschek Can you try making a XCFramework with this project? https://github.com/ge-org/multiplatform-swiftpackage
    k

    Kai Limadjaja

    1 year ago
    @louiscad what Platforms are you targeting with the watchOS { v("xxx") } shortcut in your configuration DSL?
    louiscad

    louiscad

    1 year ago
    @Kai Limadjaja I didn't use it for a watchOS project yet, but it worked nice for iOS x64 + iOS arm64
    k

    Kai Limadjaja

    1 year ago
    It looks promising. Could you point me to the file in the project where the actual build is assembled from the DSL config?
    Paul Woitaschek

    Paul Woitaschek

    1 year ago
    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

    sergey.bogolepov

    1 year ago
    IDK, your error is different from the one from the issue. What are your Xcode and kotlin version?
    Paul Woitaschek

    Paul Woitaschek

    1 year ago
    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

    sergey.bogolepov

    1 year ago
    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... ¯_(ツ)_/¯
    Paul Woitaschek

    Paul Woitaschek

    1 year ago
    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
    louiscad

    louiscad

    9 months ago
    What limit are you referring to?
    Paul Woitaschek

    Paul Woitaschek

    9 months ago
    Watch apps can't be larger than 75mb
    louiscad

    louiscad

    9 months ago
    Per architecture?
    Or did you actual get some rejection from the App Store?
    Paul Woitaschek

    Paul Woitaschek

    9 months ago
    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
    louiscad

    louiscad

    9 months ago
    Built in release mode?
    Paul Woitaschek

    Paul Woitaschek

    9 months ago
    Yep
    s

    sergey.bogolepov

    9 months ago
    do you have any link for an upstream bug?
    Unfortunately, no.