rive-app / rive-ios

iOS runtime for Rive
MIT License
516 stars 58 forks source link

rive-ios missing macCatalyst platform build #235

Open nathantannar4 opened 2 years ago

nathantannar4 commented 2 years ago

Description

When attempting to use Rive with a macCatalyst target, the build will fail because the .xcframework is never built for macCatalyst.

// How to build for Mac Catalyst
xcodebuild archive -project "$FRAMEWORK".xcodeproj -scheme "$FRAMEWORK" \
    -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' \
    -archivePath "$FRAMEWORK"MC.xcarchive

Provide a Repro

Open the "Demo-App" that uses SPM. Change the build setting for "Supports Mac Catalyst" to YES. This will allow Catalyst compilation, but it will fail due to Rive not being supported. The only macCatalyst support that exists is if you build for iOS but then run it on an Apple silicon Mac, but that is not full Catalyst support.

Expected behavior

Docs say catalyst is supported, so I would expect the xcframework to support true Mac catalyst compilation.

Device & Versions

Additional context

The Package.swift should also be corrected to include the macCatalyst platform.

// swift-tools-version:5.5
import PackageDescription

let package = Package(
    name: "RiveRuntime",
    platforms: [
        .iOS(.v14),
        .macCatalyst(.v14)
    ],
...

I attempted to try and fix these but am having trouble building the rive dependencies.

To fix this issue for rive, the build scripts need to be updated to include a --destination that can specify macCatalyst

// How to build for Mac Catalyst
xcodebuild archive -project "$FRAMEWORK".xcodeproj -scheme "$FRAMEWORK" \
    -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' \
    -archivePath "$FRAMEWORK"MC.xcarchive
OskarGroth commented 1 year ago

Please add this + Mac platform support 🙏

The-Real-Thisas commented 1 year ago

Bump

molind commented 8 months ago

Mac Catalyst in mentioned among supported platforms in readme. But it's not supported. May be it's a bug already?

The-Real-Thisas commented 8 months ago

https://github.com/rive-app/rive-ios?tab=readme-ov-file#supported-devices It is supposed to be supported.

The-Real-Thisas commented 8 months ago

Currently, this runtime library supports a minimum iOS version of 14.0+. Devices supported include iPhone, iPad, and Mac catalyst. macOS support supports a targeted version of 13.1.

molind commented 8 months ago

@The-Real-Thisas You can check contents of a xcframework. It should contain ios-arm64_x86_64-maccatalyst to support mac catalyst.

molind commented 4 months ago

Bump