Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project layout for Swift Package Manager #157

Open
fulldecent opened this issue Apr 15, 2016 · 6 comments
Open

Update project layout for Swift Package Manager #157

fulldecent opened this issue Apr 15, 2016 · 6 comments

Comments

@fulldecent
Copy link
Collaborator

fulldecent commented Apr 15, 2016

Update the template layout so that libraries started with pod-template can be used from Swift Package Manager.

I recommend we take the AlamoFire approach: make it work but don't officially support it until SPM gets a stable API.

Here is a simple iOS framework which supports CocoaPods, Carthage, SPM, testing, an example project and CI https://github.com/fulldecent/FDChessboardView It is based entirely off the project layout for AlamoFire.

Please let me know if a PR that updates pod-template to be like that project would be well received.


Note on testing SPM compliance

Currently we cannot test SPM because it does not actually support iOS (https://stackoverflow.com/questions/34778823/swift-package-manager-uikit-dependency).

When SPM supports iOS we can use this Travis CI script:

sudo: required
before_install:
  - wget https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a/swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a-osx.pkg
  - export PATH=${PWD}/swift-DEVELOPMENT-*/usr/bin:"${PATH}"
  - installer -pkg swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a-osx.pkg -target /
  - export PATH=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a.xctoolchain/usr/bin:"${PATH}"
script:
  - git clone https://github.com/apple/swift-package-manager
  - cd swift-package-manager && git checkout 151a973 && cd ../
  - swift-package-manager/Utilities/bootstrap
  - ${PWD}/swift-package-manager/.build/debug/swift-build
  - ${PWD}/swift-package-manager/.build/debug/swift-test

(adapted from http://ankit.im/swift/2016/02/17/swift-package-manager-testing-preview/)

OPEN PR: #179

@orta
Copy link
Member

orta commented Apr 15, 2016

Depending on how wide a scope you want to make this, it could also cover trying to test these out on CI

@fulldecent
Copy link
Collaborator Author

I am thinking minimally viable product here is to make it work. Testing comes later (famous last words). I have just reached out to the Swift mailing list requesting assistance with this.

@orta
Copy link
Member

orta commented Apr 15, 2016

👍

@fulldecent fulldecent changed the title Achieve full compatibility with Swift Package Manager Achieve full compatibility with Swift Package Manager [BLOCKED] May 2, 2016
@fulldecent fulldecent changed the title Achieve full compatibility with Swift Package Manager [BLOCKED] Add Package.swift for Swift Package Manager May 4, 2016
@fulldecent fulldecent changed the title Add Package.swift for Swift Package Manager Update project layout for Swift Package Manager May 4, 2016
@fulldecent
Copy link
Collaborator Author

Update: clarified that this issue results in changing the layout of the project.

@orta
Copy link
Member

orta commented May 4, 2016

Cool, yeah the layout makes sense - a warning this will be quite a bit of work simply making sure everything hooks back up again 👍

@fulldecent
Copy link
Collaborator Author

Update: this is fixed in #179.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants