[英]Other than significant location update , is there any other way get location after app is terminated?
[英]How can we get updated location after app is terminated?
我們已經使用
significantLocationChange
更改 ( https://developer.apple.com/documentation/corelocation/getting_the_user_s_location/using_the_significant_change_location_service )
用於更新位置,但有時會提供位置更新,因此不會一致地提供位置更新。
當應用處於終止階段(不在前台/不在后台)時,頻繁獲取更新位置的最佳方法是什么?
您必須為應用程序的位置更新啟用后台模式。 您可以通過選擇項目->功能->后台模式並啟用位置更新來執行此操作。
恕我直言,沒有辦法做到這一點。 如果該應用程序終止,您將不會獲得頻繁的更新,這是用戶選擇終止您的應用程序的選擇,Apple對此予以尊重。 iOS不會在后台收集位置數據,而是在再次啟動應用程序時將其處理到您的應用程序中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.