草庐IT

NSInternalInconsistencyException

全部标签

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

我试图让我的应用程序在Xcode7beta中运行,但我遇到了这个异常:NSInternalInconsistencyException:'Invalidparameternotsatisfying:!stayUp||CLClientIsBackgroundable(internal->fClient)'这是调用堆栈:0CoreFoundation0x00000001063a89b5__exceptionPreprocess+1651libobjc.A.dylib0x0000000105e20debobjc_exception_throw+482CoreFoundation0x00000

swift - 是否有可能在 Swift 中捕获 NSInternalInconsistencyException?

是否有可能在Swift中捕获NSInternalInconsistencyException?如果是,那该怎么做? 最佳答案 可以用https://github.com/williamFalcon/SwiftTryCatch来完成.首先将其添加到您的Podfile中:use_frameworks!pod'SwiftTryCatch'然后在你的代码中importSwiftTryCatch然后你就可以像这样捕获Objective-C异常SwiftTryCatch.try({//tryblock},catch:{(error)in//ca

ios - 使用 Xcode 7 运行 UITesting 时出现“NSInternalInconsistencyException”

好的,到目前为止,我还无法在任何测试版中运行此测试。我遇到的一些问题是here和here现在,我觉得我错过了什么。这是我到目前为止的进步在创建新项目时启用“UI测试”选项。这,其实是给我增加了一个目标。所以我应该可以走了——至少我是这么想的。UI测试下的swift文件已经导入了“XCTest”,并且是“XCTestCase”的子类。setup()启动应用程序XCUIApplication().launch()然后我添加了以下内容(通过点击“录制”按钮)然后,我运行了这个测试。整个事情甚至在调用测试之前就失败了,就在使用以下命令在setup()中启动应用程序之后***Assertionf

objective-c - NSInternalInconsistencyException',原因 : 'attempt to insert row 0 into section 0, but there are only 0 rows in section 0 after the update'

我正在使用UITableViewController并在更新tableView时收到此错误。以下是我的代码:当我执行点击事件时会发生这种情况:[timeZoneNamesinsertObject:@"HELLO"atIndex:0];[self.tableViewbeginUpdates];NSArray*insertIndexPaths=[NSArrayarrayWithObject:[NSIndexPathindexPathForRow:0inSection:0]];[self.tableViewinsertRowsAtIndexPaths:insertIndexPathswith

objective-c - NSInternalInconsistencyException',原因 : 'attempt to insert row 0 into section 0, but there are only 0 rows in section 0 after the update'

我正在使用UITableViewController并在更新tableView时收到此错误。以下是我的代码:当我执行点击事件时会发生这种情况:[timeZoneNamesinsertObject:@"HELLO"atIndex:0];[self.tableViewbeginUpdates];NSArray*insertIndexPaths=[NSArrayarrayWithObject:[NSIndexPathindexPathForRow:0inSection:0]];[self.tableViewinsertRowsAtIndexPaths:insertIndexPathswith