chore: Build test screen for location module#571
chore: Build test screen for location module#571mahmoud-elmorabea merged 1 commit intofeat/location-modulefrom
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.
|
| style={styles.fieldInput} | ||
| value={latitude} | ||
| onChangeText={setLatitude} | ||
| keyboardType="numeric" |
There was a problem hiding this comment.
Numeric keyboard prevents negative coordinate entry on iOS
Low Severity
keyboardType="numeric" on iOS does not show a minus sign key, making it impossible to type negative coordinates (e.g., southern latitudes or western longitudes). The longitude placeholder even suggests -74.0060, but users can't actually type the - character. Using numbers-and-punctuation would allow both decimals and negative signs on iOS.
Additional Locations (1)
2676acb to
fe53ad0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| const result = await request(LOCATION_PERMISSION); | ||
| if (result === RESULTS.GRANTED || result === RESULTS.LIMITED) { | ||
| setSdkRequestingLabel(true); | ||
| CustomerIO.location.requestLocationUpdate(); |
There was a problem hiding this comment.
SDK requesting status label never automatically resets
Low Severity
sdkRequestingLabel is set to true when the user taps "Request location once (SDK)", but requestLocationUpdate() is fire-and-forget (returns void with no callback or promise). The only code that resets sdkRequestingLabel to false is inside setLocation, which is only called by the other options. This means the status text gets permanently stuck on "Requesting location once (SDK)..." after using Option 2, with no automatic resolution.
Additional Locations (1)
There was a problem hiding this comment.
That's fine, the SDK doesn't expose a callback for location request, so the status will be correct


👇
Note
Medium Risk
Introduces new location permissions and wiring on both iOS and Android, which can impact privacy/compliance and runtime permission flows, but is isolated to the example app/test UI.
Overview
Adds a new in-app Location test screen to the example app that can set Customer.io’s last known location via presets/manual entry, request a one-time SDK location update, or fetch device coordinates using
@react-native-community/geolocation+react-native-permissions.Wires the screen into navigation from Home, enables the Customer.io location module by default (including default
location.trackingMode), and updates platform setup: Android manifest location permissions + Gradle flag, iOS Podfile permissions setup + SDKlocationsubspec, and an iOSNSLocationWhenInUseUsageDescriptionentry.Written by Cursor Bugbot for commit fe53ad0. This will update automatically on new commits. Configure here.