We are running a test automation suite and would like to prevent this message from appearing when using the iOS Simulator. Can anyone come up with a hack to automatically enable this when deploying a new app to the simulator?
Asked
Active
Viewed 881 times
2 Answers
2
do not put the
if([CLLocationMannager isLocationServicesEnabled])
check before u start the CLLocationManager
.
This boolean implicitly calls the Alert before the App starts finding the user location.
Also, the macros-
#if TARGET_IPHONE_SIMULATOR
code..without the if([CLLocationMannager isLocationServicesEnabled]) condition
//Simulator
#else
if([CLLocationMannager isLocationServicesEnabled]){code..}
// Device
#endif
can be put to use here..

Ishank
- 2,860
- 32
- 43
1
In your Console there will be an option Don't simulate Location, watch the screen shot , you will get an idea

Charan
- 4,940
- 3
- 26
- 43