Skip to content

chore: Build test screen for location module#571

Merged
mahmoud-elmorabea merged 1 commit intofeat/location-modulefrom
location-sample-app
Mar 11, 2026
Merged

chore: Build test screen for location module#571
mahmoud-elmorabea merged 1 commit intofeat/location-modulefrom
location-sample-app

Conversation

@mahmoud-elmorabea
Copy link
Contributor

@mahmoud-elmorabea mahmoud-elmorabea commented Mar 10, 2026

👇


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 + SDK location subspec, and an iOS NSLocationWhenInUseUsageDescription entry.

Written by Cursor Bugbot for commit fe53ad0. This will update automatically on new commits. Configure here.

@mahmoud-elmorabea mahmoud-elmorabea self-assigned this Mar 10, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

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.


  • iOS FCM: 571.1.0 (29553234)
  • Android APN: 571.1.0 (29553234)

@mahmoud-elmorabea mahmoud-elmorabea marked this pull request as ready for review March 10, 2026 07:02
@mahmoud-elmorabea mahmoud-elmorabea requested a review from a team as a code owner March 10, 2026 07:02
style={styles.fieldInput}
value={latitude}
onChangeText={setLatitude}
keyboardType="numeric"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine, the SDK doesn't expose a callback for location request, so the status will be correct

@mahmoud-elmorabea mahmoud-elmorabea merged commit 2256101 into feat/location-module Mar 11, 2026
16 checks passed
@mahmoud-elmorabea mahmoud-elmorabea deleted the location-sample-app branch March 11, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants