NSInternalInconsistencyException: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'

前端 未结 9 867
终归单人心
终归单人心 2020-12-15 02:42

I\'m trying to get my app working in Xcode 7 beta but I\'m hitting this exception:

NSInternalInconsistencyException: \'Invalid parameter not satisfying: !sta         


        
9条回答
  •  孤城傲影
    2020-12-15 03:33

    I faced same issue on Hybrid app.

    I have enabled background mode ON.

    Apple has rejected my app. Saying there is no features for background mode.

    So I made following changes on "BackgroundGeolocationDelegate.m"

    1.locationManager.allowsBackgroundLocationUpdates = NO;

    1.  

      if (authStatus == kCLAuthorizationStatusNotDetermined) {
          if ([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {  //iOS 8.0+
              NSLog(@"BackgroundGeolocationDelegate requestAlwaysAuthorization");
              [locationManager requestWhenInUseAuthorization];
          }
      }
      

    There was no more crash. Note *: Fix is only for hybrid app

提交回复
热议问题