Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Swift Package Manager (SwiftPM, SPM)

Swift Package Manager (SwiftPM, SPM)

potatotips #29

Satoshi Hachiya

May 25, 2016
Tweet

More Decks by Satoshi Hachiya

Other Decks in Programming

Transcript

  1. $ swift build • Xcode Λ࢖Θͳ͍ͰύοέʔδશମΛϏϧυ͠·͢ɻ • Swift 3.0-devʢSwift 2.2

    ʹ͸ͳ͍ʣͰ͢ɻ • Apple ͷϦϙδτϦʹকདྷ૾͕هࡌ͞Ε͍ͯ·͕͢۩ମ తʹ͸·ͩΘ͔Γ·ͤΜɻ • Archive ͕ͳ͍Ͱ͕͢ Xcode ϓϩδΣΫτΛੜ੒͢ΔίϚ ϯυ͕͋Γ·͢ɻ`$ swift build -X`
 ʢকདྷతʹ Xcode ʹ૊Έࠐ·ΕΔΑ͏Ͱ͢ʣ 10
  2. Directory / File #if os(Linux) import Glibc #else import Darwin

    #endif #if os(Linux) public func isAccessible(name: String) -> Bool { guard !name.isEmpty else { return false } return access(name, F_OK) == 0 } #else public func isAccessible(path: String) -> Bool { guard !path.isEmpty else { return false } return access(path, F_OK) == 0 } #endif 13
  3. README Generator ৽͍͠ϓϩδΣΫτͷ README Λ؆୯ʹ࡞Ε·͢ʂ • It duplicates an existing

    README.md • It replaces strings (e.g. Name) in a README.md 21
  4. 

  5. 

  6. Find it "image not found” Λ୳͠·͢ʂ • "Find It" searches

    for a specified file in some directories. • It makes easy for you to compare your Xcode Build Settings and find a mistake. 24
  7. 

  8. 

  9. Development Snapshots Installer ৽͍͠ Snapshots Λ؆୯ʹΠϯετʔϧͰ͖·͢ʂ • It downloads a

    specified Developer Snapshot into your current working directory. • It installs the package via the sudo command. • It removes the pkg file. 28
  10. 

  11.