Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Doc updates #12

Merged
merged 111 commits into from
May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
e116f46
Remove old circle.yml file
ashanbrown Jul 11, 2018
a03fa0d
Send back flagVersion in events when it is present (#5)
ashanbrown Jul 12, 2018
56165a0
Send default feature flag event when flag.value is null (#6)
ashanbrown Jul 13, 2018
d0ca44e
Create License.txt
ashanbrown Jul 13, 2018
2644d7f
Add test that we return default value for off variation (#7)
ashanbrown Jul 13, 2018
7fdf036
misc cleanup of project files
eli-darkly Jul 13, 2018
8924b5c
rm usage that won't work in older target frameworks
eli-darkly Jul 13, 2018
24b9809
Merge pull request #8 from launchdarkly/eb/cleanup
eli-darkly Jul 13, 2018
b3287b6
version 1.0.0-beta8
eli-darkly Jul 13, 2018
dcc7f9f
version 1.0.0-beta9
eli-darkly Jul 13, 2018
c2f674a
clean up unnecessary static references and make tests stable
eli-darkly Jul 17, 2018
b64cd58
Merge pull request #9 from launchdarkly/eb/static-instance-cleanup
eli-darkly Jul 18, 2018
27c0a39
break out and simplify basic flag evaluation tests
eli-darkly Jul 18, 2018
e4f6109
get rid of test fixture files
eli-darkly Jul 18, 2018
5ef9ea2
fix default value logic
eli-darkly Jul 18, 2018
0fc8c34
Merge pull request #10 from launchdarkly/eb/evaluation-tests
eli-darkly Jul 18, 2018
c43c4bb
add tests for event generation
eli-darkly Jul 18, 2018
5ed0280
Merge pull request #11 from launchdarkly/eb/event-tests
eli-darkly Jul 18, 2018
537886f
throw exception if user is null; assign unique key if key is null or …
eli-darkly Jul 19, 2018
c59ce16
Merge pull request #12 from launchdarkly/eb/ch20411/null-user
eli-darkly Jul 19, 2018
8d299c7
don't use strong naming for LaunchDarkly.Xamarin
eli-darkly Jul 23, 2018
df9e61e
skip connectivity check in .NET Standard
eli-darkly Jul 23, 2018
3e4f4e1
fix name of config setter
eli-darkly Jul 23, 2018
fb5621a
use platform reference instead of package reference
eli-darkly Jul 23, 2018
52bc60a
skip using preferences API in .NET Standard
eli-darkly Jul 23, 2018
a9d5167
beta11
eli-darkly Jul 23, 2018
fca4ca0
fix test
eli-darkly Jul 23, 2018
a8ffc36
rm note about signing
eli-darkly Jul 23, 2018
f5fd89d
Merge branch 'eb/ch20841/no-strong-name' into eb/misc-fixes
eli-darkly Jul 23, 2018
d32bdf6
don't set updateProcessor to null
eli-darkly Jul 23, 2018
23c94c1
more cleanup/simplification of test code
eli-darkly Jul 23, 2018
c0cd164
make timeout a parameter instead of a config property
eli-darkly Jul 23, 2018
5305820
Remove @ashanbrown from codeowners
ashanbrown Jul 23, 2018
15b7052
Merge branch 'eb/test-cleanup' into eb/ch20546/timeout-param
eli-darkly Jul 24, 2018
77816f2
propagate exception if polling task fails permanently
eli-darkly Jul 24, 2018
7bd3af3
Merge pull request #13 from launchdarkly/eb/ch20841/no-strong-name
eli-darkly Jul 24, 2018
9815b7a
Merge pull request #14 from launchdarkly/eb/misc-fixes
eli-darkly Jul 24, 2018
f835bd4
Merge pull request #15 from launchdarkly/eb/test-cleanup
eli-darkly Jul 24, 2018
05ae673
validate maxWaitTime
eli-darkly Jul 24, 2018
f2ac11e
send an initial identify event when client is created
eli-darkly Jul 24, 2018
70abf94
Merge branch 'master' into eb/ch20546/timeout-param
eli-darkly Jul 24, 2018
6e1f386
Merge branch 'eb/ch20546/timeout-param' into eb/ch20906/first-identif…
eli-darkly Jul 24, 2018
2b43a05
Merge branch 'eb/ch20546/timeout-param' into eb/ch20545/init-errors
eli-darkly Jul 24, 2018
f9e3289
Merge pull request #16 from launchdarkly/eb/ch20546/timeout-param
eli-darkly Jul 24, 2018
4243a00
Merge pull request #17 from launchdarkly/eb/ch20545/init-errors
eli-darkly Jul 24, 2018
2770185
Merge branch 'master' into eb/ch20906/first-identify-event
eli-darkly Jul 24, 2018
f963743
Merge pull request #18 from launchdarkly/eb/ch20906/first-identify-event
eli-darkly Jul 24, 2018
3f2d0c0
misc project file & test cleanup
eli-darkly Jul 25, 2018
a25b8cc
beta12 release (fixes System.Runtime reference problem in LD.Common)
eli-darkly Jul 27, 2018
17b7585
provide callback mechanism for backgrounding
eli-darkly Jul 27, 2018
d7bc235
don't try to restart the update processor in background unless backgr…
eli-darkly Jul 27, 2018
7c023e2
always initialize platform adapter
eli-darkly Jul 27, 2018
a7376c0
doc comment typo
eli-darkly Jul 28, 2018
0de1c94
doc comment typo
eli-darkly Jul 28, 2018
a97dd0d
fix hang in synchronous Identify
eli-darkly Jul 30, 2018
d631156
rm debugging
eli-darkly Jul 30, 2018
44daaf5
Merge pull request #20 from launchdarkly/eb/ch21044/identify-hanging
eli-darkly Jul 30, 2018
7961435
Merge branch 'master' into eb/ch20389/backgrounding-interface
eli-darkly Jul 30, 2018
b8da2e0
need to pass polling interval to adapter
eli-darkly Jul 30, 2018
bb76380
fix method parameter
eli-darkly Jul 30, 2018
d6cd177
Merge pull request #19 from launchdarkly/eb/ch20389/backgrounding-int…
eli-darkly Jul 30, 2018
3342490
version 1.0.0-beta13
eli-darkly Jul 30, 2018
7a03409
don't allow null/empty mobile key
eli-darkly Jul 31, 2018
16ebef0
Merge pull request #21 from launchdarkly/eb/ch20409/missing-key
eli-darkly Jul 31, 2018
f73aaa6
make polling intervals consistent with other mobile SDKs
eli-darkly Jul 31, 2018
281502e
Merge pull request #22 from launchdarkly/eb/ch21362/polling-intervals
eli-darkly Jul 31, 2018
08e08f7
bump LD.Common to 1.0.5 to get fix for reconnection delay
eli-darkly Aug 14, 2018
3574e2f
Merge pull request #23 from launchdarkly/eb/ch21070/stream-reconnect
eli-darkly Aug 14, 2018
0b66a68
1.0.0-beta14
eli-darkly Aug 14, 2018
63ed5ba
fix sample code
eli-darkly Sep 10, 2018
aa1c3c3
Merge branch 'master' of github.com:launchdarkly/xamarin-client
eli-darkly Sep 10, 2018
3c9712d
use LaunchDarkly.Common 1.1.1
eli-darkly Sep 10, 2018
c266105
use Xamarin.Essentials 0.10.0-preview
eli-darkly Sep 10, 2018
65e2bdc
version 1.0.0-beta15
eli-darkly Sep 10, 2018
7faafbe
feat(src/): Removed Xamarin.Essentials and added necessary classes to…
Mar 5, 2019
3d015eb
feat(README, LdClient.cs): Implemented Initialized(), removed python …
Mar 5, 2019
95d4e15
feat(src/): Added BackgroundAdapter/, changed conditional compilation…
Mar 5, 2019
791531c
fix(src/): AssemblyInfo wasn't compiling, removed unnecessary public key
Mar 6, 2019
18ea6f8
fix(LdClient.shared.cs): Fixed unit tests by catching NotImplementedE…
Mar 6, 2019
40fa909
implement evaluation reasons
eli-darkly Mar 13, 2019
fcc5429
Merge pull request #27 from launchdarkly/eb/ch33726/eval-reasons
eli-darkly Mar 13, 2019
a1f08ca
always dispose of CancellationTokenSource
eli-darkly Mar 13, 2019
a6b332c
Merge commit '908b54b24d14c523dd7ffe24a287a4e755abb896'
eli-darkly Mar 13, 2019
bc6427e
Merge pull request #28 from launchdarkly/eb/ch33693/dispose-token
eli-darkly Mar 14, 2019
a23efce
feat(./): removed Xamarin.Essentials, build succeeds for all platform…
Mar 18, 2019
2b5faf0
feat(MobilePollingProcessor.shared.cs, LdClient.shared.cs, Background…
Mar 19, 2019
d468886
feat(BackgroundAdapter.ios.cs): iOS foreground and background polling…
Mar 19, 2019
b26a8ce
feat(src/): changed xamarin essentials code to internal
Mar 20, 2019
158e710
fix(LDAndroidTests.cs, LDiOSTests.cs, AndroidManifest.xml, packages.c…
Mar 21, 2019
e972215
feat(src/, LDAndroiTests.cs, LDiOSTests.cs): added additional platfor…
Mar 22, 2019
6fde159
Merge branch 'master' into jc/ch32871/rm-essentials
eli-darkly Mar 22, 2019
137aa41
fix merge
eli-darkly Mar 22, 2019
7099e76
fix(LdClient.shared.cs, Factory.shared.cs, Configuration.shared.cs): …
Mar 25, 2019
e39b904
fix(./): merge conflicts
Mar 25, 2019
330a711
feat(Factory.shared.cs, IBackgroundingState.shared.cs, LdClient.share…
Mar 25, 2019
de6b1b7
fix(LdClient.shared.cs): forgot an argument to RestartUpdateProcessor…
torchhound Mar 25, 2019
f8a3839
fix(MobileStreamingProcessorTests.cs): added additional timespan argu…
torchhound Mar 25, 2019
d9796f4
fix(LaunchDarkly.Xamarin.Android.Tests.csproj): removed unnecessary A…
torchhound Mar 25, 2019
ffccf37
ensure that LdClient instances are always cleaned up in tests
eli-darkly Mar 25, 2019
ee940e3
Bump LD Common to beta4
torchhound Mar 26, 2019
420c6b2
Fixed dotnet restore errors, forgot to bump LD Common beta4 in tests
torchhound Mar 26, 2019
c8b23ae
Merge branch 'eb/ch34904/ci-tests' into jc/ch32871/rm-essentials
eli-darkly Mar 26, 2019
eae5ec6
Merge pull request #29 from launchdarkly/jc/ch32871/rm-essentials
eli-darkly Mar 26, 2019
27c66ed
Add "os" and "device" attributes to user
eli-darkly Mar 27, 2019
59191cd
create package during build + update dependency versions
eli-darkly Mar 27, 2019
b1274fa
fix dependency version
eli-darkly Mar 27, 2019
94a39af
fix unstable test state
eli-darkly Mar 28, 2019
3986efd
Merge pull request #30 from launchdarkly/eb/ch22803/os-device
eli-darkly Mar 29, 2019
911cdba
Merge pull request #31 from launchdarkly/eb/ch35143/packaging
eli-darkly Mar 29, 2019
771e9e8
Merge branch 'master' of github.com:launchdarkly/xamarin-client
eli-darkly Apr 5, 2019
a324295
apply markdown templates (#33)
bwoskow-ld May 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Change log

All notable changes to the LaunchDarkly Client-side SDK for Xamarin will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org).

# Note on future releases

The LaunchDarkly SDK repositories are being renamed for consistency. This repository is now `xamarin-client-sdk` rather than `xamarin-client`.

The package name will also change. In the 1.0.0-beta16 release, the published package was `LaunchDarkly.Xamarin`; in all future releases, it will be `LaunchDarkly.XamarinSdk`.

## [1.0.0-beta16] - 2019-04-05
### Added:
- In Android and iOS, when an app is in the background, the SDK should turn off the streaming connection and instead poll for flag updates at an interval determined by `Configuration.BackgroundPollingInterval` (default: 60 minutes).
- The SDK now supports [evaluation reasons](https://docs.launchdarkly.com/docs/evaluation-reasons). See `Configuration.WithEvaluationReasons` and `ILdMobileClient.BoolVariationDetail`.
- The SDK now sends custom attributes called `os` and `device` as part of the user data, indicating the user's platform and OS version. This is the same as what the native Android and iOS SDKs do, except that "iOS" or "Android" is also prepended to the `os` property.
### Changed:
- This is the first version that is built specifically for iOS and Android platforms. There is also still a .NET Standard 1.0 build in the same package.
- The SDK no longer uses Xamarin Essentials.
### Fixed:
- Under some circumstances, a `CancellationTokenSource` object could be leaked.
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Contributing to the LaunchDarkly Client-side SDK for Xamarin
================================================

LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.

Submitting bug reports and feature requests
------------------

The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/xamarin-client-sdk/issues) in the SDK repository. Bug reports and feature requests specific to this SDK should be filed in this issue tracker. The SDK team will respond to all newly filed issues within two business days.

Submitting pull requests
------------------

We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.

Build instructions
------------------

### Prerequisites

This SDK is built against .Net Standard 1.6 and 2.0 with the `microsoft/dotnet` Docker image. See the SDK's [CI configuration](.circleci/config.yml) to determine which image version in used by LaunchDarkly.

To set up the project and dependencies, run the following command in the root SDK directory:

```
dotnet restore
```

### Building

To build the SDK without running any tests:

```
msbuild
```

### Testing

To build the SDK and run all unit tests:
```
dotnet build src/LaunchDarkly.Xamarin -f netstandard2.0
dotnet test tests/LaunchDarkly.Xamarin.Tests/LaunchDarkly.Xamarin.Tests.csproj -f netcoreapp2.0
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="LaunchDarkly.Xamarin">
<HintPath>..\..\xamarin-client-private\src\LaunchDarkly.Xamarin\bin\Debug\monoandroid81\LaunchDarkly.Xamarin.dll</HintPath>
<HintPath>..\..\xamarin-client-sdk-private\src\LaunchDarkly.Xamarin\bin\Debug\monoandroid81\LaunchDarkly.Xamarin.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="LaunchDarkly.Xamarin">
<HintPath>..\..\xamarin-client-private\src\LaunchDarkly.Xamarin\bin\Debug\xamarin.ios10\LaunchDarkly.Xamarin.dll</HintPath>
<HintPath>..\..\xamarin-client-sdk-private\src\LaunchDarkly.Xamarin\bin\Debug\xamarin.ios10\LaunchDarkly.Xamarin.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
Expand Down
68 changes: 19 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,30 @@
LaunchDarkly SDK [BETA] for Xamarin
LaunchDarkly Client-side SDK for Xamarin
===========================
[![CircleCI](https://circleci.com/gh/launchdarkly/xamarin-client/tree/master.svg?style=svg)](https://circleci.com/gh/launchdarkly/xamarin-client/tree/master)

*This software is a **beta** version and should not be considered ready for production use until tagged at least 1.0.*
[![CircleCI](https://circleci.com/gh/launchdarkly/xamarin-client-sdk/tree/master.svg?style=svg)](https://circleci.com/gh/launchdarkly/xamarin-client-sdk/tree/master)

*This version of the SDK is a **beta** version and should not be considered ready for production use while this message is visible.*

LaunchDarkly overview
-------------------------
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/docs/getting-started) using LaunchDarkly today!

[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)

Supported platforms
-------------------

This beta release is built for the following targets: Android 7.1, 8.0, 8.1; iOS 10; .NET Standard 1.6, 2.0. It has also been tested with Android 9/API 28 and iOS 12.1.

Quick setup
Getting started
-----------

1. Use [NuGet](http://docs.nuget.org/docs/start-here/using-the-package-manager-console) to add the Xamarin SDK to your project:

Install-Package LaunchDarkly.Xamarin

2. Import the LaunchDarkly packages:

using LaunchDarkly.Client;
using LaunchDarkly.Xamarin;

3. Initialize the LDClient with your Mobile key and user:

User user = User.WithKey(username);
LdClient ldClient = LdClient.Init("YOUR_MOBILE_KEY", user);

Your first feature flag
-----------------------

1. Create a new feature flag on your [dashboard](https://app.launchdarkly.com).
2. In your application code, use the feature's key to check whether the flag is on for each user:

bool showFeature = ldClient.BoolVariation("your.feature.key");
if (showFeature) {
// application code to show the feature
}
else {
// the code to run if the feature is off
}
Refer to the [SDK documentation](https://docs.launchdarkly.com/docs/xamarin-sdk-reference#section-getting-started) for instructions on getting started with using the SDK.

Learn more
-----------

Check out our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/v2.0/docs/xamarin-sdk-reference).
Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/docs/xamarin-sdk-reference).

Testing
-------
Expand All @@ -53,7 +34,7 @@ We run integration tests for all our SDKs using a centralized test harness. This
Contributing
------------

See [Contributing](https://github.com/launchdarkly/xamarin-client/blob/master/CONTRIBUTING.md).
We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this SDK.

About LaunchDarkly
-----------
Expand All @@ -63,21 +44,10 @@ About LaunchDarkly
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
* LaunchDarkly provides feature flag SDKs for
* [Java](http://docs.launchdarkly.com/docs/java-sdk-reference "Java SDK")
* [JavaScript](http://docs.launchdarkly.com/docs/js-sdk-reference "LaunchDarkly JavaScript SDK")
* [PHP](http://docs.launchdarkly.com/docs/php-sdk-reference "LaunchDarkly PHP SDK")
* [Python](http://docs.launchdarkly.com/docs/python-sdk-reference "LaunchDarkly Python SDK")
* [Go](http://docs.launchdarkly.com/docs/go-sdk-reference "LaunchDarkly Go SDK")
* [Node.JS](http://docs.launchdarkly.com/docs/node-sdk-reference "LaunchDarkly Node SDK")
* [.NET](http://docs.launchdarkly.com/docs/dotnet-sdk-reference "LaunchDarkly .Net SDK")
* [Xamarin](http://docs.launchdarkly.com/docs/xamarin-sdk-reference "LaunchDarkly Xamarin SDK")
* [Ruby](http://docs.launchdarkly.com/docs/ruby-sdk-reference "LaunchDarkly Ruby SDK")
* [iOS](http://docs.launchdarkly.com/docs/ios-sdk-reference "LaunchDarkly iOS SDK")
* [Android](http://docs.launchdarkly.com/docs/android-sdk-reference "LaunchDarkly Android SDK")
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
* Explore LaunchDarkly
* [launchdarkly.com](http://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](http://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDKs
* [apidocs.launchdarkly.com](http://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
* [blog.launchdarkly.com](http://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies