Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android "Duplicate analytics client created" #16

Closed
cristeahub opened this issue Oct 31, 2018 · 31 comments
Closed

Android "Duplicate analytics client created" #16

cristeahub opened this issue Oct 31, 2018 · 31 comments

Comments

@cristeahub
Copy link

This is a common issue on segment libraries for Android. The issue is that when you have already initialized the segment module on Android you cannot initialize it again without the app crashing.

This happens a lot when doing React Native development on Android, as running the Reload function (shake your device and press Reload) will cause this crash.

One solution is to guard the initialization on Android. While the doc of this project says you can catch errors when setting up, it doesn't seem to be working right now.

Here are some related issues in other repos with the same error:
https://github.com/leoilab/react-native-analytics-segment-io/issues/3
segmentio/analytics-android#538

fathyb pushed a commit that referenced this issue Nov 2, 2018
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
@PaliwalSparsh
Copy link

PaliwalSparsh commented Nov 16, 2018

Hi, I am facing the same issue. I have got "version": "0.0.1-beta.2" from npm and it breaks the app everytime i reload in development mode, saying 'Duplicate analytics client created'.

Should I be worried about using this in production?

Would turning initialization and tracking off in dev mode be a good solution for now. I can do this if I am sure, this problem does not occur in production mode.

@cristeahub
Copy link
Author

cristeahub commented Nov 16, 2018

Should I be worried about using this in production?

In my experience I haven't had any issues in production, only when reloading during development.

One very quick solution is to do something like this:

--- a/android/src/main/java/com/segment/analytics/reactnative/core/RNAnalyticsModule.kt
+++ b/android/src/main/java/com/segment/analytics/reactnative/core/RNAnalyticsModule.kt
@@ -69,9 +69,13 @@ class RNAnalyticsModule(context: ReactApplicationContext): ReactContextBaseJavaM
             builder.logLevel(Analytics.LogLevel.VERBOSE)
         }
 
-        Analytics.setSingletonInstance(
-            RNAnalytics.buildWithIntegrations(builder)
-        )
+        try {
+            Analytics.setSingletonInstance(
+                RNAnalytics.buildWithIntegrations(builder)
+            )
+        } catch(e: Exception) {
+            // Ignore, most likely error during development
+        }
     }
 
     @ReactMethod

With this I haven't had any issues in our builds, neither during development or production. I can't 100 % be sure this won't ever break in production, but our numbers seems to match that this is fine to do.

You can of course also expand this by adding some more error logging if you want to.

@PaliwalSparsh
Copy link

Thanks it worked for me. Looking forward for this to be integrated in the main build.

fathyb added a commit that referenced this issue Nov 26, 2018
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
fathyb added a commit that referenced this issue Nov 26, 2018
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
michaelkitson added a commit to Flatbook/analytics-react-native that referenced this issue Dec 11, 2018
@sfhallahan
Copy link

@fathyb any timeline for when e406197 will be merged? Still having problems with this issue

@taykcrane
Copy link

@fathyb Hate to bother, but we're excited about this fix too. Let us know if you have a timeline?

@adteulade
Copy link

Same here if you could please let us know when the fix has been merged.

@RajanJS
Copy link

RajanJS commented Jan 14, 2019

@fathyb
@michaelkitson
Any updates?

@AChevallier
Copy link

