From 112396bd61b5259ef313fa0262460766c4debd9c Mon Sep 17 00:00:00 2001 From: Yue Cai Date: Wed, 1 Jul 2020 06:12:04 +0800 Subject: [PATCH] add spm below the installation guide section --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ab3f778b..363dda84 100644 --- a/README.md +++ b/README.md @@ -158,11 +158,21 @@ How to debug CloudKit in production mode? See this [post](https://stackoverflow. ## Example -To run the example project, clone the repo, and run `pod install` from the Example directory first. +To run the example project, clone the repo, then open the `Example/IceCream_Example.xcodeproj`. -## Installation +## Installation Guide -Using Carthage or CocoaPods. +Using Swift Package Manager, Carthage or CocoaPods. + +### Swift Package Manager + +From Xcode 11, you can use [Swift Package Manager](https://swift.org/package-manager/) to add IceCream and its dependencies to your project. + +Select File > Swift Packages > Add Package Dependency. Enter https://github.com/caiyue1993/IceCream.git in the "Choose Package Repository" dialog. +In the next page, specify the version resolving rule as "Up to Next Major" with "1.13.1" as its earliest version. +After Xcode checking out the source and resolving the version, you can choose the "IceCream" library and add it to your app target. + +If you encounter any problem or have a question on adding the package to an Xcode project, I suggest reading the [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) guide article from Apple. ### Carthage