Swift Modules, a swift module (or package) manager

Overview

Swift Modules

The Swift Modules manager similar to the JavaScript world's npm and bower

Installation

$ curl "https://raw.github.com/jankuca/swm/master/install.sh" | bash

Usage

Dependencies

Module dependencies are declared in a swiftmodule.json file in the JSON format:

{
  "name": "ModuleName",
  "directories": {
    "source": "src"
  },
  "dependencies": {
    "Dependency": "jankuca/dependecy",
    "MyOtherDependency": "git://github.com/jankuca/other-dependency"
  }
}
$ swm install

The dependencies are then importable via the import Swift statement using the names specified in the dependencies map of the swiftmodule.json file.

Using packages without a swiftmodule.json file

If a package does not include the swiftmodule.json file, the including package can specify the source file directory of the dependency in its swiftmodule.json.

{
  "name": "ModuleName",
  "dependencies": {
    "Dependency": "jankuca/dependency @source:src"
  }
}

Building

SWM can also build the actual app (the root module). If a source directory is specified in the swiftmodule.json file, all .swift files inside that subtree are compiled into a binary.

$ swm build

Note that swm install also runs this internally.

Code Signing

Once the app is built, it needs to be code-signed for distribution using a certificate obtained from Apple. SWM makes this dead simple by listing the available certificates and provisioning profiles.

There are two signing modes:

  1. store – should be used for signing for the App Store or other distribution
  2. device – should be used for signing for development and testing purposes; this adds a provisioning profile to the app package.
$ swm sign store
Certificate:
  1) CF826998D43332…499C595FCE980F20  "iPhone Developer: … (…)"
1
Signature for device
  Certificate: CF826998D43332…499C595FCE980F20
  Provisioning Profile: (none)
ok

The command prompts for the certificate number (1 in the case above).

$ swm sign device
Certificate:
  1) CF826998D43332…499C595FCE980F20  "iPhone Developer: … (…)"
1
Provisioning Profile:
  1) 7716db78-0b66-…-9fbf-3a9b653ec84a
1
Signature for device
  Certificate: CF826998D43332…499C595FCE980F20
  Provisioning Profile: 7716db78-0b66-…-9fbf-3a9b653ec84a
ok
You might also like...
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

Swift Package Manager plugin which runs ActionBuilder to create a Github Actions workflow for a swift package.

ActionBuilderPlugin A Swift Package Manager command which builds a Github Actions workflow for the current package. By default the workflow file will

A Swift package for parsing Clang module map files

Clangler is a Swift package used to parse Clang module map files into an abstract syntax tree (AST) representation. Once parsed, you can inspect or manipulate the nodes in the file, then generate and save a new file reflecting your changes.

An opinionated starting point for awesome, reusable Swift 5 modules

Swift 5 Module Template Use this template as a starting point for any Swift 5 module that you want other people to include in their projects. STATUS:

Interface-oriented router for discovering modules, and injecting dependencies with protocol in Objective-C and Swift.
Interface-oriented router for discovering modules, and injecting dependencies with protocol in Objective-C and Swift.

ZIKRouter An interface-oriented router for managing modules and injecting dependencies with protocol. The view router can perform all navigation types

A toolbox of AI modules written in Swift:  Graphs/Trees, Support Vector Machines, Neural Networks, PCA, K-Means, Genetic Algorithms
A toolbox of AI modules written in Swift: Graphs/Trees, Support Vector Machines, Neural Networks, PCA, K-Means, Genetic Algorithms

AIToolbox A toolbox of AI modules written in Swift: Graphs/Trees, Linear Regression, Support Vector Machines, Neural Networks, PCA, KMeans, Genetic Al

An opinionated starting point for awesome, reusable Swift 5 modules

Swift 5 Module Template Use this template as a starting point for any Swift 5 module that you want other people to include in their projects. STATUS:

Swift modules for game development.
Swift modules for game development.

Introduction I have been making iOS games with Swift, SceneKit, and SpriteKit since 2015 when I was in high school. After working on over a hundred pr

Declarative view styling in Swift. Inspired by CSS modules.
Declarative view styling in Swift. Inspired by CSS modules.

