3

I use KIF framework (http://github.com/kif-framework/KIF) with Xcode Continuous Integration Server for UI testing.

When XCode CI server start app in iOS Simulator system alert "Application would like to use your current location" appears.

I use this delegate

- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus: (CLAuthorizationStatus)status

to get the notification that user allows to use location and I need it to keep like it is.

  1. Is it possible to tap OK on this system alert with KIF ? I didn't found out the way.
  2. Or how to allow application use location service in simulator without showing this alert ?

1 Answer 1

2

According to this answer from the top KIF contributor, dismissing system alerts automatically is impossible, and you should therefore mock (i.e. provide a substitute for) the location service so that you can test your code without running into the alert.

Sign up to request clarification or add additional context in comments.

1 Comment

Caleb, It might work, but the problem is that location service starts before KIF method -beforeAll invoked. So it's too late to mock.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.