Skip to content

Commit

Permalink
prepare 1.1.3 release (#20)
Browse files Browse the repository at this point in the history
* Add LICENSE.txt.

* Add initial template for changelog.

* Filing in some basic fields for packages.

* Accidentally create plugin without organization.

* Basic initial implementation of bridging SDK calls to native SDKs.

* Commit most to changes for bridging.

* Fix dependencies.

* Reorganize to use mini library.

* Add missing ldconfig options.

* Add missing config options to kotlin native bridge.

* Extend LDValue with convenience builders.

* Add Android allFlags.

* Fix type error with allFlags bridging.

* Consistency renames.

* Improve handling of json and casting.

* Better json handling on ios.

* Fix what I just broke.

* Actually fix changes. Stupid type inference disambiguation changes.

* Add experimentation to track.

* Custom handling.

* Evaluation details.

* Handle null case.

* Fix type casting on evaluation detail.

* Last bit of implementation.

* Remove useless field.

* Add doc comments, tests, circleci build. (#3)

Also adds GitHub issue/PR templates, CONTRIBUTING.md, updates readmes, and has very minor code tweaks.

* Small improvements for next beta release. (#4)

Mostly stuff to improve score on https://pub.dev/packages/launchdarkly_flutter_client_sdk/score. Also changes `baseUri` to `pollUri` and add default flagbearer base.

* Removed the guides link

* [ch93167] Updates for Flutter 2, Dart 2.12 (nullability), Android 3 (#7)

Co-authored-by: Kerrie Yee <kyee@launchdarkly.com>

* Clarify supported platforms in readme. (#10)

* Fixes from restwrapper before release of beta 0.2.0 (#11)

* Updates docs URLs

* Updated pubspec description (#13)

* Add maxCachedUsers configuration option. (#14)

* Remove `set` prefix from `LDConfigBuilder` methods and add tests. (#15)

* [ch110587] Add ability to wait on SDK 'initialization'. (#16)

* Cleanup iOS configuration building with a `whenIs` method. (#17)

* Improvements to repeat initialization (#18)

* Upgrade Timber, remove deprecated splash screen… (#19)

…and remove unneeded dependencies from example app.

* Provide isOffline instead of isOnline. (#20)

* Add releaser configuration. (#21)

* Add missing quotes to releaser config. (#22)

* Remove extra hyphen for releaser. (#23)

* Fix warnings in publish, increase releaser timeout. (#24)

* Remove beta warning from readme, add pub lozenge. (#25)

* Revert "Remove beta warning from readme, add pub lozenge. (#25)"

This reverts commit dd4c0ec.

* Revert "Revert "Remove beta warning from readme, add pub lozenge. (#25)""

This reverts commit d4608fa.

* Fix CI job (#26)

* add single instance note

* Revert "add single instance note"

This reverts commit 19e4d73.

* Bump iOS SDK dependency to latest 5.4.5 release. (#30)

* (iOS) Avoid force unwrapping LDClient.get() (#29)

* Update to latest Android SDK release and remove workaround. (#31)

* Updates for iOS V6 (#32)

* Update to new version of flutter embedding. (#33)

* Update identify to use a coroutine which waits for the underlying future to complete. (#34)

* Make 'when' exhaustive for kotlin 1.7.0 (#35)

* [sc-157958] Update releaser config with correct JAVA_HOME. (#36)

* Try newer xcode.

* Use the correct path.

* Populate attributes using initializer for LDUser as not to replace auto populated device/os (#37)

Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com>
Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com>
Co-authored-by: Kerrie Yee <kyee@launchdarkly.com>
Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com>
Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com>
Co-authored-by: Molly <molly.jones@launchdarkly.com>
Co-authored-by: Louis Chan <lchan@launchdarkly.com>
Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
  • Loading branch information
9 people committed Jul 26, 2022
1 parent 456652c commit a78a916
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions ios/Classes/SwiftLaunchdarklyFlutterClientSdkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,21 @@ public class SwiftLaunchdarklyFlutterClientSdkPlugin: NSObject, FlutterPlugin {
}

func userFrom(dict: [String: Any?]) -> LDUser {
var user = LDUser(key: dict["key"] as? String)
if let anonymous = dict["anonymous"] as? Bool { user.isAnonymous = anonymous }
user.secondary = dict["secondary"] as? String
user.ipAddress = dict["ip"] as? String
user.email = dict["email"] as? String
user.name = dict["name"] as? String
user.firstName = dict["firstName"] as? String
user.lastName = dict["lastName"] as? String
user.avatar = dict["avatar"] as? String
user.country = dict["country"] as? String
user.privateAttributes = (dict["privateAttributeNames"] as? [String] ?? []).map { UserAttribute.forName($0) }
user.custom = (dict["custom"] as? [String: Any] ?? [:]).mapValues { LDValue.fromBridge($0) }
let user = LDUser(
key: dict["key"] as? String,
name: dict["name"] as? String,
firstName: dict["firstName"] as? String,
lastName: dict["firstName"] as? String,
country: dict["country"] as? String,
ipAddress: dict["ip"] as? String,
email: dict["email"] as? String,
avatar: dict["avatar"] as? String,
custom: (dict["custom"] as? [String: Any] ?? [:]).mapValues { LDValue.fromBridge($0) },
isAnonymous: dict["anonymous"] as? Bool,
privateAttributes: (dict["privateAttributeNames"] as? [String] ?? []).map { UserAttribute.forName($0) },
secondary: dict["secondary"] as? String
)

return user
}

Expand Down

0 comments on commit a78a916

Please sign in to comment.