JakeLin / SwiftLanguageWeather

Swift Language Weather is an iOS weather app developed in Swift 4.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

requestWhenInUseAuthorization issue

woyeyaowyy opened this issue · comments

When stopped at the interface asking for WhenInUseAuthorization long enough,
the app will not work until relaunch.
I think the problem is caused by this func in LocationService.swift:

func requestLocation() {
    locationManager.requestWhenInUseAuthorization()
    locationManager.requestLocation()
  }

@woyeyaowyy did you follow the step 4 in https://github.com/JakeLin/SwiftLanguageWeather#how-to-build? you need a key to run the app. Please let me know if you still have a problem, thanks.

Yes. The problem is when the app are asking for when-in-use-authorization, user stopped for a while and accept
, app will not work until relaunch.