Gaikan gives you powerful styling capabilities using a declarative DSL in Swift. Inspired by React: CSS in JS and CSS modules. To style UIView(s) just

decoupling between modules in your iOS Project. iOS模块化过程中模块间解耦方案
decoupling between modules in your iOS Project. iOS模块化过程中模块间解耦方案

DecouplingKit 中文readme Podfile platform :ios, '7.0' pod 'DecouplingKit', '~ 0.0.2' DecouplingKit, decoupling between modules in your iOS Project. D

Custom MacBook login screen and pam modules using multipeer connectivity and usb hardware checks with iOS app for sign in.

Custom MacBook login screen and pam modules using multipeer connectivity and usb hardware checks with iOS app for sign in.

Used MVVM with with clear seperation to each modules

Classifieds Deployment Target: iOS 14.0, Xcode Version: Xcode 12.0 + Notes Used MVVVM with with clear seperation to each modules. Noted that image url

Modules to use with The Composable Architecture

TCA-Modules Modules to use with The Composable Architecture You can run Examples

React-native-photo-editor - Photo editor using native modules for iOS and Android
React-native-photo-editor - Photo editor using native modules for iOS and Android

🌄 Image editor using native modules for iOS and Android. Inherit from 2 available libraries, ZLImageEditor (iOS) and PhotoEditor (Android)

Task-Manager - Task Manager App With Swift
Task-Manager - Task Manager App With Swift

Task-Manager It's typical task manager where user can assign the importance, def

Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-4.0

RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-5.1

Comments
  • zsh: command not found: npm

    zsh: command not found: npm

    I know how to fix the problem, but some people don't use NodeJS and, probably, don't want to install it on their machines. Is there another way to install swm?

    opened by AlexDenisov 3
Owner
Jan Kuča
Avocode • js/node/react/testing
Jan Kuča
The Package Manager for the Swift Programming Language

Swift Package Manager Project The Swift Package Manager is a tool for managing distribution of source code, aimed at making it easy to share your code

Apple 9.1k Dec 29, 2022
A dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects.

Installation • Usage • Supporting Accio • Contributing • License ⚠️ Deprecation Notice ⚠️ With the release of Xcode 12 which includes Swift 5.3, we fe

Jamit Labs 647 Dec 25, 2022
A simple, decentralized dependency manager for Cocoa

Carthage Carthage is intended to be the simplest way to add frameworks to your Cocoa application. Carthage builds your dependencies and provides you w

Carthage 14.7k Jan 7, 2023
The Cocoa Dependency Manager.

CocoaPods: The Cocoa dependency manager CocoaPods manages dependencies for your Xcode projects. You specify the dependencies for your project in a sim

null 13.9k Jan 8, 2023
JKUI - a package included in this project that provides UIComponents

JKUI JKUI is a package included in this project that provides UIComponents. Befo

Juan Vasquez 2 Feb 11, 2022
Gradle plugin for managing Swift by enhancing Carthage with Maven repository

Works presents Athena Preface As a mobile application engineer that develops iOS and Android applications, I found that in Android, dependencies can b

Yunarta Kartawahyudi 1 Nov 3, 2020
NFCMate - A NFC Companion built using Swift with CoreNFC Framework

NFCMate NFCMate NFCMate is a NFC app written in Swift for iOS devices. Moreover,

Navemics 7 Nov 21, 2022
Helping you find inner peace when comparing version numbers in Swift

Helping you find inner peace when comparing version numbers in Swift. Comparing with the current applications version couldn't be easier. // App.versi

Christoffer Winterkvist 207 Jun 29, 2022
A framework for writing terminal applications in Swift.

Ashen A framework for writing terminal applications in Swift. Based on The Elm Architecture. As a tutorial of Ashen, let's consider an application tha

Colin T.A. Gray 79 Dec 5, 2022
A template for new Swift iOS / macOS / tvOS / watchOS Framework project ready with travis-ci, cocoapods, Carthage, SwiftPM and a Readme file

Swift Framework Template A template for new Swift Framework. What's in the template? Deployment Targets - iOS 9.0 / Mac OS X 10.10 / tvOS 9.0 / watchO

Rahul Katariya 529 Jun 27, 2022