wit-ai / wit-ios

Wit.ai iOS client
Other
222 stars 71 forks source link

WitContextSetter initialised lazily / preventing alert on startup #43

Closed Enceradeira closed 9 years ago

Enceradeira commented 9 years ago

I had the problem that iOS always displayed an alert to ask for the location-service permission on startup of my app. This was triggered by Wit which accessed the location service during initialisation and long before Wit was effectively used.

This fix delays the initialisation of the WITContextSetter until when it's effectively used and the alert shows up much later.

Catacola commented 9 years ago

Hi Enceradeira,

Thanks for the great fix. I'll get this into our next release shortly.

Cheers!