Latest 1.3.0
Homepage https://github.com/square1-io/Square1-iOS-Tools
License MIT
Platforms ios 9.0

Square1 iOS Tools

CocoapodsPlatform

A handy collection of helpers, types and hacks used on our Swift projects.

Index

Prerequisites

  • iOS 9.0+
  • XCode 9+
  • Swift 4+

Installing

Cocoapods

If you’re already using Cocoapods in your project, just skip to step 3

  1. Install Cocoapods
  2. Create a Podfile for your project
  3. Make sure you use
    use_frameworks!
  4. Add this pod to your Podfile
    pod 'Square1Tools'
  5. Run pod install
  6. Use this import on every file you want to use the pod
    import Square1Tools

Running the tests

  1. Download the source project
  2. Hit Cmd + U to run the tests.

How to use

Check the documentation page.

Keychain

Keychain is a helper class to quickly access to stored values in iOS Keychain.

You can instance a Keychain object like this:

let keychain = Keychain()

// You can also instance it with a specific access group.
let anotherKeychain = Keychain(accessGroup: "MyGroup")

Using Keychain is straightforward :

// Save into keychain
keychain.save("Hello World!!", forKey: "MyKey") // returns true if ok, otherwise false

// Read from keychain
keychain.get("MyKey") // returns String?

// Delete from keychain
keychain.delete("MyKey") // returns true if ok, otherwise false

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.
Make sure you comment modified and new code and use Jazzy to generate new documentation before making a pul request.

Authors

License

This project is licensed under the MIT License – see the LICENSE file for details

Acknowledgments

To all the great Swift community out there.

Latest podspec

{
    "name": "Square1Tools",
    "version": "1.3.0",
    "summary": "A collection of tools used in our Swift projects",
    "description": "A handy collection of helpers, types and hacks used on our Swift projects",
    "homepage": "https://github.com/square1-io/Square1-iOS-Tools",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": "Square1",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/square1-io/Square1-iOS-Tools.git",
        "tag": "1.3.0"
    },
    "source_files": "Source/**/*.swift",
    "preserve_paths": "CommonCrypto/*",
    "xcconfig": {
        "HEADER_SEARCH_PATHS": "$(SDKROOT)/usr/include/CommonCrypto",
        "SWIFT_INCLUDE_PATHS": "$(inherited) ${PODS_TARGET_SRCROOT}/CommonCrypto"
    }
}

Pin It on Pinterest

Share This