質問

I'm creating an iOS framework (using iOS Universal Framework Template).

I would like to get the user's location (I don't need the exact position, the nearest city is enough). As my framework will be included in developers' apps, I don't want to force apps that don't need the user's location to ask the user for it.

Is there any way I could first check if the developer's app has asked the user for its location, and if the user allowed it, access the last location ? That way, if the app has access, my framework can use it, but I don't force the developer's app to prompt the user to access his location.

役に立ちましたか?

解決

You could have a boolean property which the developer using your API sets, and this would determine whether or not to use core location.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top