Coder Social home page Coder Social logo

flagsmith / flagsmith-ios-client Goto Github PK

View Code? Open in Web Editor NEW
16.0 9.0 12.0 146 KB

iOS Client written in Swift for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/

Home Page: https://www.flagsmith.com/

License: BSD 3-Clause "New" or "Revised" License

Ruby 1.65% Swift 98.35%
feature-flags feature-flag remote-config ci cd continuous-integration continuous-deployment continuous-delivery feature-toggles feature-toggle

flagsmith-ios-client's Introduction

Feature Flag, Remote Config and A/B Testing platform, Flagsmith

Stars Docker Pulls Docker Image Size Join the Discord chat Coverage Built with Depot

Flagsmith is an open source, fully featured, Feature Flag and Remote Config service. Use our hosted API, deploy to your own private cloud, or run on-premise.

Flagsmith

Flagsmith makes it easy to create and manage features flags across web, mobile, and server side applications. Just wrap a section of code with a flag, and then use Flagsmith to toggle that feature on or off for different environments, users or user segments.

Get up and running in less than a minute:

curl -o docker-compose.yml https://raw.githubusercontent.com/Flagsmith/flagsmith/main/docker-compose.yml
docker-compose -f docker-compose.yml up

The application will bootstrap an admin user, organisation, and project for you. You'll find a link to set your password in your Compose logs:

Superuser "[email protected]" created successfully.
Please go to the following page and choose a password: https://localhost:8000/password-reset/confirm/.../...

Flagsmith Screenshot

Features

  • Feature flags. Release features with confidence through phased roll-outs.
  • Remote config. Easily toggle individual features on and off, and make changes without deploying new code.
  • A/B and Multivariate Testing. Use segments to run A/B and multivariate tests on new features. With segments, you can also introduce beta programs to get early user feedback.
  • Organization Management. Organizations, projects, and roles for team members help keep your deployment organized.
  • Integrations. Easily enhance Flagsmith with your favourite tools.

Trying Flagsmith

Flagsmith hosted SaaS

You can try our hosted version for free at https://flagsmith.com/

Flagsmith Open Source

The Flagsmith API is built using Python 3, Django 2, and DjangoRestFramework 3. You can try the application out using:

We also have options for deploying to AWS, GCP, Azure and On-Premise. If you need help getting up and running, please get in touch!

Overview

This repository is formed of 2 core components, the REST API (found in /api) and the web-based administrator dashboard (found in /frontend) that you can use to manage Flagsmith. Technical documentation for each component can be found at the API and Frontend pages within our Documentation

These two components run as separate applications. The web-based dashboard is a single page app that communicates via REST calls to the API.

Resources

Acknowledgements

Thank you to Uffizzi for providing ephemeral environments to preview pull requests.

flagsmith-ios-client's People

Contributors

3a4ot avatar benrometsch avatar ctreffs avatar dabeeeenster avatar gazreese avatar isapozhnik avatar matthewelwell avatar richardpiazza avatar rowbdowg avatar rudrankriyam avatar wicheda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flagsmith-ios-client's Issues

Enabling a feature for a particular user is not working

When I tried to enable a feature for a particular user with user Traits, iOS client is always returning enabled false.
Screenshot 2022-01-03 at 10 54 09 AM

But when I tried using the test tool in the web ,it is returning enabled true.

Screenshot 2022-01-03 at 10 58 08 AM

Let me know if I am doing anything wrong?

Bulk Uploading Identities and Traits

The documentation of Flagsmith states that there is an endpoint available for bulk uploading identities and their respective trait: https://docs.flagsmith.com/basic-features/managing-identities#bulk-uploading-identities-and-traits
Sadly though it is not currently available in the iOS SDK.
The current implementation only provides setTrait(_ trait: Trait, forIdentity identity: String), setting only one trait at a time.

The bulk option would be a welcome addition for our use case.
Are there any plans to extend the API manager to support this call?

Segments Not Evaluating Properly Unless Using Exactly Matches

We have created a segment to use to override the "off" switch on one of our flags. When using "exactly matches" on the ios version number the flag successfully gets overridden and its "turned on". However when we use >= the override does not match. My guess is there is something wrong and Flagsmith is evaluating the version number as a string.

This is how we set the value in Flagsmiths system

let iosVersionTrait = Trait(key: "ios_version", value: BundleConfiguration.appVersion)
Flagsmith.shared.setTrait(iosVersionTrait, forIdentity: user.email.or(""), completion: { _ in })

API manager is using the wrong endpoints for getting identity and setting traits

The endpoints for getting an identity and posting traits are incorrect, they should be using:

Get Traits

GET /api/v1/identities/<identifier>/
should become
GET /api/v1/identities/?identifier=<identifier>

Set Trait

POST /api/v1/traits/

with the new JSON payload:

curl --location --request POST 'http://api.flagsmith.com/api/v1/traits/' \
--header 'Content-Type: application/json' \
--header 'x-environment-key: 8KzETdDeMY7xkqkSkY3Gsg' \
--data-raw '{
    "identity": {
        "identifier": "demo_user_1234"
    },
    "trait_key": "tempor_laboris",
    "trait_value": "id sit aliquip vo"
}'

Better docs for Identities

we don't actually have any sample code for getting flags for an identity in https://docs.flagsmith.com/clients/ios. I think the code is async/await related but its ont clear.

We need to provide some sample working code for getting flags back for an identity and then viewing the traits of said identity.

HTTP load failed, 0/0 bytes (error code: -1009 [1:50])

We tried to use the latest release but discovered issues with URLSession loading on iOS. Considering that my internal fork (with strict concurrency changes) works well, I suspect something went wrong with other commits (maybe Privacy manifest??). I haven't had time to research so far.

Issue reported on the console when pointing to the 3.6.0 release:

nw_endpoint_handler_path_change [C6 edge.api.flagsmith.com:443 waiting parent-flow (satisfied (Path is satisfied), interface: en0[802.11], uses wifi)] blocked tracker
Connection 6: received failure notification
Connection 6: failed to connect 1:50, reason -1
Connection 6: encountered error(1:50)
Task <BAD4587C-xxx-xxxxx-xx-xxxxx>.<3> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
Task <BAD4587C-xx-xxx-xxxx-xx>.<3> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x600000c9b420 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorBlockedTrackerFailureKey=true, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], uses wifi}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <xxxxxxx>.<3>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <xxxxxxxxxx>.<3>"
), NSLocalizedDescription=The internet connection appears to be offline., NSErrorFailingURLStringKey=https://edge.api.flagsmith.com/api/v1/identities/?identifier=xxxxxxxxx, NSErrorFailingURLKey=https://edge.api.flagsmith.com/api/v1/identities/?identifier=xxxxxxxx, _kCFStreamErrorDomainKey=1}

cc. @dabeeeenster , @gazreese

Traits should implement `UnknownTypeValue`

Trait values can be one of four different data types:

  • String
  • Integer
  • Float
  • Boolean

We need to implement UnknownTypeValue for the Trait value so that the value is written and read with the correct type in the Flagsmith API.

Privacy manifest and code signature

Starting from 1st may 2024, it is mandatory to have privacy manifest file and code signatures for all third party libraries used. Is this something you are working on. Please update

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.