fix: use enum values for userStatus instead of string on android#13
Conversation
|
The android side works - @osilviotti - Can you try to upgrade the nitro package to 35.4+ so it will generate new nitro files for iOS. |
|
Just added all the other generated files @Gautham495 |
|
@osilviotti - Thanks for the change, but there is an issue with the iOS types. This was not present before. |
|
@Gautham495 I think that's because the types were changed in #10 without running I can make the changes to the Swift file if you're happy to test it |
|
The iOS side is not building which will cause issues, I will check this out - @osilviotti |
|
I am not finding the time for this - @osilviotti - I will let you know once done. |
|
@Gautham495 I have got an iOS dev environment now so I can take a look. From first glance it looks like the issue is around this: The type is a union of numeric strings which nitrogen parses into values which are read as floats by Swift (here) I'll see if I can find a way around this |
|
If you can bring a fix, do let me know, i will merge the changes. |
For compatibility with Xcode 26.4
c59ef57 to
d2f81ff
Compare
d2f81ff to
b7be347
Compare
|
The build now works for me locally on iOS - I went with replacing the |
|
Thanks for the fix - @osilviotti - I have merged your changes - Thanks for taking the time to improve the library! Grateful for your help. |
When running
yarn example androidI was getting the following error preventing the build from completing:I believe it came in with #10 when the type of
userStatuswas changed fromStringtoPlayAgeRangeDeclarationUserStatusValues.I've updated the user status check to explicitly return enum values, and the app now builds and runs on my Android device.
I don't have an iOS device to test on and it looks like a similar issue exists there with
statusStringbeing typed as aStringrather thanAppleAgeRangeDeclarationUserStatusValues(here) but didn't want to make any changes that I couldn't test.Note: I haven't worked with Nitro Modules before - I only committed the generated files that had diffs, happy to update the PR if I've done this wrong