OneSignal-Android-SDK icon indicating copy to clipboard operation
OneSignal-Android-SDK copied to clipboard

Sending versionCode as game_version is inconsistent with iOS SDK

Open jalada opened this issue 1 year ago • 0 comments

In this SDK you send the package's versionCode as game_version (which shows up in the OneSignal interface as App Version). But on iOS you send the Version which (I think?) is more analgous to versionName - it doesn't affect builds like versionCode does on Android (that'd be a bit more like Build on iOS I guess).

Android:

https://github.com/OneSignal/OneSignal-Android-SDK/blob/e119f4d8074c4f7f42dcb23b473529819dffa25b/OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignal.java#L1521

iOS:

https://github.com/OneSignal/OneSignal-iOS-SDK/blob/f55808d7907fd3da97eda0c0b8674806763fdcd1/iOS_SDK/OneSignalSDK/Source/OneSignal.m#L1697

For multi-platform apps, especially React Native, this causes some frustrating inconsistency in the OneSignal UI and means we have to resort to our own custom app version trigger. These apps have the same version string, think you can guess which ones are Android and which are iOS:

image

I can't see a way to customise this behaviour on either iOS or Android referenced in the documentation nor obvious in the code. Is there something that could be added to help line these up?

jalada avatar Sep 22 '22 09:09 jalada