Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dduan/swift-framework-without-xcode
A sample project to demonstrate how to build and link to Swift frameworks dynamically without using Xcode.
https://github.com/dduan/swift-framework-without-xcode
Last synced: 29 days ago
JSON representation
A sample project to demonstrate how to build and link to Swift frameworks dynamically without using Xcode.
- Host: GitHub
- URL: https://github.com/dduan/swift-framework-without-xcode
- Owner: dduan
- Created: 2015-07-06T18:02:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-06T18:27:25.000Z (over 9 years ago)
- Last Synced: 2023-04-20T21:47:22.358Z (over 1 year ago)
- Language: Makefile
- Size: 86.9 KB
- Stars: 21
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Without Xcode, how would one use `swiftc` to compile and dynamically link to
Swift frameworks?This project demostrates one way to achieve that.
(It's really just some combinations of commandline options for `swiftc` in
a Makefile.)You can read more about it in this [blog post](http://dduan.net/post/2015/07/dynamic-swift-framework-without-xcode/)
## Usage
1. Under the *Frameworks* folder, create a folder named after the "framework",
place all source files for this framework in the root level of this folder.
2. Open *Makefile*, add the folder name to the values of the `LIBS` variable
(separated by a space).
3. Change `APP_NAME` to your application's name.
4. List the relative path of the Swift source files in the `SOURCES` variable.
5. Type `make`, and your app will be built in the *build* folder.Now you can import the frameworks in your application code the normal way and
the app will build and run as expected.*main.swift* and *Frameworks/Answer* are there as an example.