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

feat: adds MAUI support #66

Merged
merged 723 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
723 commits
Select commit Hold shift + click to select a range
a6f90b6
(2.0 - #1) minimum changes to migrate to newer common packages that a…
eli-darkly Apr 12, 2021
65411d2
(2.0 - #2) remove Newtonsoft.Json (#106)
eli-darkly Apr 12, 2021
a963642
improve EnumVariation with type constraint, fix tests
eli-darkly Apr 13, 2021
4e2e64b
Merge pull request #112 from launchdarkly/eb/ch105230/better-enum-var…
eli-darkly Apr 21, 2021
e51b084
use LaunchDarkly.TestHelpers for HTTP tests
eli-darkly Apr 27, 2021
faca143
fix project files
eli-darkly Apr 27, 2021
e4a4b6a
fix project files
eli-darkly Apr 27, 2021
6fe829f
Merge pull request #113 from launchdarkly/eb/ch104704/http-tests
eli-darkly Apr 28, 2021
57b8ec4
update to latest InternalSdk, misc cleanup, better test code sharing …
eli-darkly Apr 28, 2021
17b5d70
better workaround for iOS storyboard build problem (#115)
eli-darkly May 4, 2021
2e9eee9
update dependencies to latest releases
eli-darkly Jun 10, 2021
0446149
drop support for Android 7.1 and 8.0
eli-darkly Jun 11, 2021
faf65c1
(#1) code reorganization, standardize namespaces (#117)
eli-darkly Jul 6, 2021
bdb748f
(#2) rename SDK in the readme and project names (#118)
eli-darkly Jul 6, 2021
e5b54f3
(#3) rename Xamarin to Client in namespaces & assemblies (#119)
eli-darkly Jul 6, 2021
b70a8cf
(#4) add logging configuration and per-platform default loggers (#120)
eli-darkly Jul 10, 2021
037a764
implement Alias method and auto-aliasing
eli-darkly Aug 30, 2021
edf6f5c
misc test fixes
eli-darkly Aug 30, 2021
dd94342
Merge branch '2.0' into eb/ch98270/drop-old-android
eli-darkly Aug 30, 2021
d42702e
Merge pull request #116 from launchdarkly/eb/ch98270/drop-old-android
eli-darkly Aug 31, 2021
a6ed971
remove IConfigurationBuilder interface
eli-darkly Aug 31, 2021
c7ee17f
doc comment fixes + add files for new doc generator
eli-darkly Aug 31, 2021
8be90d4
rm obsolete file
eli-darkly Aug 31, 2021
c1a8c0f
Apply suggestions from code review
eli-darkly Aug 31, 2021
13a7677
Merge pull request #121 from launchdarkly/eb/ch94518/alias
eli-darkly Aug 31, 2021
27b350d
Merge pull request #122 from launchdarkly/eb/ch105229/config-cleanup
eli-darkly Sep 1, 2021
91f0a56
clarify CommonSdk documentation
eli-darkly Sep 4, 2021
074dc03
Merge pull request #123 from launchdarkly/eb/ch105229/doc-comments
eli-darkly Sep 4, 2021
cf38a01
(#4) add IDataSource interface & more component infrastructure simila…
eli-darkly Sep 7, 2021
c919883
(#5) scoped configuration & public interface for events (#125)
eli-darkly Sep 7, 2021
22c49bc
(#6) scoped configuration for HTTP (#126)
eli-darkly Sep 13, 2021
1f6a1f3
(#1) reimplement data store components for cleaner abstraction of per…
eli-darkly Sep 22, 2021
cc5bd86
(#2) misc tedious code cleanup of property/method naming (#128)
eli-darkly Sep 22, 2021
d3db554
(#3) revise flag notification mechanism to look more like the server-…
eli-darkly Sep 22, 2021
aff2b64
(#4) implement test data source (#130)
eli-darkly Sep 28, 2021
7b9d93c
(#5) use new concurrency helpers in dotnet-sdk-internal (#131)
eli-darkly Sep 28, 2021
a3e2bf3
data source status API
eli-darkly Sep 28, 2021
9abae18
comments
eli-darkly Sep 29, 2021
532ec49
make build fail if XML comments are missing or invalid
eli-darkly Sep 29, 2021
014887e
doc comment fixes
eli-darkly Sep 29, 2021
d100f76
doc comment fix
eli-darkly Sep 30, 2021
81732ba
Merge branch 'eb/ch123851/datasource-status' into eb/ch123512/doc-com…
eli-darkly Sep 30, 2021
9f1dfde
Merge pull request #132 from launchdarkly/eb/ch123851/datasource-status
eli-darkly Oct 4, 2021
b388a9b
Merge pull request #133 from launchdarkly/eb/ch123512/doc-comment-errors
eli-darkly Oct 4, 2021
6ce62ba
set default flush interval to 30 seconds on mobile platforms
eli-darkly Oct 14, 2021
2116d59
Merge pull request #136 from launchdarkly/eb/sc-121759/flush-interval
eli-darkly Oct 14, 2021
74a4a24
simpler way of configuring service base URIs (#134)
eli-darkly Oct 14, 2021
7453e51
add DoubleVariation and DoubleVariationDetail
eli-darkly Oct 21, 2021
f6d5bd6
Merge pull request #138 from launchdarkly/eb/sc-127926/double-variation
eli-darkly Oct 21, 2021
2116e1e
enable REPORT mode, except on Android
eli-darkly Oct 21, 2021
2d3f023
Merge pull request #139 from launchdarkly/eb/sc-111271/report-mode
eli-darkly Oct 22, 2021
46f997d
configure TaskExecutor to call event handlers on main thread in Andro…
eli-darkly Oct 25, 2021
9220463
add guard on writing to Xunit test output
eli-darkly Oct 25, 2021
c8f2d5c
Merge pull request #140 from launchdarkly/eb/sc-128274/event-dispatch
eli-darkly Oct 25, 2021
e29230e
implement diagnostic events (#137)
eli-darkly Oct 28, 2021
78b51ab
fix HttpMessageHandler + proxy configuration, add test coverage (#141)
eli-darkly Oct 28, 2021
33ff003
update MSBuild.Sdk.Extras to prevent spurious build warnings from .NE…
eli-darkly Nov 1, 2021
667e3bd
Merge pull request #142 from launchdarkly/eb/sc-129553/build-warnings
eli-darkly Nov 1, 2021
0bfc3d3
new persistent storage implementation + max users limit (#143)
eli-darkly Nov 5, 2021
f491260
better data source test coverage + misc bugfixes (#144)
eli-darkly Nov 5, 2021
0ded38e
use Releaser v2 configuration (#135)
eli-darkly Nov 5, 2021
ffebfde
add Authenticode signing in release builds; remove obsolete scripts (…
eli-darkly Nov 16, 2021
e7ca195
Merge branch 'master' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Nov 17, 2021
efa39f9
Merge branch '2.0'
eli-darkly Nov 17, 2021
b7c071b
add prerelease notice
eli-darkly Nov 17, 2021
5e70127
add strong naming in release build
eli-darkly Nov 17, 2021
67910df
revise local storage usage to only use base64url-safe characters in n…
eli-darkly Nov 18, 2021
48a33be
fix test package build script
eli-darkly Nov 18, 2021
785aed2
Merge pull request #146 from launchdarkly/eb/sc-131700/strong-name
eli-darkly Nov 18, 2021
b4951c5
Merge pull request #147 from launchdarkly/eb/sc-123650/storage-keys-c…
eli-darkly Nov 18, 2021
acc4dcc
remove ReadTimeout setting which only worked in Android but not in a …
eli-darkly Nov 18, 2021
6ab1d69
Merge branch 'master' into eb/sc-131858/read-timeout
eli-darkly Nov 18, 2021
70ba678
Merge branch '2.0'
eli-darkly Nov 18, 2021
b2b5c52
Merge branch 'master' into eb/sc-131858/read-timeout
eli-darkly Nov 18, 2021
fdb34a1
Merge pull request #148 from launchdarkly/eb/sc-131858/read-timeout
eli-darkly Nov 18, 2021
d936b09
refactor ConnectionManager state management to handle diagnostic even…
eli-darkly Nov 19, 2021
4e57c2a
fix init logic, add tests
eli-darkly Nov 19, 2021
5cec857
Merge pull request #149 from launchdarkly/eb/sc-121723/diag-disable-init
eli-darkly Nov 19, 2021
cf89dbf
Merge branch 'master' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Nov 20, 2021
17a6e68
remove prerelease notice from readme for GA release
eli-darkly Jan 6, 2022
07871de
Merge pull request #150 from launchdarkly/eb/sc-136328/ga-prep
eli-darkly Jan 7, 2022
f92a983
merge from public after release
Jan 7, 2022
92edf52
update CommonSdk & InternalSdk to latest releases + delete obsolete p…
eli-darkly Feb 2, 2022
27f6c16
Merge pull request #151 from launchdarkly/eb/sc-130404/commonsdk-update
eli-darkly Feb 2, 2022
bb9ffa0
Use CircleCI macOS Gen2 resource class. (#152)
gwhelanLD Feb 7, 2022
80c5324
fix unset timestamp in alias events
eli-darkly Feb 8, 2022
3287db9
Merge pull request #153 from launchdarkly/eb/sc-141373/alias-event-ti…
eli-darkly Feb 8, 2022
ca93ce7
merge from public after release
Feb 9, 2022
1915f43
contract test service implementation (#154)
eli-darkly May 2, 2022
5220969
Change master to main. (#155)
kinyoklion May 16, 2022
1dd6444
remove obsolete Alias, AutoAliasingOptOut, InlineUsersInEvents
eli-darkly May 19, 2022
68bf1f1
Merge branch 'contract-tests'
eli-darkly May 19, 2022
44d9d95
Merge branch '3.0' into eb/sc-154217/remove-alias-inline
eli-darkly May 19, 2022
a221a5f
update contract tests
eli-darkly May 19, 2022
cf29771
Merge pull request #156 from launchdarkly/eb/sc-154217/remove-alias-i…
eli-darkly Jun 10, 2022
93d2b4d
use U2C alpha packages, replace user with context
eli-darkly Jun 10, 2022
ac1781a
fix tests
eli-darkly Jun 10, 2022
2a1fadd
fix more tests
eli-darkly Jun 10, 2022
6d32fb8
use correct context key for flag store + clean up context decorator i…
eli-darkly Jun 10, 2022
359961c
add test for flag storage with single/multi-kind contexts
eli-darkly Jun 10, 2022
dcd1f60
remove automatic "device" and "os" attributes
eli-darkly Jun 11, 2022
92634f9
simplify usage of LdClientContext in client initialization
eli-darkly Jun 11, 2022
a8b79d5
move component API types into Subsystems
eli-darkly Jun 11, 2022
4854267
rm unused
eli-darkly Jun 14, 2022
8c07122
Merge pull request #158 from launchdarkly/eb/sc-154259/u2c-1
eli-darkly Jun 14, 2022
2dd4181
Merge pull request #159 from launchdarkly/eb/sc-154259/u2c-2-flag-store
eli-darkly Jun 14, 2022
018d9f3
update to latest alpha packages
eli-darkly Jun 14, 2022
cbfd486
Merge pull request #160 from launchdarkly/eb/sc-154259/u2c-3-no-devic…
eli-darkly Jun 16, 2022
c10341b
Merge pull request #161 from launchdarkly/eb/sc-156617/simplify-clien…
eli-darkly Jun 16, 2022
5fb9de8
Merge pull request #162 from launchdarkly/eb/sc-156617/subsystems
eli-darkly Jun 16, 2022
b532269
Merge pull request #163 from launchdarkly/eb/sc-154259/u2c-5-package-…
eli-darkly Jun 16, 2022
fb49620
never use device ID, always UUID for generated keys
eli-darkly Jun 16, 2022
e8354f8
actually in .NET it's a GUID, not a UUID
eli-darkly Jun 16, 2022
81d4b81
generate & cache randomized keys per context kind
eli-darkly Jun 16, 2022
25909bb
Merge pull request #164 from launchdarkly/eb/sc-157266/no-device-id
eli-darkly Jun 22, 2022
027d70f
Merge pull request #165 from launchdarkly/eb/sc-157266/gen-key-per-kind
eli-darkly Jun 22, 2022
88dfc73
add new config option for auto-generating keys
eli-darkly Aug 16, 2022
e0700dc
fix Android & iOS CI builds
eli-darkly Aug 16, 2022
aa30065
typo
eli-darkly Aug 16, 2022
5432890
add contract tests for contexts + update prerelease CommonSdk
eli-darkly Aug 16, 2022
a0ec319
Merge pull request #167 from launchdarkly/eb/sc-164945/fix-build
eli-darkly Aug 17, 2022
dbe571d
Merge branch 'main' into 3.0
eli-darkly Aug 17, 2022
2d9287e
Merge branch '3.0' into eb/sc-154259/fix-contract-tests
eli-darkly Aug 17, 2022
f0da15e
Merge branch 'eb/sc-154259/fix-contract-tests' into eb/sc-164874/gene…
eli-darkly Aug 17, 2022
b0aaf79
don't use .NET Core 3.1 or .NET 5.0 for testing
eli-darkly Aug 17, 2022
ecd51ac
downgrade MSBuild.Sdk.Extras to work in .NET Core 3.1
eli-darkly Aug 17, 2022
2130fdb
fix test framework & dependencies
eli-darkly Aug 17, 2022
0dc938f
actually let's use .NET 6.0
eli-darkly Aug 17, 2022
c308cfe
fix script permissions
eli-darkly Aug 17, 2022
8d14653
Merge branch 'eb/sc-154259/fix-contract-tests' into eb/sc-154188/drop…
eli-darkly Aug 17, 2022
a7557ff
Merge branch 'eb/sc-154188/drop-eol-test-platforms' into eb/sc-164874…
eli-darkly Aug 17, 2022
391bf30
Merge pull request #168 from launchdarkly/eb/sc-154259/fix-contract-t…
eli-darkly Aug 18, 2022
aefe858
Merge pull request #171 from launchdarkly/eb/sc-154188/drop-eol-test-…
eli-darkly Aug 23, 2022
2201b20
Merge pull request #169 from launchdarkly/eb/sc-164874/generate-keys-…
eli-darkly Aug 23, 2022
8a910e2
(#4) use System.Text.Json directly instead of LaunchDarkly.JsonStream…
eli-darkly Aug 25, 2022
ca64d54
use new polling endpoints with "context" in path
eli-darkly Sep 1, 2022
00f0bb9
Merge pull request #173 from launchdarkly/eb/sc-167286/new-endpoints
eli-darkly Sep 8, 2022
f0260e3
use latest prerelease packages where Secondary is removed
eli-darkly Oct 25, 2022
4eca2fe
Merge pull request #174 from launchdarkly/eb/sc-174220/no-secondary
eli-darkly Oct 25, 2022
1e9ee44
use more correct path for release credential parameter
eli-darkly Oct 27, 2022
e9d9641
Merge pull request #175 from launchdarkly/eb/sc-129664/release-param-key
eli-darkly Oct 27, 2022
674662a
Merge branch 'eb/sc-129664/release-param-key' into 3.0
eli-darkly Oct 27, 2022
07bce7b
Merge branch 'main' into 3.0
eli-darkly Oct 27, 2022
d60df55
replace various factory interfaces with a generic interface
eli-darkly Nov 22, 2022
103cf09
bump LaunchDarkly.Logging to v1.0.2 for sc-177921
eli-darkly Nov 28, 2022
5a1ce68
Merge pull request #179 from launchdarkly/eb/sc-177921/logging-depend…
eli-darkly Nov 28, 2022
67b421c
Merge branch 'main' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Nov 28, 2022
9e68199
Merge branch 'main' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Nov 28, 2022
1a15cb3
fix release build to use newer osslsigncode (for 2.x)
eli-darkly Nov 28, 2022
4c73126
Merge pull request #180 from launchdarkly/eb/sc-177797/fix-release-v2
eli-darkly Nov 28, 2022
066cedc
merge from public after release
Nov 28, 2022
2b70ce5
doc comment
eli-darkly Nov 30, 2022
9f95a25
Merge pull request #176 from launchdarkly/eb/sc-156617/generic-factory
eli-darkly Nov 30, 2022
c09f29d
allow User to be used interchangeably with Context (#177)
eli-darkly Dec 1, 2022
098497b
Merge branch 'main' into 3.0
eli-darkly Dec 6, 2022
b457ae0
use latest package versions
eli-darkly Dec 6, 2022
662cf05
add FlushAndWait method
eli-darkly Dec 6, 2022
2ed8a43
update release metadata
eli-darkly Dec 6, 2022
ea4ce9f
add FlushAndWaitAsync
eli-darkly Dec 6, 2022
bb2a0bd
Merge pull request #181 from launchdarkly/eb/sc-179023/sync-flush
eli-darkly Dec 19, 2022
6241a05
finish revising TestData API to use contexts (#182)
eli-darkly Dec 19, 2022
db0e662
Merge branch 'main' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Dec 22, 2022
034ec47
Merge branch 'main' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Dec 22, 2022
829d6f3
Merge branch 'main' of github.com:launchdarkly/xamarin-client-sdk
eli-darkly Dec 22, 2022
826bc42
build(deps): Update to LaunchDarkly.InternalSdk 3.1.1 (#185)
kinyoklion Mar 8, 2023
49159bb
merge from public after release
Mar 9, 2023
2f05219
Merge branch 'main' of github.com:launchdarkly/dotnet-client-sdk
louis-launchdarkly Mar 23, 2023
b82e365
fix: Fix generation of FullyQualifiedKey. (#186)
kinyoklion Apr 4, 2023
3f943fd
merge from public after release
Apr 4, 2023
bf532b0
Updates daily flag number
ember-stevens Jun 6, 2023
de3aaab
[sc-205159] Update README with current number of flags served (#187)
ember-stevens Jun 8, 2023
00f3124
feat: adds support for application tags in headers
tanderson-ld Sep 25, 2023
5c0aa21
more changes
tanderson-ld Sep 26, 2023
4bc791b
more chnages
tanderson-ld Sep 27, 2023
fca0ba6
more changes
tanderson-ld Sep 27, 2023
c122687
Add AppInfo Xamarin APIs
cwaldren-ld Sep 27, 2023
8fbe643
Trying to get compiling..
cwaldren-ld Sep 27, 2023
4aed542
add Android.Support.V4 dependency and missing Xamarin.Essentials utils
cwaldren-ld Sep 28, 2023
81312f2
refactor platform APIs to align with LD requirements
cwaldren-ld Sep 28, 2023
ebdeee4
make it cleaner
cwaldren-ld Sep 28, 2023
2395f20
refactor: use Prop machinery from common library
cwaldren-ld Sep 29, 2023
5f1ee9d
fix build
cwaldren-ld Sep 29, 2023
c416f34
feat: Adds support for application tags.
tanderson-ld Oct 2, 2023
6aec531
update to latest usage of IOptionalProp
cwaldren-ld Oct 2, 2023
1eb106b
Refactor SDK name and version into common utility file (update diagno…
cwaldren-ld Oct 2, 2023
526a541
propagate platform name in netstandard configuration
cwaldren-ld Oct 2, 2023
8c4d660
feat: incorporate client sdk default header values when no applicatio…
tanderson-ld Oct 2, 2023
4c55a5d
remove IProp/IOptionalProp machinery
cwaldren-ld Oct 2, 2023
2e7ae5e
refactor: refactoring LdClientContext to eliminate constructor spaghe…
tanderson-ld Oct 3, 2023
a8fbc31
feat: adds automatic environment attributes support
tanderson-ld Oct 4, 2023
a6e24ae
Merge branch 'feature/automatic-env-attributes' into cw/sc-218905/pla…
cwaldren-ld Oct 4, 2023
6c1074b
bugfix: correcting auto env context key generation. Now it works.
tanderson-ld Oct 5, 2023
4c2f221
Merge branch 'cw/sc-218905/platform-layer-props' into ta/sc-204373/do…
cwaldren-ld Oct 5, 2023
c0569e5
chore: propagating common changes related to Env Props and Layers
tanderson-ld Oct 5, 2023
a652285
chore: Update codeowners to dotnet team. (#195)
kinyoklion Oct 6, 2023
5ce2e8b
Existing contract tests working, but autoenvattributes contract tests…
tanderson-ld Oct 6, 2023
7d8b277
Merge branch 'ta/sc-204373/dotnet-telemetry' of github.com:launchdark…
tanderson-ld Oct 6, 2023
29853a5
fix: android platform layer - os name should include Build.Version.Sd…
cwaldren-ld Oct 6, 2023
6c46cd7
ci:removing android hardware acceleration to fix ci
tanderson-ld Oct 9, 2023
6c4e93c
align iOS model with Swift SDK
cwaldren-ld Oct 9, 2023
b0c539e
feat: Adds support for application tags. (#192)
tanderson-ld Oct 9, 2023
cf6731b
return 'unknown' on all ld_device props on netstandard target
cwaldren-ld Oct 9, 2023
213fb5a
Adds unit tests for AutoEnvContextDecorator and completes implementat…
tanderson-ld Oct 10, 2023
0277123
Merge remote-tracking branch 'origin' into ta/sc-204373/dotnet-telemetry
tanderson-ld Oct 10, 2023
32e7cf8
Merge branch 'ta/sc-204373/dotnet-telemetry' of github.com:launchdark…
tanderson-ld Oct 10, 2023
b02c8be
Updating common and internal deps to use production tagging functiona…
tanderson-ld Oct 10, 2023
b35f3fb
Updating common and internal deps to use production tagging functiona…
tanderson-ld Oct 10, 2023
407723e
Adds AutoEnvAttributes enum for API clarity
tanderson-ld Oct 10, 2023
9dca50e
feat: propagate locale in SDK attribute layer (#196)
cwaldren-ld Oct 10, 2023
34f3abb
merge from public after release
Oct 11, 2023
d1c3c1e
fix: Match the client's Xamarin.Android.Support.v4 package Android pr…
cwaldren-ld Oct 11, 2023
5b1f848
revert some unnecessary changes in ClientSdk.csproj
cwaldren-ld Oct 11, 2023
57bb551
Adding additional tests for LdClient and LdClientContext
tanderson-ld Oct 11, 2023
5d3e0ac
Fixing documentation errors.
tanderson-ld Oct 11, 2023
984cfe3
Adding tests, documentation and comment fixes, addressing review comm…
tanderson-ld Oct 12, 2023
ae46f6c
remove XamarinEssentialsUtils.cs
cwaldren-ld Oct 12, 2023
b0c793f
remove irrelevant code
cwaldren-ld Oct 12, 2023
b10108a
revert change to Resource.designer.cs
cwaldren-ld Oct 12, 2023
0651046
remove Platform.ios.cs
cwaldren-ld Oct 12, 2023
ad00675
revert changes to Android/Resource.designer.cs to main branch
cwaldren-ld Oct 12, 2023
d775669
Merge branch 'main' into ta/sc-204373/dotnet-telemetry
cwaldren-ld Oct 12, 2023
5ed6c66
Plumb nullable ApplicationInfo into HTTP config
cwaldren-ld Oct 12, 2023
ae7ce4b
don't add null properties into auto env contexts
cwaldren-ld Oct 12, 2023
3c87760
fix empty return tags
cwaldren-ld Oct 12, 2023
73bc182
nits
cwaldren-ld Oct 12, 2023
d3da78a
rename attributes
cwaldren-ld Oct 12, 2023
73bb93d
feat!: Automatic Environment Attributes (#199)
tanderson-ld Oct 12, 2023
28c67b9
refactor: Updated AutoEnvContextDecorator recipe system to use nodes …
tanderson-ld Oct 13, 2023
6410d81
reverting accidental csproj commit
tanderson-ld Oct 13, 2023
4e3c8ce
Merge branch 'feature/auto-env-attributes' into cw/omit-auto-env-prop…
cwaldren-ld Oct 13, 2023
5f1df2e
add test for ld_device schema
cwaldren-ld Oct 13, 2023
0353289
unify Node classes into single class
cwaldren-ld Oct 13, 2023
94e84d7
cleanup tests
cwaldren-ld Oct 13, 2023
bd7f7bd
update dependencies
cwaldren-ld Oct 17, 2023
d6627cb
.net can be discouraging at times (fix package reference)
cwaldren-ld Oct 17, 2023
ea81021
Fixing compilation issue in Android tests and reverting ld_device ass…
tanderson-ld Oct 17, 2023
c9f105e
Removing ld_device from multiplatform test since it will not pass on …
tanderson-ld Oct 17, 2023
7d54d1b
Omit environment properties that are missing when building contexts (…
tanderson-ld Oct 17, 2023
8dfad79
Feature/auto env attributes (#201)
tanderson-ld Oct 18, 2023
ffc2e94
merge from public after release
Oct 18, 2023
d01a865
feat: adds MAUI support
tanderson-ld Dec 18, 2023
df7cb97
fixing action
tanderson-ld Dec 18, 2023
23dcb7b
fixing action
tanderson-ld Dec 18, 2023
f2e4294
Adjusting readme
tanderson-ld Dec 19, 2023
85e5bd2
ci: fixing contract tests in action
tanderson-ld Dec 19, 2023
cf0e22c
ci: reverting to use debug varients for CI action
tanderson-ld Dec 19, 2023
ffe61b5
Reintroducing netstand2.0 target
tanderson-ld Dec 19, 2023
3b819a9
ci: using macos-13 runner for xcode 14.3+ dependency
tanderson-ld Dec 19, 2023
396e338
Updating documentation and removing deprecated UWP
tanderson-ld Dec 20, 2023
6ab18e8
ci: removing circle ci
tanderson-ld Dec 20, 2023
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
103 changes: 103 additions & 0 deletions .github/actions/ci/action.yml
tanderson-ld marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: CI Action
inputs:
run_tests:
description: 'If true, run unit tests, otherwise skip them.'
required: false
default: 'true'

runs:
using: composite
steps:
- name: Download snk for signing assemblies
shell: bash
run: aws s3 cp s3://launchdarkly-releaser/dotnet/LaunchDarkly.ClientSdk.snk LaunchDarkly.ClientSdk.snk

- name: Setup dotnet build tools
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0

- name: Install MAUI Workload
shell: bash
run: dotnet workload install maui-android maui-ios maui-windows maui-maccatalyst --ignore-failed-sources

- name: Restore Dependencies
shell: bash
run: dotnet restore src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

# - name: Build for NetStandard2.0
tanderson-ld marked this conversation as resolved.
Show resolved Hide resolved
# shell: bash
# run: dotnet build /p:Configuration=release /p:TargetFramework=netstandard2.0 src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

- name: Build for Net7
shell: bash
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0 src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

- name: Build for Net7-android
shell: bash
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-android src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

- name: Build for Net7-ios
shell: bash
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-ios src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

- name: Build for Net7-windows
shell: bash
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-maccatalyst src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

- name: Build for Net7-maccatalyst
shell: bash
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-windows src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj

- name: Run Unit Tests for Net7
shell: bash
run: |
dotnet restore tests/LaunchDarkly.ClientSdk.Tests
dotnet test -v=normal \
--logger:"junit;LogFilePath=/tmp/circle-reports/unit-tests.xml" \
tests/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj

- name: Build Contract Tests
if: inputs.run_tests == 'true'
shell: bash
run: dotnet build contract-tests/TestService.csproj

- name: Run Contract Tests
if: inputs.run_tests == 'true'
shell: bash
run: |
dotnet contract-tests/bin/release/net7.0/ContractTestService.dll > test-service.log 2>&1 & disown
curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/main/downloader/run.sh | VERSION=v2 PARAMS="-url http://localhost:8000 -debug -stop-service-at-end \
-junit /tmp/circle-reports/contract-tests-junit.xml" sh

- name: Build Test App
if: inputs.run_tests == 'true'
shell: bash
run: |
dotnet build /restore /p:Configuration=release \
tests/LaunchDarkly.ClientSdk.Device.Tests/LaunchDarkly.ClientSdk.Device.Tests.csproj

# - name: Set up JDK 17
# if: inputs.run_tests == 'true'
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'

# - name: Setup Android Manager
# if: inputs.run_tests == 'true'
# uses: android-actions/setup-android@v3

# TODO: Tests are not auto executing, so this is commented out. For now this must be done manually.
# - name: Run Android Test App on Emulator
# if: inputs.run_tests == 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 27
# script: |
# dotnet run --framework net7.0-android --project tests/LaunchDarkly.ClientSdk.Device.Tests/LaunchDarkly.ClientSdk.Device.Tests.csproj
# adb install tests/LaunchDarkly.ClientSdk.Device.Tests/bin/release/net7.0-android/com.LaunchDarkly.ClientSdk.Device.Tests-Signed.apk
# ( adb logcat DOTNET:D AndroidRuntime:D & ) | tee test-run.log | grep -q 'Tests run:'
# cat test-run.log | tr -s ' ' | cut -d ' ' -f 1,2,7-
# if grep '\[FAIL\]' test-run.log >/dev/null; then exit 1; fi

29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
tanderson-ld marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run CI
on:
push:
branches: [main, 'feat/**']
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'

jobs:
ci-build:
runs-on: macos-latest-large
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # If you only need the current version keep this.

- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0
name: Get secrets
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/digicert/host = DIGICERT_HOST,/production/common/releasing/digicert/api_key = DIGICERT_API_KEY,/production/common/releasing/digicert/client_cert_file_b64 = DIGICERT_CLIENT_CERT_FILE_B64,/production/common/releasing/digicert/client_cert_password = DIGICERT_CLIENT_CERT_PASSWORD,/production/common/releasing/digicert/code_signing_cert_sha1_hash = DIGICERT_CODE_SIGNING_CERT_SHA1_HASH'

- uses: ./.github/actions/ci
12 changes: 12 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint PR title

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
lint-pr-title:
uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We encourage pull requests and other contributions from the community. Before su

### Prerequisites

The .NET Standard target requires only the .NET Core 2.1 SDK or higher, while the iOS and Android targets require the corresponding Xamarin SDKs.
The .NET 7 target requires only the .NET Core 2.1 SDK or higher, while the iOS, Android, MacCatalys, and Windows targets require the corresponding MAUI SDKs.
tanderson-ld marked this conversation as resolved.
Show resolved Hide resolved

### Building

Expand Down
30 changes: 26 additions & 4 deletions LaunchDarkly.ClientSdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ClientSdk", "src\LaunchDarkly.ClientSdk\LaunchDarkly.ClientSdk.csproj", "{7717A2B2-9905-40A7-989F-790139D69543}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ClientSdk.Tests", "tests\LaunchDarkly.ClientSdk.Tests\LaunchDarkly.ClientSdk.Tests.csproj", "{F6B71DFE-314C-4F27-A219-A14569C8CF48}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ClientSdk.Device.Tests", "tests\LaunchDarkly.ClientSdk.Device.Tests\LaunchDarkly.ClientSdk.Device.Tests.csproj", "{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ClientSdk.iOS.Tests", "tests\LaunchDarkly.ClientSdk.iOS.Tests\LaunchDarkly.ClientSdk.iOS.Tests.csproj", "{5EFF7561-35C1-4C62-B0BE-A76E37DCEB32}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ClientSdk.Android.Tests", "tests\LaunchDarkly.ClientSdk.Android.Tests\LaunchDarkly.ClientSdk.Android.Tests.csproj", "{2E7720E4-01A0-403B-863C-C6C596DF5926}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.ClientSdk.Tests", "tests\LaunchDarkly.ClientSdk.Tests\LaunchDarkly.ClientSdk.Tests.csproj", "{36701E5A-EC04-4B47-8739-BACCCB673C77}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -68,6 +66,30 @@ Global
{2E7720E4-01A0-403B-863C-C6C596DF5926}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{2E7720E4-01A0-403B-863C-C6C596DF5926}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{2E7720E4-01A0-403B-863C-C6C596DF5926}.Debug|iPhone.Build.0 = Debug|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Release|Any CPU.Build.0 = Release|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Release|iPhone.ActiveCfg = Release|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Release|iPhone.Build.0 = Release|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{0D88C80E-8CD8-4064-AE99-9849C7CD6E35}.Debug|iPhone.Build.0 = Debug|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Release|Any CPU.Build.0 = Release|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Release|iPhone.ActiveCfg = Release|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Release|iPhone.Build.0 = Release|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{36701E5A-EC04-4B47-8739-BACCCB673C77}.Debug|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

The LaunchDarkly Client-Side SDK for .NET is designed primarily for use by code that is deployed to an end user, such as in a desktop application or a smart device. It follows the client-side LaunchDarkly model for single-user contexts (much like our mobile or JavaScript SDKs). It is not intended for use in multi-user systems such as web servers and applications.

On supported mobile platforms (Android and iOS), the SDK uses the Xamarin framework which allows .NET code to run on those devices. For that reason, its name was previously "LaunchDarkly Xamarin SDK". However, Xamarin is not the only way to run .NET code in a client-side context (see "Supported platforms" below), so the SDK now has a more general name.
On platforms with MAUI support (Android, iOS, Mac, Windows), the SDK depends on the MAUI framework which allows .NET code to run on those devices. However, MAUI is not the only way to run .NET code in a client-side context (see "Supported platforms" below), so the SDK has a more general name.

For using LaunchDarkly in *server-side* .NET applications, refer to our [Server-Side .NET SDK](https://github.com/launchdarkly/dotnet-server-sdk).

Expand All @@ -20,11 +20,13 @@ For using LaunchDarkly in *server-side* .NET applications, refer to our [Server-

This version of the SDK is built for the following targets:

* Xamarin Android 8.1, for use with Android 8.1 (Android API 27) and higher.
* Xamarin iOS 10, for use with iOS 10 and higher.
* .NET Standard 2.0, for use with any runtime platform that supports .NET Standard 2.0, or in portable .NET Standard library code.
* .Net 7 Android, for use with Android 5.0 (Android API 21) and higher.
* .Net 7 iOS, for use with iOS 11 and higher.
* .Net 7 macOS (using Mac Catalyst), for use with macOS 10.15 and higher.
* .Net 7 Windows (using WinUI), for Windows 11 and Windows 10 version 1809 or higher.
* .NET 7, for use with any runtime platform that supports .NET Standard 2.1, or in portable .NET Standard library code.
tanderson-ld marked this conversation as resolved.
Show resolved Hide resolved

The .NET Standard 2.0 target does not use any Xamarin packages and has no OS-specific code. This allows the SDK to be used in a desktop .NET Framework or .NET 5.0 application, or in a Xamarin MacOS application. However, due to the lack of OS-specific integration, SDK functionality will be limited in those environments: for instance, the SDK will not be able to detect whether networking is turned on or off.
The .NET 7 target does not use any MAUI packages and has no OS-specific code. This allows the SDK to be used in a desktop .NET Framework or .NET 7.0 application. However, due to the lack of OS-specific integration, SDK functionality will be limited in those environments: for instance, the SDK will not be able to detect whether networking is turned on or off.

The .NET build tools should automatically load the most appropriate build of the SDK for whatever platform your application or library is targeted to.

Expand Down
2 changes: 1 addition & 1 deletion contract-tests/TestService.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TestFramework Condition="'$(TESTFRAMEWORK)' == ''">net6.0</TestFramework>
<TestFramework Condition="'$(TESTFRAMEWORK)' == ''">net7.0</TestFramework>
<TargetFrameworks>$(TESTFRAMEWORK)</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>ContractTestService</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public sealed class EventProcessorBuilder : IComponentConfigurer<IEventProcessor
/// undesirable in a mobile application as opposed to a desktop application.
/// </remarks>
public static readonly TimeSpan DefaultFlushInterval =
#if NETSTANDARD
TimeSpan.FromSeconds(5);
#else
#if (ANDROID || IOS)
TimeSpan.FromSeconds(30);
#else
TimeSpan.FromSeconds(5);
#endif

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public sealed class HttpConfigurationBuilder : IDiagnosticDescription
/// </para>
/// <para>
/// Not all .NET platforms support setting a connection timeout. It is supported in
/// .NET Core 2.1+, .NET 5+, and Xamarin Android, but not in Xamarin iOS. On platforms
/// .NET Core 2.1+, .NET 5+, and MAUI Android, but not in MAUI iOS. On platforms
/// where it is not supported, only <see cref="ResponseStartTimeout"/> will be used.
/// </para>
/// <para>
Expand Down Expand Up @@ -109,8 +109,7 @@ public HttpConfigurationBuilder CustomHeader(string name, string value)
/// <remarks>
/// This is mainly useful for testing, to cause the SDK to use custom logic instead of actual HTTP requests,
/// but can also be used to customize HTTP behavior on platforms where the default handler is not optimal.
/// The default is the usual native HTTP handler for the current platform, if any (for instance,
/// <c>Xamarin.Android.Net.AndroidClientHandler</c>), or else <see cref="System.Net.Http.HttpClientHandler"/>.
/// The default is the usual native HTTP handler for the current platform, else <see cref="System.Net.Http.HttpClientHandler"/>.
/// </remarks>
/// <param name="messageHandler">the message handler, or null to use the platform's default handler</param>
/// <returns>the builder</returns>
Expand Down Expand Up @@ -203,7 +202,7 @@ public HttpConfigurationBuilder ResponseStartTimeout(TimeSpan responseStartTimeo
/// </remarks>
/// <param name="useReport">true to enable the REPORT method</param>
/// <returns>the builder</returns>
#if !MONOANDROID
#if !ANDROID
public HttpConfigurationBuilder UseReport(bool useReport)
#else
internal HttpConfigurationBuilder UseReport(bool useReport)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed class DefaultConnectivityStateManager : IConnectivityStateManage
internal DefaultConnectivityStateManager()
{
UpdateConnectedStatus();
Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged;
PlatformConnectivity.ConnectivityChanged += Connectivity_ConnectivityChanged;
}

bool isConnected;
Expand All @@ -23,16 +23,16 @@ bool IConnectivityStateManager.IsConnected
isConnected = value;
}
}
void Connectivity_ConnectivityChanged(object sender, ConnectivityChangedEventArgs e)

void Connectivity_ConnectivityChanged(object sender, EventArgs e)
{
UpdateConnectedStatus();
ConnectionChanged?.Invoke(isConnected);
}

private void UpdateConnectedStatus()
{
isConnected = Connectivity.NetworkAccess == NetworkAccess.Internet;
isConnected = PlatformConnectivity.LdNetworkAccess == LdNetworkAccess.Internet;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal class ClientDiagnosticStore : DiagnosticStoreBase
protected override string SdkKeyOrMobileKey => _context.MobileKey;
protected override string SdkName => SdkPackage.Name;
protected override IEnumerable<LdValue> ConfigProperties => GetConfigProperties();
protected override string DotNetTargetFramework => GetDotNetTargetFramework();
protected override string DotNetTargetFramework => SdkPackage.DotNetTargetFramework;
protected override HttpProperties HttpProperties => _context.Http.HttpProperties;
protected override Type TypeOfLdClient => typeof(LdClient);

Expand Down Expand Up @@ -50,25 +50,5 @@ private IEnumerable<LdValue> GetConfigProperties()
private LdValue GetComponentDescription(object component) =>
component is IDiagnosticDescription dd ?
dd.DescribeConfiguration(_context) : LdValue.Null;

internal static string GetDotNetTargetFramework()
{
// Note that this is the _target framework_ that was selected at build time based on the application's
// compatibility requirements; it doesn't tell us anything about the actual OS version. We'll need to
// update this whenever we add or remove supported target frameworks in the .csproj file.
#if NETSTANDARD2_0
return "netstandard2.0";
#elif MONOANDROID71
return "monoandroid7.1";
#elif MONOANDROID80
return "monoandroid8.0";
#elif MONOANDROID81
return "monoandroid8.1";
#elif XAMARIN_IOS10
return "xamarinios1.0";
#else
return "unknown";
#endif
}
}
}
27 changes: 26 additions & 1 deletion src/LaunchDarkly.ClientSdk/Internal/SdkPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal static class SdkPackage
/// The prefix for the User-Agent header, omitting the version string. This may be different than the Name
/// due to historical reasons.
/// </summary>
private const string UserAgentPrefix = "XamarinClient";
private const string UserAgentPrefix = "DotnetClientSide";

/// <summary>
/// Version of the SDK.
Expand All @@ -29,5 +29,30 @@ internal static class SdkPackage
/// </summary>
internal static string UserAgent => $"{UserAgentPrefix}/{Version}";

/// <summary>
/// The target framework selected at build time.
/// </summary>
/// <remarks>
/// This is the _target framework_ that was selected at build time based
/// on the application's compatibility requirements; it doesn't tell
/// anything about the actual OS version.
/// </remarks>
internal static string DotNetTargetFramework =>
// We'll need to update this whenever we add or remove supported target frameworks in the .csproj file.
// Order of these conditonals matters. Specific frameworks come before net7.0 intentionally.
#if ANDROID
"net7.0-android";
#elif IOS
"net7.0-ios";
#elif MACCATALYST
"net7.0-maccatalyst";
#elif WINDOWS
"net7.0-windows";
#elif NET7_0
"net7.0";
#else
"unknown";
#endif

}
}
Loading
Loading