Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
752 views
in Technique[技术] by (71.8m points)

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

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

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

Here's the callstack:

0   CoreFoundation                      0x00000001063a89b5 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x0000000105e20deb objc_exception_throw + 48
2   CoreFoundation                      0x00000001063a881a +[NSException raise:format:arguments:] + 106
3   Foundation                          0x00000001036f8b72 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4   CoreLocation                        0x00000001031c7fe3 CLClientGetCapabilities + 8270
5   peach                               0x00000001020c0ee9 -[PeachesBatteryOptimizer initWithDelegate:] + 761
6   peach                               0x0000000102086d25 -[PeachAgent init] + 1141
7   peach                               0x000000010208682c __23+[PeachAgent instance]_block_invoke + 76
8   libdispatch.dylib                   0x00000001068604bb _dispatch_client_callout + 8
9   libdispatch.dylib                   0x000000010684bedc dispatch_once_f + 543
10  peach                               0x00000001020867bb +[PeachAgent instance] + 139
11  peach                               0x0000000102086f4d +[PeachAgent createInstanceWithAppKey:andInternal:useDevApi:] + 93
12  peach                               0x0000000101e2b710 -[ABCAppDelegate createPeachAgent] + 368
13  peach                               0x0000000101e28703 -[ABCAppDelegate application:didFinishLaunchingWithOptions:] + 243
...

Screenshot

Has anyone seen this on iOS 9 beta 5?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've managed to solve this by doing these two things:

  • added UIBackgroundModes 'location' to Info.plist
  • added NSLocationAlwaysUsageDescription to Info.plist

As of iOS 11, keys are named:

  • NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...