All Projects → j-channings → Swift Package Manager Ios

j-channings / Swift Package Manager Ios

Licence: mit
Example of how to use SPM v4 to manage iOS dependencies

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Swift Package Manager Ios

Swift
🥇Swift基础知识大全,🚀Swift学习从简单到复杂,不断地完善与更新, 欢迎Star❤️,欢迎Fork, iOS开发者交流:①群:446310206 ②群:426087546
Stars: ✭ 1,377 (+927.61%)
Mutual labels:  swift-package-manager
Randomkit
Random data generation in Swift
Stars: ✭ 1,458 (+988.06%)
Mutual labels:  swift-package-manager
Yaap
Yet Another (Swift) Argument Parser
Stars: ✭ 124 (-7.46%)
Mutual labels:  swift-package-manager
Buckets Swift
Swift Collection Data Structures Library
Stars: ✭ 106 (-20.9%)
Mutual labels:  swift-package-manager
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+7889.55%)
Mutual labels:  swift-package-manager
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (-12.69%)
Mutual labels:  swift-package-manager
Xmlmapper
A simple way to map XML to Objects written in Swift
Stars: ✭ 90 (-32.84%)
Mutual labels:  swift-package-manager
Sliders Swiftui
Collection of unique fully customizable SwiftUI sliders, joysticks, trackpads and more!
Stars: ✭ 132 (-1.49%)
Mutual labels:  swift-package-manager
Alamofire
Elegant HTTP Networking in Swift
Stars: ✭ 36,896 (+27434.33%)
Mutual labels:  swift-package-manager
Swift Xcode
Use Swift Package Manager directly from within Xcode, w/o the cmdline
Stars: ✭ 121 (-9.7%)
Mutual labels:  swift-package-manager
Interact
Brand New SwiftUI Library For Adding Dynamic Interaction To Views With Just A Single Modifier!
Stars: ✭ 107 (-20.15%)
Mutual labels:  swift-package-manager
Appicon
AppIcon generates *.appiconset contains each resolution image for iOS
Stars: ✭ 1,454 (+985.07%)
Mutual labels:  swift-package-manager
Surmagic
🚀 The better way to deal with Binary Frameworks on iOS, Mac Catalyst, tvOS, macOS, and watchOS. Create XCFrameworks with ease.
Stars: ✭ 119 (-11.19%)
Mutual labels:  swift-package-manager
Is Camera On
Check if the built-in Mac camera is on
Stars: ✭ 101 (-24.63%)
Mutual labels:  swift-package-manager
Liquid
Create a playful backsplash in SwiftUI.
Stars: ✭ 127 (-5.22%)
Mutual labels:  swift-package-manager
Id3tageditor
🎵🎸A Swift library to read and write ID3 Tag of any mp3 file. Supported ID3 tag version: 2.2, 2.3 and 2.4. Supported platform: iOS, macOS, tvOS, watchOS, Linux Ubuntu. 🎵🎸
Stars: ✭ 101 (-24.63%)
Mutual labels:  swift-package-manager
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+7962.69%)
Mutual labels:  swift-package-manager
Coregpx
A library for parsing and creation of GPX location files. Purely Swift.
Stars: ✭ 132 (-1.49%)
Mutual labels:  swift-package-manager
Natrium
A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
Stars: ✭ 131 (-2.24%)
Mutual labels:  swift-package-manager
Bettersegmentedcontrol
An easy to use, customizable replacement for UISegmentedControl & UISwitch.
Stars: ✭ 1,782 (+1229.85%)
Mutual labels:  swift-package-manager

Swift Package Manager with iOS

This project demonstrates a working method for using Swift Package Manager (SPM) to manage the dependencies of an iOS project. It has been tested with Xcode 9.1, using Swift 4 and the SPM v4 description format.

Note: At this time there is no official support for iOS targets or the related system libraries in SPM.

To get started:

  1. Install the xcodeproj ruby library: sudo gem install xcodeproj

  2. Run ruby generate-project-dependencies.rb in the project root directory. This will pull down dependencies as defined in Package.swift and then generate and modify a Dependencies project which is then included as a sub-project by the example project.

  3. Open SwiftPackagesWithiOS.xcodeproj in Xcode

  4. Build the main target (you may need to manually build the target for the Dependencies sub-project).

This will build a simple app that depends on RxSwift. RxSwift was chosen because it shows how to handle modules generated from Objective-C.

The end result will be a standard iOS application, with Static Frameworks for each of its dependencies embedded within the bundle.

You can link the dependencies dynamically if you prefer, by removing the config.build_settings['MACH_O_TYPE'] = 'staticlib' line in generate-project-dependencies.rb. If you do this you will need to embed the dependencies in your main app target.

You can step through the commits to see what steps were taken, with a brief overview of the process below.

Process:

(This process hasn't been tested with Xcode 8.3 & Swift 3.1)

  1. Generate iOS App project with Xcode
  2. Generate swift package for Dependencies
  3. Create dummy source file for Dependencies (I've chosen to put this in .deps-sources but does not necessarily need to be hidden)
  4. Modify build settings in generated xcodeproj (this is done in generate-project-dependencies.rb)
  5. Add Dependencies.xcodeproj as subproject of the main app xcodeproj
  6. Add a dependency (to RxSwift in this example) in Package.swift
  7. Link our App with the new Rx*.frameworks
  8. Write some sample code to verify that the import works
  9. Override MODULEMAP_FILE setting for non-Swift modules
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].