The problem is annoying :(

@fathyb
Any updates?

@gsunsnackv
Copy link

Me too comment. And also feels in some strange situation we get this in production app

@anandwahed
Copy link

@fathyb will the fix be merged anytime soon or is there any other workaround for this issue during the app development?

@gsunsnackv
Copy link

gsunsnackv commented Feb 18, 2019 via email

@cristeahub
Copy link
Author

This is what we do #16 (comment) . Decide for yourselves if you only want to apply this patch in dev or not.

@gsunsnackv
Copy link

We are seeing another crash in our production system.

@sejas
Copy link

sejas commented Feb 26, 2019

Yeah, I am having the same error in production and in development.
Very annoying.

try catch, .catch or consulting analytics.ready didn't work at all.

@anandwahed
Copy link

anandwahed commented Feb 26, 2019

@sejas the solution posted by @cristeahub #16 (comment) works fine for us. Till not we haven't seen any issues in the production as well.

@sejas
Copy link

sejas commented Feb 26, 2019

Thank you @anandwahed !
I already forked this repo to have a fixed version.

Thanks to crashlytics I detected this issue in production.
They are raised because I use code push to deploy OTA.
When the app is reloaded with the new version, the analytics.setup is called again, and my clients enjoy a new crash.
I am not totally sure if this is the only scenario where this library crashes in production.

It would be great if you handle this native error and then raise it to JS to handle it there.

Thanks !

@snackvideo-dkeith
Copy link

snackvideo-dkeith commented Feb 26, 2019

We forked the repo, and implemented this solution. Here is a link to the repo

You can include this fork with yarn add https://github.com/snackvideo/analytics-react-native. We created this branch by

  1. Cloning this repo
  2. Running yarn to install dependencies
  3. Making the changes quoted below
  4. Running yarn core build to build the @segment/react-native package.
  5. Then we put the contents of packages/core into our repo

One very quick solution is to do something like this:

--- a/android/src/main/java/com/segment/analytics/reactnative/core/RNAnalyticsModule.kt
+++ b/android/src/main/java/com/segment/analytics/reactnative/core/RNAnalyticsModule.kt
@@ -69,9 +69,13 @@ class RNAnalyticsModule(context: ReactApplicationContext): ReactContextBaseJavaM
             builder.logLevel(Analytics.LogLevel.VERBOSE)
         }
 
-        Analytics.setSingletonInstance(
-            RNAnalytics.buildWithIntegrations(builder)
-        )
+        try {
+            Analytics.setSingletonInstance(
+                RNAnalytics.buildWithIntegrations(builder)
+            )
+        } catch(e: Exception) {
+            // Ignore, most likely error during development
+        }
     }
 
     @ReactMethod

With this I haven't had any issues in our builds, neither during development or production. I can't 100 % be sure this won't ever break in production, but our numbers seems to match that this is fine to do.

You can of course also expand this by adding some more error logging if you want to.

@briwong
Copy link

briwong commented Mar 6, 2019

@fathyb - any luck getting this merged? We're also experiencing this in our prod environment

@jpolo
Copy link

jpolo commented Mar 8, 2019

