Latest 1.0.1
Homepage https://github.com/Camji55/Flipt-iOS-SDK
License MIT
Platforms ios 10.0
Authors

Flipt iOS SDK

Version
License
Platform

A native client sdk for Flipt, written in Swift for iOS apps.

Contents of this Readme

Installation

CocoaPods

Flipt is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Flipt"

Submodule

If you don’t use CocoaPods, you can still add Flipt as a submodule, drag and drop Flipt.xcodeproj into your project, and embed Flipt.framework in your target.

  • Drag Flipt.xcodeproj to your project
  • Select your app target
  • Click the + button on the Embedded binaries section
  • Add Flipt.framework

Manual

You can directly drag and drop the needed files into your project, but keep in mind that this way you won’t be able to automatically get all the latest Flipt features.

Usage

Setup

Make sure to import the Flipt SDK:

import Flipt

Flipt needs to be configured with your endpoint. Use either one of the following:

Flipt.configure(withEndpoint: "YOUR FLIPT API ENDPOINT HERE")

or

Flipt.configure(withEndpoint: "YOUR FLIPT API ENDPOINT HERE", refreshRate: TIME IN SECONDS HERE)

Both require an enpoint to communicate with the Flipt API. Optionally you can pass in a time interval in seconds to refresh the feature flags. Default is 300 seconds (5 minutes).

Checking Flag Values

To view a value of a feature flag, use:

Flipt.isFlagEnabled("YOUR FLIPT FEATURE FLAG KEY")

Replace with the key of feature flag defined on the Flipt dashboard, and this function will return true or false on whether the flag is enabled.

Notifications

Flipt also has support for a notification whenever the flags are refreshed:

Notification.Name.FliptFlagsUpdated

Authors

Flipt was made by Mark Phelps

Flipt-iOS-SDK was made by Cameron Ingham

License

Flipt is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Flipt",
    "version": "1.0.1",
    "summary": "An iOS Client SDK for Flipt.",
    "swift_version": "4.0",
    "description": "This is a native SDK to interact with Flipt --  an open source feature flag service.",
    "homepage": "https://github.com/Camji55/Flipt-iOS-SDK",
    "license": "MIT",
    "authors": {
        "Cameron Ingham": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/Camji55/Flipt-iOS-SDK.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "Flipt",
        "Flipt/**/*.{h,m,swift}"
    ]
}

Pin It on Pinterest

Share This