Skip to content
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

Latitude & Longitude user properties not tracked on iOS #233

Closed
bastianfischer-neotaste opened this issue Oct 8, 2024 · 2 comments
Closed
Labels
question Further information is requested

Comments

@bastianfischer-neotaste
Copy link

My iOS events have no latitude/longitude assigned, while the Android ones have. Looking though the documentations I could find this option for Android, but none for iOS. Am I missing something or are the "Latitude" and "Longitude" user properties not available for iOS? The IP mapping (e.g. "City") works fine.

By default, Amplitude can use Android location service (if available) to add the specific coordinates (longitude and latitude) for the location from which an event is logged. Control this behavior by enable / disable location listening during the initialization.

Thanks in advance!

@bastianfischer-neotaste bastianfischer-neotaste added the question Further information is requested label Oct 8, 2024
@crleona
Copy link
Collaborator

crleona commented Oct 8, 2024

Hi @bastianfischer-neotaste - Location is not tracked by default in Amplitude-Swift, we recommend creating a plugin to enrich events with location data. An example can be found in https://github.com/amplitude/Amplitude-Swift/blob/main/Examples/AmplitudeSwiftUIExample/AmplitudeSwiftUIExample/ExamplePlugins/LocationPlugin.swift

@bastianfischer-neotaste
Copy link
Author

Hi @bastianfischer-neotaste - Location is not tracked by default in Amplitude-Swift, we recommend creating a plugin to enrich events with location data. An example can be found in https://github.com/amplitude/Amplitude-Swift/blob/main/Examples/AmplitudeSwiftUIExample/AmplitudeSwiftUIExample/ExamplePlugins/LocationPlugin.swift

This helps a lot, thanks for clarifying! I'll try to apply this to our codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants