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

Add places accuracy #220

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/AEPSampleApp/extensions/PlacesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ const setAuthorizationStatus = () => {
console.log('Authorization status set');
};

const setAccuracyAuthorization = () => {
Places.setAccuracyAuthorization('fullAccuracy');
Copy link
Contributor

Choose a reason for hiding this comment

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

Use PlacesAccuracy.FULL instead of hardcoded string.

console.log('Accuracy authorization set');
};


const PlacesView = ({navigation: {goBack}}: NavigationProps) => {
return (
<View style={styles.container}>
Expand All @@ -99,6 +105,10 @@ const PlacesView = ({navigation: {goBack}}: NavigationProps) => {
title="setAuthorizationStatus()"
onPress={setAuthorizationStatus}
/>
<Button
title="setAccuracyAuthorization()"
onPress={setAccuracyAuthorization}
/>
<Button title="clear" onPress={clear} />
</ScrollView>
</View>
Expand Down
2 changes: 1 addition & 1 deletion apps/AEPSampleApp/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'
platform :ios, '14.0'
install! 'cocoapods', :deterministic_uuids => false

target 'AEPSampleApp' do
Expand Down
Loading