Closed DenTelezhkin closed 5 years ago
So, basically there are three ways to verify this integration works:
Run swift build
in the project directory. Unfortunately, huge downside of this method is that it only verifies building for macOS/Linux, and ignores other platforms. Currently i cannot find a way to force it to understand iOS, and be able to import UIKit for example. And unfortunately, this seems to be the only way to verify it on CI, since other two steps cannot be automated. I would love to know if there is a way to use swift build
for iOS/tvOS/watchOS, but currently I cannot find it.
Check locally - Double-click on Package.swift file. If Xcode 11 beta is installed, it should open with Dwifft package, and you should be able just build it, as a usual framework.
Integrate into another project. To do that, open another project in Xcode 11 beta, then go to project settings -> Swift Packages. Add package by url https://github.com/DenTelezhkin/Dwifft
, select branch swift-pm
. After merging url of course can be changed to https://github.com/jflinter/Dwifft
and master
branch, and eventually with concrete tag, or other option like .upToNextMajor
.
Sorry for the delay here @DenTelezhkin - this looks great. Thanks for adding!
Hey!
This PR adds support for Swift Package Manager in Xcode 11, which finally allows building for other platforms than Linux and MacOS.
I've set iOS, tvOS and macOS deployment targets to the same targets set in the podspec file. Swift tools version is set to 5.1 because SPM does not integrate to Xcode lower than Xcode 11 anyway.
Additional information:
https://developer.apple.com/documentation/swift_packages/creating_a_swift_package_with_xcode
https://developer.apple.com/videos/play/wwdc2019/410/