NSInternalInconsistencyException:'无效参数不满足:!stayUp || CLClientIsBackgroundable(内部 - > fClient)” [英] NSInternalInconsistencyException: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'
本文介绍了NSInternalInconsistencyException:'无效参数不满足:!stayUp || CLClientIsBackgroundable(内部 - > fClient)”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试让我的应用程序在Xcode 7测试版中工作,但我遇到了这个例外:
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)'
这是callstack:
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
...
有没有人在iOS 9 beta 5上看过这个?
Has anyone seen this on iOS 9 beta 5?
推荐答案
我设法解决了这个问题:
I've managed to solve this by doing these two things:
- 已添加
UIBackgroundModes
'location'到Info.plist - 将
NSLocationAlwaysUsageDescription
添加到Info.plist
- added
UIBackgroundModes
'location' to Info.plist - added
NSLocationAlwaysUsageDescription
to Info.plist
从iOS 11开始,密钥被命名为:
As of iOS 11, keys are named:
-
NSLocationAlwaysAndWhenInUseUsageDescription
和NSLocationWhenInUseUsageDescription
NSLocationAlwaysAndWhenInUseUsageDescription
andNSLocationWhenInUseUsageDescription
这篇关于NSInternalInconsistencyException:'无效参数不满足:!stayUp || CLClientIsBackgroundable(内部 - > fClient)”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文