Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Carthage Support #25

Merged
merged 9 commits into from Aug 1, 2019
2 changes: 1 addition & 1 deletion .swiftlint.yml
Expand Up @@ -5,4 +5,4 @@ disabled_rules:
- trailing_whitespace # Disables SwiftLint complaining about whitespace characters on empty lines

excluded:
- Pods
- Carthage
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -24,17 +24,18 @@ env:
- DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" POD_LINT="NO" RUN_DANGER="NO"
cache:
directories:
- "Carthage"
- "~/.danger-swift"
addons:
homebrew:
update: true
taps:
- danger/tap
packages:
- carthage
- danger-swift
before_install:
- gem install cocoapods
- pod install
- carthage bootstrap --verbose --no-use-binaries --cache-builds
script:
- swiftlint
- set -o pipefail
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@
[Tyler Milner](https://github.com/tylermilner)
[#24](https://github.com/BottleRocketStudios/iOS-SessionTools/pull/24)

* Added Carthage support.
[Ryan Gant](https://github.com/ganttastic)
[#25](https://github.com/BottleRocketStudios/iOS-SessionTools/pull/25)

##### Bug Fixes

* None.
Expand Down
1 change: 1 addition & 0 deletions Cartfile
@@ -0,0 +1 @@
github "kishikawakatsumi/KeychainAccess" ~> 3.2.0
1 change: 1 addition & 0 deletions Cartfile.resolved
@@ -0,0 +1 @@
github "kishikawakatsumi/KeychainAccess" "v3.2.0"
50 changes: 0 additions & 50 deletions Podfile

This file was deleted.

16 changes: 0 additions & 16 deletions Podfile.lock

This file was deleted.

31 changes: 30 additions & 1 deletion README.md
Expand Up @@ -2,6 +2,7 @@

[![CI Status](http://img.shields.io/travis/BottleRocketStudios/iOS-SessionTools.svg?style=flat)](https://travis-ci.org/BottleRocketStudios/iOS-SessionTools)
[![Version](https://img.shields.io/cocoapods/v/SessionTools.svg?style=flat)](http://cocoapods.org/pods/SessionTools)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![License](https://img.shields.io/cocoapods/l/SessionTools.svg?style=flat)](http://cocoapods.org/pods/SessionTools)
[![Platform](https://img.shields.io/cocoapods/p/SessionTools.svg?style=flat)](http://cocoapods.org/pods/SessionTools)
[![codecov](https://codecov.io/gh/BottleRocketStudios/iOS-SessionTools/branch/master/graph/badge.svg)](https://codecov.io/gh/BottleRocketStudios/iOS-SessionTools)
Expand Down Expand Up @@ -168,7 +169,21 @@ Access the `userSessionState` property on the notification to easily get the sta

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.
To run the example project, you'll first need to use [Carthage](https://github.com/Carthage/Carthage) to install SessionTool's dependency ([KeychainAccess](https://github.com/kishikawakatsumi/KeychainAccess).

After [installing Carthage](https://github.com/Carthage/Carthage#installing-carthage), clone the repo:

```bash
git clone https://github.com/BottleRocketStudios/iOS-SessionTools.git
```

Next, use Carthage to install the dependencies:

```bash
carthage update
```

From here, you can open up `SessionTools.xcworkspace` and run the examples:

## Requirements

Expand All @@ -180,6 +195,8 @@ To run the example project, clone the repo, and run `pod install` from the Examp

## Installation

### CocoaPods
ganttastic marked this conversation as resolved.
Show resolved Hide resolved

SessionTools is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

Expand All @@ -193,6 +210,18 @@ Or if you're not working in an environment with access to the keychain, use the
pod 'SessionTools/Base'
```

### Carthage

Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile):

```
github "BottleRocketStudios/iOS-SessionTools"
```

Run `carthage update` and follow the steps as described in Carthage's [README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).

NOTE: Don't forget to add both `SessionTools.framework` and the `KeychainAccess.framework` dependency to your project if your environment has access to the keychain.

## Keychain Discussion

In the past, the keychain data you add from your app persists across installs. While this is still the case, we can't guarantee this will remain the case in future versions. [This post](https://forums.developer.apple.com/thread/36442#112814) summarizes that fact. In iOS 10.3 Beta 2, Apple added a feature to remove all application keychain data on uninstall, but reverted when it caused issues with existing apps. When/if Apple formalizes the behavoir, we will formalize here as well.
Expand Down