草庐IT

call_command

全部标签

ios - 在 xcode 5 中隐藏 "*** First throw call stack"

在Xcode5中调试时,有没有办法隐藏调用堆栈并仅显示错误日志,或者手动打开和关闭它?我只想要这样的错误日志:TestProject[31643:70b]***Terminatingappduetouncaughtexception'NSGenericException',reason:'Couldnotfindanavigationcontrollerforsegue'SecondViewController'.PushseguescanonlybeusedwhenthesourcecontrollerismanagedbyaninstanceofUINavigationContro

ios - "The UIApplicationDelegate in the iPhone App never called reply() in -[UIApplicationDelegate application:handleWatchKitExtensionRequest:reply:]"

好的,我正在制作这个AppleWatch应用程序,在我的Watch应用程序中,我有一个按钮。当您触摸按钮时,它会执行以下操作:[WKInterfaceControlleropenParentApplication:[NSDictionarydictionary]reply:^(NSDictionary*replyInfo,NSError*error){if(error){NSLog(@"%@",error);}}];在我的AppDelegate文件中,我这样做:-(void)application:(UIApplication*)applicationhandleWatchKitExt

ios - GMSThreadException' 原因 : 'The API method must be called from the main thread'

我在使用googleAPI绘制折线时遇到此错误由于未捕获的异常GMSThreadException而终止应用程序-(void)drawRoute{dispatch_queue_tmyQueue=dispatch_queue_create("MyQueue",NULL);dispatch_async(myQueue,^{[selffetchPolylineWithOrigin:origindestination:destinationcompletionHandler:^(GMSPolyline*polyline){dispatch_async(dispatch_get_main_que

javascript - iOS 从 Javascript 调用 Objective-C : Some calls are ignored?

我已经使用UIWebView委托(delegate)shouldStartLoadWithRequest()方法在iOS上实现了似乎是从javascript到objective-c通信的唯一方法。起初似乎工作正常,但现在我注意到,如果我在短时间内多次从javascript调用objective-c,第二次调用通常会被忽略(该应用程序是钢琴键盘,每次按键触发对native代码的调用,当处理多个触摸时,native代码不会为每个手指都调用)。这是我响应javascript调用的objective-c代码。我知道这很愚蠢,但我只是想要一些暂时可用的东西。-(BOOL)webView:(UIW

ios - iPhone 应用程序 : get shell command output

我正在尝试为iPhone(或iPad,就此而言)构建一个应用程序,我想在其中运行一些shell命令。我希望它运行的iPhone未越狱。system()命令似乎可以执行shell命令,但输出和输入当然仍然是个问题。我了解到NSTask可以用于这些类型的事情并且它存在,但没有记录。(包括MacNSTask.h似乎工作完美)现在的问题是,当执行这段代码时:NSTask*task;task=[[NSTaskalloc]init];task.launchPath=@"/usr/bin/ls";task.arguments=[NSArrayarray];NSPipe*pipe=[NSPipepip

ios - performSegueWithIdentifier :method called from didSelectRowAtIIndexPath slow to show view

我有一个静态的UITableview并且正在尝试切换到模态视图。我不能直接从Storyboard中的单元格进行segue,因为有时我希望根据某些应用程序逻辑不调用segue。所以我将segue连接到TableViewController并在Storyboard中为其指定了一个标识符。然后在TableViewController中我调用了下面的方法。-(void)tableView:(UITableView*)tableViewdidSelectRowAtIndexPath:(NSIndexPath*)indexPath{//Performseguewhenfirstrowinfirst

ios - 应用程序 :openURL:sourceApplication:annotation: not called iOS 8

当我的应用程序关闭并通过从URL打开来启动应用程序时,我遇到了麻烦。这适用于iOS7,我可以在启动时执行我想要的操作,但不适用于iOS8。application:openURL:sourceApplication:annotation:是没有被正确调用的方法。我检查了设备日志,但看不到该方法被调用。有人知道怎么回事吗? 最佳答案 在application:didFinishLaunchingWithOptions:中,您可以提取打开应用程序的URL,[launchOptionsobjectForKey:UIApplicationLa

ios - didDisconnectPeripheral : not getting called

我有一个自定义对象BLEDevice,它对CBPeripheral对象有弱引用。我维护了一个字典,用于保存外围设备和我的自定义对象之间的关联:-(void)setDeviceForPeripheral:(CBPeripheral*)peripheral{//Newdevice:setsanew'BLEDevice'instanceBLEDevice*new=[[BLEDevicealloc]initWithPeripheral:peripheral];new.name=peripheral.name;new.peripheral.delegate=self;[associationss

iPhone : How to call other method from [_assetExport exportAsynchronouslyWithCompletionHandler: ^(void ) { }

我正在使用以下代码将.mp4和.caf组合成.mov。(注意:我知道如何播放视频所以不要为此提供代码)AVAssetExportSession*_assetExport=[[AVAssetExportSessionalloc]initWithAsset:mixCompositionpresetName:AVAssetExportPresetPassthrough];//AVAssetExportPresetPassthroughNSString*videoName=@"export.mov";NSString*exportPath=[documentstringByAppendingP

ios - xcode 5 ld : 11 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

在尝试构建我的项目时,我经常收到此错误提示ld:11duplicatesymbolsforarchitecturearmv7clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)我最近尝试在我的项目中实现GPUImage,这与它有什么关系吗?我也读过类似的问题,但没有一个有我的解决方案。 最佳答案 大胆猜测,您是否可能在任何地方导入了.m文件而不是.h? 关于ios-xcode5ld:11duplicatesymbolsforarchitecturearmv7clang:er