草庐IT

call_impl

全部标签

ios - RTCVideoCapturer 捕获器WithDeviceName :(NSString*) becomes very slow after subsequent calls

我正在构建一个基于webrtc的voip应用程序。我在每次调用之前调用以下代码:NSMutableArray*m=[[NSMutableArrayalloc]init];NSMutableArray*o=[[NSMutableArrayalloc]init];//[maddObject:[[RTCPairalloc]initWithKey:@"maxFrameRate"value:@"30"]];//[maddObject:[[RTCPairalloc]initWithKey:@"maxFrameRate"value:@"24"]];//[maddObject:[[RTCPairall

ios imagePickerController :didFinishPickingMediaWithInfo: not called after stopVideoCapture

我正在为视频录制创建自定义叠加View。我添加了一个按钮来开始/停止录制:[takePhotoButaddTarget:imagePickerControlleraction:@selector(toogleRecord:)forControlEvents:UIControlEventTouchUpInside];在我的自定义UIImagePickerController中调用[superstartVideoCapture];或[superstopVideoCapture];。我也设置了委托(delegate)CustomPickerController*imagePickerCont

objective-c - iOS 应用内购买 : only one payment added to the SKPaymentQueue but a SKPaymentTransactionObserver method is getting called multiple times

我正在使用测试用户(在沙箱中)测试IAP,我有一个实现SKPaymentTransactionObserver协议(protocol)的类,当用户选择某个TableView单元格时,我启动支付:SKPayment*payment=[SKPaymentpaymentWithProductIdentifier:productIdentifier];[[SKPaymentQueuedefaultQueue]addPayment:payment];这只完成一次,我已经检查过:代码被调用一次。问题是“-(void)paymentQueue:(SKPaymentQueue*)queueupdate

ios - CAayer - (void)drawInContext :(CGContextRef)ctx is never called

我尝试通过子类化使用CALayer进行绘制。我知道有一些关于我已经看过其中大部分的帖子,并遵循了给出的解决方案但没有成功。比如设置帧大小。这是代码。提前需要一些帮助////NewView.m//layerPractise#import"NewView.h"#import"QuartzCore/QuartzCore.h"#import"NewLayer.h"#import"NewLayer2.h"@interfaceNewView(){//NSMutableArray*_normalizedValues;}@end@implementationNewView@synthesize_con

iphone - map View :viewForAnnotation: not called when delegate set in code

我有一个用于我的MKAnnotations的自定义类,我想覆盖默认的mapView:viewForAnnotatation方法,以便我可以在标注中添加额外的信息。当我在代码中设置我的委托(delegate)时(按照下面的代码),注释被放置在map上并且可以选择,但我的mapView:viewForAnnoation从未被调用。-(MKAnnotationView*)mapView:(MKMapView*)mapViewviewForAnnotation:(id)annotation{NSLog(@"viewForAnnotation:called");MKAnnotationView*

iOS 8 : AudioServicesPlaySystemSound is not playing Sound when AudioServicesDisposeSystemSoundID is called afterwards

当调用AudioServicesPlaySystemSound时,它会很好地播放之前创建的SystemSound。但是当我之后直接调用AudioServicesDisposeSystemSoundID时,没有播放声音。似乎声音资源在播放之前就被处理掉了。但是在thisStackoverflow-Question人们说,有必要处理System-Sound以避免内存泄漏。这两种方法的正确方法是怎样的?我应该在几秒钟后用计时器调用Dispose-Method吗?或者创建一个单例,在第一次调用Play-Method时创建一次声音资源,并在单例的dealloc中处理资源?-(void)playS

ios - NSURLSession didCompleteWithError :gets called with NSError is nil

场景是在上传过程中多次将app调到后台和前台,调用didCompleteWithError:方法调到前台时error参数为null。概率是1/3。由于错误参数没有提供任何信息,我如何找出问题所在。 最佳答案 问题是didCompleteWithError报告仅客户端错误,否则为零。iOS文档说:“服务器错误不通过错误参数报告。您的委托(delegate)通过错误参数收到的唯一错误是客户端错误,例如无法解析主机名或连接到主机。"这是link到文档。如果你想检查session的错误你必须实现session协议(protocol)委托(d

iphone - 如何弄清楚模拟器中的 `call stack` 含义?

当我尝试使用以下代码将nil对象放入NSDictionary时出现异常:NSString*object=[selfsomeMethod];//themethodreturnnilNSDictionary*dict=@{@"key":object};这是我知道的一个简单的错误,我只是用它来举例。应用程序在模拟器中崩溃,控制台中的错误消息如下:2012-11-1314:40:00.528Ape[44456:11303]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'***-[__NSPl

ios - 应用程序 :didReceiveLocalNotification: not called

我是iOS和Cocoa编程的新手,今天我想构建一个小型iOS应用程序来测试本地通知。通知工作正常,一切都像我预期的那样工作。我唯一的问题是,方法application:didReceivedLocalNotification不想被调用:D实现方式如下:UI有一个slider,用户可以在其中定义一个时间值,以秒为单位。在slider上设置值后,应在xx秒内触发LocalNotification。当我按下主页按钮时,通知会准时出现。但是当应用程序在前台时,通知不会出现。我已经实现了方法application:didReceivedLocalNotification并通过在方法的开头放置一个

ios - iBeacon : didRangeBeacons not being called

我正在尝试为我的应用添加iBeacon支持。我没有任何物理iBeacon,所以我在另一部iPhone上使用RadiusNetworks的Locate应用程序。使用该应用程序,我可以看到其他手机的信标。但是,在我自己的应用程序中,didRangeBeacons永远不会被调用。我确保将CoreLocation和CoreBluetooth框架添加到我的应用程序中。有什么想法吗?这是我的代码:-(instancetype)init{self=[superinit];if(self){self.locationManager=[[CLLocationManageralloc]init];self