Fix iOS analytics observing after refresh#227
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
In the case of a hard refresh that recreates the
AppcuesReactNative(and thus theImplementationswift class), the result was a newAnalyticsDelegate, but the guard insetup()returning early before the new delegate gets wired up. I've added a specific check and handling foranalyticsDelegate.implementation == nilin the guard.An easy way to test this is in an Expo app with
expo-dev-client: open the developer menu and select "Reload".This may resolve #192 which had a similar issue where the observer worked for Android but not iOS. However that issue didn't mention any refreshing.
Summary by CodeRabbit