-
Notifications
You must be signed in to change notification settings - Fork 181
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
Access to Analytics in Swift / Objective C (For hybrid react-native / bare workflow) #592
Comments
We don't currently have a way to do this right now. The old library was just a wrapper over the Analytics.iOS/Android libraries whereas v2 was written with RN in mind from the start so we don't have yet exposed methods to the native side. But this is a good idea. I can see the value here. We will put this in our roadmap! |
Thanks @oscb I end up using a workaround by sending iOS events to javascript side. This example doesn't support attributes, but you can add them:
And in swift Track.swift
So maybe adding a swift or Objective C class would emit events in JS library would do it. |
Summary
Is there a way to expose some modules from the iOS native part of the app from Swift or ObjectiveC?
Pre-2.0 version I was able to achieve that with
The workaround seems to add Analytics for iOS separately. Is there a good way to share identity between 2 clients?
Proposed Solution
Expose some of the javascript methods so they can be called from ObjectiveC or Swift side of the app.
The text was updated successfully, but these errors were encountered: