From a78a916e178b37ee27e8cbe4ff462f01ca4caa81 Mon Sep 17 00:00:00 2001 From: LaunchDarklyReleaseBot <86431345+LaunchDarklyReleaseBot@users.noreply.github.com> Date: Tue, 26 Jul 2022 15:50:44 -0400 Subject: [PATCH] prepare 1.1.3 release (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * 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 dd4c0ece21be2cdaa7d3f942eb04bed0fd56cb1d. * Revert "Revert "Remove beta warning from readme, add pub lozenge. (#25)"" This reverts commit d4608fa149d1dbdfb1bb64a04a43149d27da7a7e. * Fix CI job (#26) * add single instance note * Revert "add single instance note" This reverts commit 19e4d733902d9296c95d088b8069f188c3600ac4. * 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 Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Kerrie Yee Co-authored-by: Ember Stevens Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Molly Co-authored-by: Louis Chan Co-authored-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> --- ...ftLaunchdarklyFlutterClientSdkPlugin.swift | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ios/Classes/SwiftLaunchdarklyFlutterClientSdkPlugin.swift b/ios/Classes/SwiftLaunchdarklyFlutterClientSdkPlugin.swift index aa2a2b61..229ddf3d 100644 --- a/ios/Classes/SwiftLaunchdarklyFlutterClientSdkPlugin.swift +++ b/ios/Classes/SwiftLaunchdarklyFlutterClientSdkPlugin.swift @@ -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 }