-
Notifications
You must be signed in to change notification settings - Fork 128
Allow JS init with param app Id #72
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
Allow JS init with param app Id #72
Conversation
@podotki -- is this ready for review? -- It looks great already -- thanks for contributing! |
Mmm I think there is an error as I don't know much about Objective-C neither Java... |
At your leisure @podotki please let me know if you've got it working and this is ready for review! |
@podotki I'm starting to think about a new release -- do you think this is ready for final review and testing? |
This code is available with other changes in https://www.npmjs.com/package/react-native-zendesk-chat/v/0.4.1-beta.4 |
@podotki @fbartho this breaks existing apps unfortunately. Despite the docs stating appId is optional, it is not declared that way in objective C and upgrading casues this error:
I had to change: |
@emkman -- that's strange. I'm not getting that error in our codebase -- indeed I only saw that error on Android and fixed it in the release branch. What version of React-Native are you using? |
@fbartho "react-native": "0.63.3", on iOS 14 in the simulator. Not using Hermes. Looking at RNZendeskChatModule.m it seems like
|
I suspect maybe RN < 0.63.3 behaves differently, or something else was going on. @emkman -- I don't think overrides work with So we could apply a similar patch for iOS. If you're feeling up to it, in this PR I fixed a similar |
If both OSes need this, does it make sense to keep using the |
@emkman I agree with what you're suggesting with a slight twist: Instead of
And define |
@fbartho this way would mean no changes are needed for Android, correct? Works for me. |
Hi !
As the title says, just add handling of the parameter app Id at the init.
Let me know if it's ok for you.
This is not a big change and I think it can help a lot the community so feel free to update the code to be cleaner as I really wish that PR to be merged ;)
Thanks a lot :)