Closed Legoless closed 4 years ago
@Legoless what changes do we need to include in order to support macOS?
@zenangst SPM cannot separately have files per platform, so all files are included for the project. You would have to add conditional imports to all Mac/iOS files that aren't shared. For example:
#if canImport(UIKit)
... iOS/tvOS code...
#endif
And in macOS only files:
#if canImport(AppKit)
... macOS only code ...
#endif
For the case above, I only included iOS/tvOS section and macOS files aren't in there. If I add them, it will no longer compile on either platform. :) And once you have Package.swift
in repo, you also need to create a new version on Github, otherwise it will not load in Xcode.
This PR adds the ability to installs Blueprints as a Swift Package on iOS/tvOS. Due to project structure macOS is not yet supported.