XCFramework for Catalyst support

Hi folks!

I'm working on testing the binary support with Firebase and ran into something that I think is an issue (but looking for guidance if I'm right about that :smile:).

We have an XCFramework built that supports iOS, the iOS simulator, and Catalyst (not native macOS). In the implementation for some reason, it checks if macos is supported and bails out if not, even if macOS isn't listed as supported in the package manifest.

The code in question:

The relevant portion of the xcframework's Info.plist:

<dict>
    <key>LibraryIdentifier</key>
    <string>ios-x86_64-maccatalyst</string>
    <key>LibraryPath</key>
    <string>GoogleUtilities.framework</string>
    <key>SupportedArchitectures</key>
    <array>
    	<string>x86_64</string>
    </array>
    <key>SupportedPlatform</key>
    <string>ios</string>
    <key>SupportedPlatformVariant</key>
    <string>maccatalyst</string>
</dict>

I was looking at testing this in an actual iOS app to see if this was an issue but ran into other integration problems with the snapshot I was working with (SwiftPM version says 5.2 so I couldn't use binary frameworks, may have to build it myself?).

Please let me know if I'm missing something or this should be addressed.

Thanks,
Ryan

1 Like

Hi Ryan,

the build system in commandline SwiftPM only supports building for one Apple platform, macOS, that's why this check is in place.

Xcode's support for Swift packages does not actually use libSwiftPM from any snapshot, but always the one bundled with the Xcode you are running, so there is currently no way use the binary dependencies feature in Xcode.

So I am afraid that right now there is no way to test a binary package which does not support macOS.

Thanks,
Boris

Apologies for the late reply - thanks for letting me know. I guess we'll have to wait until it's integrated into an Xcode beta to try it out!

1 Like

Xcode 11.5 beta is out today. Anyone know if it supports the new Swift 5.3 SPM features?

It does not, it has Swift 5.2.x

1 Like

Sad. I will keep waiting. Thanks for the quick reply :)

Terms of Service

Privacy Policy

Cookie Policy