When using appcenter codepush : this causes the app crash :(

@anandwahed
Copy link

@jpolo even with the fix mentioned by @snackvideo-dkeith #16 (comment) ?

@dgritsko
Copy link

Any movement on this issue?

@f2prateek
Copy link
Contributor

sorry for the delay, have you tried pulling in the fix e406197 ?

You can run try it with yarn add https://github.com/segmentio/analytics-react-native#e406197f6241e4311bf8fd533d995923c79eb310

@sampsonjoliver
Copy link

sampsonjoliver commented Mar 14, 2019

👍 to having this error with CodePush. Unpleasant choosing between our delivery mechanism, and our analytics tracking mechanism.

@f2prateek trying that, yarn gives the error error Can't add "@internal/analytics-react-native": invalid package version undefined. @snackvideo-dkeith's fork works (thank you!), though I'd rather not ship a production version of our app based on an unpublished third-party fork! Any word on this fix being published?

pkt-dev pushed a commit to weavix/analytics-react-native that referenced this issue Mar 18, 2019
@petergaultney
Copy link

Looks like there's a fix implemented but not yet released? Any idea when this might get released? We're not excited about the idea of yarn adding a specific, unreleased hash of this project.

@briwong
Copy link

briwong commented Mar 22, 2019

Hi @calvinfo - do you think this fix can be expedited? Like most users above, we're having to choose between including Segment and CodePush in our app, which is really unpleasant

@jpolo
Copy link

jpolo commented Mar 22, 2019

I have contacted the support directly to explain the problem as this repository does not seems to have activity.
I waited 10 days for an answer that is something like "It's in the ticket system, I am waiting for an ETA"

I suggest every concerned people to contact support to make these issue more visible and make the Segment devs to do more active support.

fathyb added a commit that referenced this issue Mar 28, 2019
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
fathyb pushed a commit that referenced this issue Mar 28, 2019
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
fathyb pushed a commit that referenced this issue Mar 28, 2019
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
fathyb pushed a commit that referenced this issue Mar 29, 2019
With this change the setup method will now resolve its promises and
thereby be able to catch errors during setup.

Fixes #16
fathyb added a commit that referenced this issue Mar 29, 2019
@fathyb
Copy link
Contributor

fathyb commented Mar 29, 2019

Hey everyone, we've released a bug fix in 0.0.1-beta.4: https://github.com/segmentio/analytics-react-native/blob/master/CHANGELOG.md#001-beta4-2019-03-29

@gsunsnackv
Copy link

I confirm that it works. RR refresh in dev mode now does not crash anymore so it should not happen in production as well

@jpolo
Copy link

jpolo commented Apr 1, 2019

Thanks @fathyb !

@kevinpham404
Copy link

I came across this bug for iOS, using React Native.
Error triggered when trying to use recordScreenViews: true or trackAppLifecycleEvents: true.

Solution:
If you are encountering this error for React Native, and you are using CocoaPods, make sure you are not installing both Analytics and RNAnalytics in your podfile.

Having both declared seems to cause the duplicate analytics client bug.

@benevbright
Copy link

I having similar issue but it's different.
Because I'm trying to use Segment from both RN side and native side with same writeKey.
I wrote about my problem here #95
Anyone's trying to do the same?

jezallan pushed a commit to uswitch/analytics-react-native that referenced this issue Jun 29, 2022
## @uswitch/analytics-react-native-v1.0.0 (2022-06-29)

### ⚠ BREAKING CHANGES

* We've improved iOS support for non-Cocoapods users. You do not need to follow these steps if you are using Cocoapods.

### Migration instructions

- Remove `Analytics.framework` from your Xcode project
- Remove `Analytics.framework` from `Embedded Binaries`
- Follow [Current instructions](#current-instructions)

### Current instructions
* **client:** We've dropped the chained configuration for an object one instead. This will make Analytics blend even better with tools like Prettier.

Before:
```js
analytics
    .configure()
        .using(Mixpanel, GoogleAnalytics)
        .recordScreenViews()
        .trackAppLifecycleEvents()
        .trackAttributionData()
        .android()
            .flushInterval(60)
            .disableDevicedId()
        .ios()
            .trackAdvertising()
            .trackDeepLinks()
    .setup("writeKey")
    .then(() =>
        console.log('Analytics is ready')
    )
    .catch(err =>
        console.error('Something went wrong', err)
    )
```

Now:
```js
analytics
    .setup('writeKey', {
        using: [Mixpanel, GoogleAnalytics],
        recordScreenViews: true,
        trackAppLifecycleEvents: true,
        trackAttributionData: true,

        android: {
            flushInterval: 60,
            collectDeviceId: false
        },
        ios: {
            trackAdvertising: true,
            trackDeepLinks: true
        }
    })
    .then(() =>
        console.log('Analytics is ready')
    )
    .catch(err =>
        console.error('Something went wrong', err)
    )
```

### Features

* Add AdvertisingId Plugin ([segmentio#574](https://github.com/uswitch/analytics-react-native/issues/574)) ([9f47e67](9f47e67))
* add analytics 2.0 ([segmentio#360](https://github.com/uswitch/analytics-react-native/issues/360)) ([829fc80](829fc80))
* add anonymousId logic to reset ([segmentio#475](https://github.com/uswitch/analytics-react-native/issues/475)) ([23baab4](23baab4))
* add deeplink referral application data ([segmentio#454](https://github.com/uswitch/analytics-react-native/issues/454)) ([dbfc267](dbfc267))
* add reset to plugins ([segmentio#490](https://github.com/uswitch/analytics-react-native/issues/490)) ([686f73f](686f73f))
* added destination metadata and internal timeline processing for destinatio plugins ([segmentio#477](https://github.com/uswitch/analytics-react-native/issues/477)) ([8b1df55](8b1df55))
* **android:** allow opt-out for new lifecycle methods ([segmentio#256](https://github.com/uswitch/analytics-react-native/issues/256)) ([8dbadad](8dbadad))
* **android:** allow passing integration options ([segmentio#184](https://github.com/uswitch/analytics-react-native/issues/184)) ([6845c67](6845c67))
* **anonymousid:** add a method to retrieve the anonymousId ([988f382](988f382))
* **client:** use object-based configuration ([segmentio#7](https://github.com/uswitch/analytics-react-native/issues/7)) ([6a281f4](6a281f4))
* **core:** add middlewares ([9aeafa3](9aeafa3))
* **core:** add native configuration method ([19c4fae](19c4fae))
* **core:** export TypeScript public interfaces ([9978cd7](9978cd7))
* **core:** http proxying via setup configuration ([segmentio#202](https://github.com/uswitch/analytics-react-native/issues/202)) ([40a3f5a](40a3f5a))
* Create Client Proxy Option ([segmentio#570](https://github.com/uswitch/analytics-react-native/issues/570)) ([eaeb940](eaeb940))
* createClient "storePersistor" option ([segmentio#549](https://github.com/uswitch/analytics-react-native/issues/549)) ([4b70e99](4b70e99))
* **integrations:** allow setting integration options ([13b663e](13b663e))
* **ios:** make idfa for ios external to analytics ([segmentio#210](https://github.com/uswitch/analytics-react-native/issues/210)) ([35f96a0](35f96a0))
* **ios:** set trackAdvertising=true by default on ios ([segmentio#82](https://github.com/uswitch/analytics-react-native/issues/82)) ([09e997b](09e997b))
* new onContextLoad events and awaitable context updates ([segmentio#532](https://github.com/uswitch/analytics-react-native/issues/532)) ([4508ad4](4508ad4)), closes [segmentio#524](https://github.com/uswitch/analytics-react-native/issues/524) [segmentio#527](https://github.com/uswitch/analytics-react-native/issues/527)
* plugins can now disable integrations by marking them as false in the event.integrations ([segmentio#496](https://github.com/uswitch/analytics-react-native/issues/496)) ([65c2371](65c2371))
* replacing redux with sovran ([segmentio#422](https://github.com/uswitch/analytics-react-native/issues/422)) ([2d69cc1](2d69cc1))

### Bug Fixes

* add fix for deviceId on android builds ([segmentio#405](https://github.com/uswitch/analytics-react-native/issues/405)) ([92c1fc0](92c1fc0))
* add override fix to ios modules ([segmentio#404](https://github.com/uswitch/analytics-react-native/issues/404)) ([8e47eb6](8e47eb6))
* **android:** bump android dependency ([segmentio#214](https://github.com/uswitch/analytics-react-native/issues/214)) ([acd0f2f](acd0f2f))
* **android:** bump deps and fix config issues ([segmentio#298](https://github.com/uswitch/analytics-react-native/issues/298)) ([5a2ed9b](5a2ed9b))
* **android:** defaultKotlinVersion ([segmentio#159](https://github.com/uswitch/analytics-react-native/issues/159)) ([54e90a3](54e90a3))
* **android:** fix crash when promise resolves in debug mode ([segmentio#267](https://github.com/uswitch/analytics-react-native/issues/267)) ([a0e21d9](a0e21d9))
* **android:** fixed context not passing thru ([segmentio#147](https://github.com/uswitch/analytics-react-native/issues/147)) ([cb1b412](cb1b412))
* **android:** parse android specific options correctly ([segmentio#187](https://github.com/uswitch/analytics-react-native/issues/187)) ([49e4815](49e4815))
* **android:** pull android tool versions from root project ([segmentio#12](https://github.com/uswitch/analytics-react-native/issues/12)) ([3f1eb3c](3f1eb3c)), closes [/github.com/frostney/react-native-create-library/blob/master/templates/android.js#L28](https://github.com/uswitch//github.com/frostney/react-native-create-library/blob/master/templates/android.js/issues/L28)
* appsflyer attribution ([segmentio#547](https://github.com/uswitch/analytics-react-native/issues/547)) ([494df24](494df24))
* **bridge:** fix duplicated analytics client improving errors ([segmentio#162](https://github.com/uswitch/analytics-react-native/issues/162)) ([28a981d](28a981d))
* **bridge:** fix p(r)omise typo ([segmentio#168](https://github.com/uswitch/analytics-react-native/issues/168)) ([d9794db](d9794db))
* **bridge:** improve missing native module error ([segmentio#5](https://github.com/uswitch/analytics-react-native/issues/5)) ([0a03617](0a03617))
* change React dependency to React-Core ([segmentio#254](https://github.com/uswitch/analytics-react-native/issues/254)) ([c51e689](c51e689))
* **client:** copy package with version ([2c223dd](2c223dd))
* **config:** pass user-supplied context for analytics calls ([segmentio#188](https://github.com/uswitch/analytics-react-native/issues/188)) ([7429567](7429567))
* **context:** fix `context` `name` and `version` ([09f0b28](09f0b28))
* **core:** fix duplicate client error in dev mode ([segmentio#51](https://github.com/uswitch/analytics-react-native/issues/51)) ([cb66749](cb66749)), closes [segmentio#16](https://github.com/uswitch/analytics-react-native/issues/16) [segmentio#15](https://github.com/uswitch/analytics-react-native/issues/15)
* **core:** fix TypeScript typings ([fe7933c](fe7933c)), closes [segmentio#11](https://github.com/uswitch/analytics-react-native/issues/11)
* **core:** React-Native 0.59 Support ([segmentio#50](https://github.com/uswitch/analytics-react-native/issues/50)) ([a78c94e](a78c94e)), closes [segmentio#46](https://github.com/uswitch/analytics-react-native/issues/46) [segmentio#44](https://github.com/uswitch/analytics-react-native/issues/44)
* custom event integrations override support, refactor integration merge logic ([segmentio#379](https://github.com/uswitch/analytics-react-native/issues/379)) ([d0b8fbf](d0b8fbf))
* deepmerge device context on update ([segmentio#543](https://github.com/uswitch/analytics-react-native/issues/543)) ([5878043](5878043))
* don't call stringValue of strings ([segmentio#253](https://github.com/uswitch/analytics-react-native/issues/253)) ([226a9e4](226a9e4))
* fix bundle unbundled logic ([segmentio#521](https://github.com/uswitch/analytics-react-native/issues/521)) ([9e080b1](9e080b1))
* fixes missing context in first launch event after install ([segmentio#451](https://github.com/uswitch/analytics-react-native/issues/451)) ([efb2805](efb2805))
* fixing scheduling of flush intervals ([segmentio#457](https://github.com/uswitch/analytics-react-native/issues/457)) ([1b86cfc](1b86cfc))
* format integration settings correctly in the event integrations ([9e7d62d](9e7d62d))
* generating a UUID for anonymousID initial value, refactor userId replacement ([segmentio#440](https://github.com/uswitch/analytics-react-native/issues/440)) ([ef297ee](ef297ee))
* **ios:** bump ios dependency ([segmentio#217](https://github.com/uswitch/analytics-react-native/issues/217)) ([4848bbd](4848bbd))
* **ios:** fix `trackAppLifecycleEvents` ([50c4b09](50c4b09))
* **ios:** fixes for building for newer rn ([segmentio#206](https://github.com/uswitch/analytics-react-native/issues/206)) ([ecce14c](ecce14c))
* match identify and reset client methods arguments, add token to context ([segmentio#533](https://github.com/uswitch/analytics-react-native/issues/533)) ([f865d48](f865d48))
* merge context to preserve plugin injected properties ([segmentio#487](https://github.com/uswitch/analytics-react-native/issues/487)) ([9586a7a](9586a7a))
* **package:** missing repo info ([segmentio#268](https://github.com/uswitch/analytics-react-native/issues/268)) ([6a2a93b](6a2a93b))
* persist user traits across events ([segmentio#581](https://github.com/uswitch/analytics-react-native/issues/581)) ([d48ac83](d48ac83))
* prevent events mutating state on empty removes ([133b821](133b821))
* re-add logic for tracking lifecycle events ([segmentio#328](https://github.com/uswitch/analytics-react-native/issues/328)) ([92194f3](92194f3))
* refactor getDeviceID to use DRM, remove AndroidID ([segmentio#567](https://github.com/uswitch/analytics-react-native/issues/567)) ([f2616aa](f2616aa))
* refactoring redux event subscriptions and locking upload ([segmentio#376](https://github.com/uswitch/analytics-react-native/issues/376)) ([a302215](a302215))
* remove console.warning when sending events ([segmentio#413](https://github.com/uswitch/analytics-react-native/issues/413)) ([954ece1](954ece1))
* remove import cycle in DestinationMetadataEnrichment ([segmentio#505](https://github.com/uswitch/analytics-react-native/issues/505)) ([9d51d3f](9d51d3f))
* reset anonymousId for users who have persisted incorrect value ([segmentio#445](https://github.com/uswitch/analytics-react-native/issues/445)) ([37aeb81](37aeb81))
* setting minSDK to > 21 for Android and updating to sovran 0.2.2 ([segmentio#430](https://github.com/uswitch/analytics-react-native/issues/430)) ([4c6e977](4c6e977))
* upgrade sovran to v0.2.3, move RN to peerDeps ([segmentio#437](https://github.com/uswitch/analytics-react-native/issues/437)) ([b76739a](b76739a))

* Improve iOS support for users without Cocoapods  (segmentio#27) ([e90a58c](e90a58c)), closes [segmentio#27](https://github.com/uswitch/analytics-react-native/issues/27) [segmentio/analytics-ios#3](segmentio/analytics-ios#3)
jezallan pushed a commit to uswitch/analytics-react-native that referenced this issue Jun 29, 2022
## @uswitch/analytics-react-native-v1.0.0 (2022-06-29)

### ⚠ BREAKING CHANGES

* We've improved iOS support for non-Cocoapods users. You do not need to follow these steps if you are using Cocoapods.

### Migration instructions

- Remove `Analytics.framework` from your Xcode project
- Remove `Analytics.framework` from `Embedded Binaries`
- Follow [Current instructions](#current-instructions)

### Current instructions
* **client:** We've dropped the chained configuration for an object one instead. This will make Analytics blend even better with tools like Prettier.

Before:
```js
analytics
    .configure()
        .using(Mixpanel, GoogleAnalytics)
        .recordScreenViews()
        .trackAppLifecycleEvents()
        .trackAttributionData()
        .android()
            .flushInterval(60)
            .disableDevicedId()
        .ios()
            .trackAdvertising()
            .trackDeepLinks()
    .setup("writeKey")
    .then(() =>
        console.log('Analytics is ready')
    )
    .catch(err =>
        console.error('Something went wrong', err)
    )
```

Now:
```js
analytics
    .setup('writeKey', {
        using: [Mixpanel, GoogleAnalytics],
        recordScreenViews: true,
        trackAppLifecycleEvents: true,
        trackAttributionData: true,

        android: {
            flushInterval: 60,
            collectDeviceId: false
        },
        ios: {
            trackAdvertising: true,
            trackDeepLinks: true
        }
    })
    .then(() =>
        console.log('Analytics is ready')
    )
    .catch(err =>
        console.error('Something went wrong', err)
    )
```

### Features

* Add AdvertisingId Plugin ([segmentio#574](https://github.com/uswitch/analytics-react-native/issues/574)) ([9f47e67](9f47e67))
* add analytics 2.0 ([segmentio#360](https://github.com/uswitch/analytics-react-native/issues/360)) ([829fc80](829fc80))
* add anonymousId logic to reset ([segmentio#475](https://github.com/uswitch/analytics-react-native/issues/475)) ([23baab4](23baab4))
* add deeplink referral application data ([segmentio#454](https://github.com/uswitch/analytics-react-native/issues/454)) ([dbfc267](dbfc267))
* add reset to plugins ([segmentio#490](https://github.com/uswitch/analytics-react-native/issues/490)) ([686f73f](686f73f))
* added destination metadata and internal timeline processing for destinatio plugins ([segmentio#477](https://github.com/uswitch/analytics-react-native/issues/477)) ([8b1df55](8b1df55))
* **android:** allow opt-out for new lifecycle methods ([segmentio#256](https://github.com/uswitch/analytics-react-native/issues/256)) ([8dbadad](8dbadad))
* **android:** allow passing integration options ([segmentio#184](https://github.com/uswitch/analytics-react-native/issues/184)) ([6845c67](6845c67))
* **anonymousid:** add a method to retrieve the anonymousId ([988f382](988f382))
* **client:** use object-based configuration ([segmentio#7](https://github.com/uswitch/analytics-react-native/issues/7)) ([6a281f4](6a281f4))
* **core:** add middlewares ([9aeafa3](9aeafa3))
* **core:** add native configuration method ([19c4fae](19c4fae))
* **core:** export TypeScript public interfaces ([9978cd7](9978cd7))
* **core:** http proxying via setup configuration ([segmentio#202](https://github.com/uswitch/analytics-react-native/issues/202)) ([40a3f5a](40a3f5a))
* Create Client Proxy Option ([segmentio#570](https://github.com/uswitch/analytics-react-native/issues/570)) ([eaeb940](eaeb940))
* createClient "storePersistor" option ([segmentio#549](https://github.com/uswitch/analytics-react-native/issues/549)) ([4b70e99](4b70e99))
* **integrations:** allow setting integration options ([13b663e](13b663e))
* **ios:** make idfa for ios external to analytics ([segmentio#210](https://github.com/uswitch/analytics-react-native/issues/210)) ([35f96a0](35f96a0))
* **ios:** set trackAdvertising=true by default on ios ([segmentio#82](https://github.com/uswitch/analytics-react-native/issues/82)) ([09e997b](09e997b))
* new onContextLoad events and awaitable context updates ([segmentio#532](https://github.com/uswitch/analytics-react-native/issues/532)) ([4508ad4](4508ad4)), closes [segmentio#524](https://github.com/uswitch/analytics-react-native/issues/524) [segmentio#527](https://github.com/uswitch/analytics-react-native/issues/527)
* plugins can now disable integrations by marking them as false in the event.integrations ([segmentio#496](https://github.com/uswitch/analytics-react-native/issues/496)) ([65c2371](65c2371))
* replacing redux with sovran ([segmentio#422](https://github.com/uswitch/analytics-react-native/issues/422)) ([2d69cc1](2d69cc1))

### Bug Fixes

* add fix for deviceId on android builds ([segmentio#405](https://github.com/uswitch/analytics-react-native/issues/405)) ([92c1fc0](92c1fc0))
* add override fix to ios modules ([segmentio#404](https://github.com/uswitch/analytics-react-native/issues/404)) ([8e47eb6](8e47eb6))
* **android:** bump android dependency ([segmentio#214](https://github.com/uswitch/analytics-react-native/issues/214)) ([acd0f2f](acd0f2f))
* **android:** bump deps and fix config issues ([segmentio#298](https://github.com/uswitch/analytics-react-native/issues/298)) ([5a2ed9b](5a2ed9b))
* **android:** defaultKotlinVersion ([segmentio#159](https://github.com/uswitch/analytics-react-native/issues/159)) ([54e90a3](54e90a3))
* **android:** fix crash when promise resolves in debug mode ([segmentio#267](https://github.com/uswitch/analytics-react-native/issues/267)) ([a0e21d9](a0e21d9))
* **android:** fixed context not passing thru ([segmentio#147](https://github.com/uswitch/analytics-react-native/issues/147)) ([cb1b412](cb1b412))
* **android:** parse android specific options correctly ([segmentio#187](https://github.com/uswitch/analytics-react-native/issues/187)) ([49e4815](49e4815))
* **android:** pull android tool versions from root project ([segmentio#12](https://github.com/uswitch/analytics-react-native/issues/12)) ([3f1eb3c](3f1eb3c)), closes [/github.com/frostney/react-native-create-library/blob/master/templates/android.js#L28](https://github.com/uswitch//github.com/frostney/react-native-create-library/blob/master/templates/android.js/issues/L28)
* appsflyer attribution ([segmentio#547](https://github.com/uswitch/analytics-react-native/issues/547)) ([494df24](494df24))
* **bridge:** fix duplicated analytics client improving errors ([segmentio#162](https://github.com/uswitch/analytics-react-native/issues/162)) ([28a981d](28a981d))
* **bridge:** fix p(r)omise typo ([segmentio#168](https://github.com/uswitch/analytics-react-native/issues/168)) ([d9794db](d9794db))
* **bridge:** improve missing native module error ([segmentio#5](https://github.com/uswitch/analytics-react-native/issues/5)) ([0a03617](0a03617))
* change React dependency to React-Core ([segmentio#254](https://github.com/uswitch/analytics-react-native/issues/254)) ([c51e689](c51e689))
* **client:** copy package with version ([2c223dd](2c223dd))
* **config:** pass user-supplied context for analytics calls ([segmentio#188](https://github.com/uswitch/analytics-react-native/issues/188)) ([7429567](7429567))
* **context:** fix `context` `name` and `version` ([09f0b28](09f0b28))
* **core:** fix duplicate client error in dev mode ([segmentio#51](https://github.com/uswitch/analytics-react-native/issues/51)) ([cb66749](cb66749)), closes [segmentio#16](https://github.com/uswitch/analytics-react-native/issues/16) [segmentio#15](https://github.com/uswitch/analytics-react-native/issues/15)
* **core:** fix TypeScript typings ([fe7933c](fe7933c)), closes [segmentio#11](https://github.com/uswitch/analytics-react-native/issues/11)
* **core:** React-Native 0.59 Support ([segmentio#50](https://github.com/uswitch/analytics-react-native/issues/50)) ([a78c94e](a78c94e)), closes [segmentio#46](https://github.com/uswitch/analytics-react-native/issues/46) [segmentio#44](https://github.com/uswitch/analytics-react-native/issues/44)
* custom event integrations override support, refactor integration merge logic ([segmentio#379](https://github.com/uswitch/analytics-react-native/issues/379)) ([d0b8fbf](d0b8fbf))
* deepmerge device context on update ([segmentio#543](https://github.com/uswitch/analytics-react-native/issues/543)) ([5878043](5878043))
* don't call stringValue of strings ([segmentio#253](https://github.com/uswitch/analytics-react-native/issues/253)) ([226a9e4](226a9e4))
* fix bundle unbundled logic ([segmentio#521](https://github.com/uswitch/analytics-react-native/issues/521)) ([9e080b1](9e080b1))
* fixes missing context in first launch event after install ([segmentio#451](https://github.com/uswitch/analytics-react-native/issues/451)) ([efb2805](efb2805))
* fixing scheduling of flush intervals ([segmentio#457](https://github.com/uswitch/analytics-react-native/issues/457)) ([1b86cfc](1b86cfc))
* format integration settings correctly in the event integrations ([9e7d62d](9e7d62d))
* generating a UUID for anonymousID initial value, refactor userId replacement ([segmentio#440](https://github.com/uswitch/analytics-react-native/issues/440)) ([ef297ee](ef297ee))
* **ios:** bump ios dependency ([segmentio#217](https://github.com/uswitch/analytics-react-native/issues/217)) ([4848bbd](4848bbd))
* **ios:** fix `trackAppLifecycleEvents` ([50c4b09](50c4b09))
* **ios:** fixes for building for newer rn ([segmentio#206](https://github.com/uswitch/analytics-react-native/issues/206)) ([ecce14c](ecce14c))
* match identify and reset client methods arguments, add token to context ([segmentio#533](https://github.com/uswitch/analytics-react-native/issues/533)) ([f865d48](f865d48))
* merge context to preserve plugin injected properties ([segmentio#487](https://github.com/uswitch/analytics-react-native/issues/487)) ([9586a7a](9586a7a))
* **package:** missing repo info ([segmentio#268](https://github.com/uswitch/analytics-react-native/issues/268)) ([6a2a93b](6a2a93b))
* persist user traits across events ([segmentio#581](https://github.com/uswitch/analytics-react-native/issues/581)) ([d48ac83](d48ac83))
* prevent events mutating state on empty removes ([133b821](133b821))
* re-add logic for tracking lifecycle events ([segmentio#328](https://github.com/uswitch/analytics-react-native/issues/328)) ([92194f3](92194f3))
* refactor getDeviceID to use DRM, remove AndroidID ([segmentio#567](https://github.com/uswitch/analytics-react-native/issues/567)) ([f2616aa](f2616aa))
* refactoring redux event subscriptions and locking upload ([segmentio#376](https://github.com/uswitch/analytics-react-native/issues/376)) ([a302215](a302215))
* remove console.warning when sending events ([segmentio#413](https://github.com/uswitch/analytics-react-native/issues/413)) ([954ece1](954ece1))
* remove import cycle in DestinationMetadataEnrichment ([segmentio#505](https://github.com/uswitch/analytics-react-native/issues/505)) ([9d51d3f](9d51d3f))
* reset anonymousId for users who have persisted incorrect value ([segmentio#445](https://github.com/uswitch/analytics-react-native/issues/445)) ([37aeb81](37aeb81))
* setting minSDK to > 21 for Android and updating to sovran 0.2.2 ([segmentio#430](https://github.com/uswitch/analytics-react-native/issues/430)) ([4c6e977](4c6e977))
* upgrade sovran to v0.2.3, move RN to peerDeps ([segmentio#437](https://github.com/uswitch/analytics-react-native/issues/437)) ([b76739a](b76739a))

* Improve iOS support for users without Cocoapods  (segmentio#27) ([e90a58c](e90a58c)), closes [segmentio#27](https://github.com/uswitch/analytics-react-native/issues/27) [segmentio/analytics-ios#3](segmentio/analytics-ios#3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.