Skip to content

Commit

Permalink
Merge pull request #78 from afterpay/create-xcframework
Browse files Browse the repository at this point in the history
Add the ability to generate an xcframework for releases
  • Loading branch information
adamjcampbell authored Jul 21, 2020
2 parents f3f09d4 + 95cf636 commit 9700d5a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions Mintfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
realm/[email protected]
unsignedapps/[email protected]
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import PackageDescription

let package = Package(
name: "Afterpay",
platforms: [
.iOS(.v12),
],
products: [
.library(name: "Afterpay", targets: ["Afterpay"]),
],
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ The Afterpay iOS SDK provides conveniences to make your Afterpay integration exp
- [SwiftUI](#swiftui)
- [Examples](#examples)
- [Building](#building)
- [Mint](#mint)
- [Running](#running)
- [XCFramework](#xcframework)
- [Contributing](#contributing)
- [License](#license)

Expand Down Expand Up @@ -205,11 +208,19 @@ The [example project][example] demonstrates how to include an Afterpay payment f

# Building

## Mint

The Afterpay SDK uses [Mint][mint] to install and run Swift command line packages. This has been pre-compiled and included in the repository under the [`Tools/mint`][mint-directory] directory, meaning it does not need to be installed or managed externally.

> **NOTE:** Mint will automatically download the packages it manages on demand. To speed up the initial build of the SDK, the packages can be downloaded by running the [`Scripts/bootstrap`][bootstrap] script.
Building the project is as simple as cloning the repository, opening [`Afterpay.xcworkspace`][afterpay-workspace] and building the `Afterpay` target. The example project can be built and run via the `Example` target.
## Running

Building and running the project is as simple as cloning the repository, opening [`Afterpay.xcworkspace`][afterpay-workspace] and building the `Afterpay` target. The example project can be built and run via the `Example` target.

## XCFramework

A `.xcframework` can be generated by running the included [`create-xcframework`][create-xcframework].

# Contributing

Expand All @@ -226,6 +237,7 @@ This project is licensed under the terms of the Apache 2.0 license. See the [LIC
[bootstrap]: Scripts/bootstrap
[carthage]: https://github.com/Carthage/Carthage
[contributing]: CONTRIBUTING.md
[create-xcframework]: Scripts/create-xcframework
[example]: Example
[git-submodule]: https://git-scm.com/docs/git-submodule
[latest-release]: https://github.com/afterpay/sdk-ios/releases/latest
Expand Down
3 changes: 3 additions & 0 deletions Scripts/create-xcframework
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

./Tools/mint/mint run swift-create-xcframework

0 comments on commit 9700d5a

Please sign in to comment.