如何从iPhone以编程方式获取iPhone应用程序崩溃日志文件

有没有办法通过编程访问iphone崩溃日志文件。 我试图编写一个崩溃报告function,当您在崩溃后启动应用程序时,它会提供将崩溃报告发送到服务器。 我无法find如何获取应用程序内的崩溃日志。

引发应用程序传输安全性的exception?

在iOS 9下,我在这里使用了接受的答案: 传输安全性已经阻止了明文HTTP 我将这些条目添加到NSAppTransportSecurity下的Info.plist文件中。 我的应用似乎正常运行,以及执行所有我已经占了的请求。 我仍然收到错误: 应用传输安全已阻止明文HTTP(http://)资源加载,因为它是不安全的。 临时例外可以通过您的应用程序的Info.plist文件进行configuration。 我的问题是,我无法find我的应用程序代码库中这是从哪里来的,我不想让所有域(在我接受的答案中引用的懒惰选项)。 有没有办法提出一个例外,以便我可以find警告的来源?

通过iOS获取Facebook图片的问题

我试图通过Facebook连接在iOS上获取事件和个人资料图片,我已经提出了例如请求: [facebook requestWithGraphPath:@"me/picture" andDelegate:self]; 和响应处理方法: (void)request:(FBRequest *)request didLoad:(id)result { NSString *url = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; imageView.image = [UIImage imageWithData:data]; } 它不会工作,结果variablestypes是NSConcreteMutableData和URLvariables值为空。 请帮助:)谢谢。

iOS应用内购买还原会返回许多交易

当我恢复我以前的购买。 Storekit正在调用具有大量以前事务的updateTransations 。 不知道为什么它像100,200,245,360,650这样的大量返回似乎随机在每个恢复。 这是发生在沙箱吗? 如果不是,select该项目的标准应该是什么。 我有很多具有相同产品ID的项目?

更改正在运行的animation的持续时间(速度)

我正在做一个无限期的旋转animation,当我第一次启动的时候,这个animation效果非常好。 我想实现的是能够在运行时改变旋转速度。 我在animationView中有这个function: -(void)startBlobAnimation:(float)deltaT { [UIView beginAnimations:@"Spinning" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:deltaT]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationRepeatCount:FLT_MAX]; CGAffineTransform rotation = CGAffineTransformMakeRotation(-symmetryAngle); blobView.transform = rotation; // Commit the changes and perform the animation. [UIView commitAnimations]; } 在animation首次启动后用不同的deltaT值调用没有任何影响。 如果我添加[wheelView.layer removeAllAnimations]; 在函数的开始,然后它成功地停止animation,但不重新启动它。 我也尝试使用block命令来启动animation,结果相同。 在这一点上,我完全感到困惑。 有人可以解释问题是什么吗? 谢谢!

在objective-c上下文中,“在非成员函数中使用'this'无效?

使用Xcode。 在这个代码中(func是在接口中声明的),告诉subj错误,站在string上'self'。 + (void) run: (Action) action after: (int) seconds { [self run:action after:seconds repeat:NO]; } 什么…?

iOS 6中的“请勿打扰”function如何实现?

我想在iOS 6中实现“请勿打扰”function。 第一个问题:是否有任何框架或api苹果暴露通过代码控制他们? 大量的谷歌search后,我发现应用程序商店“呼叫幸福”,提供此function,并完全控制通话,短信和彩信。 有人可以解释这个应用程序的工作原理 或任何其他的工作在iOS学习和实现这个function? 提前致谢…

UITextView和单元格根据textview的内容dynamic更新高度?

我一直在自定义单元格内的UITextView问题。 除了我的问题,textView完美的工作。 我有UITextViewDelegate方法设置,所以当发生什么事情的TextView,我有这些方法连接。 我想知道如何让我的自定义单元格dynamic增加它的高度,因为用户键入。 一旦用户点击了文本视图的行的末尾,也让textview自动添加另一行。 我在网上search了一段时间,这个问题的大部分例子都是客观的。 没有太多的快速代码。 我将不胜感激任何帮助。 我有我的单元格连接在桌面视图文件中。 func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell: cellCustom = the_TableView.dequeueReusableCellWithIdentifier("cell") as! cellCustom return cell } 在自定义单元格文件中,我设置了代表… func textViewDidChange(textView: UITextView) { } func textView(textView: UITextView, shouldChangeTextInRange range: NSRange, replacementText text: String) -> Bool { return true } 我曾尝试过一些… self.textview.sizeToFit() self.the_TableView.rowHeight = UITableViewAutomaticDimension self.the_TableView.estimatedRowHeight […]

CGBitmapContextCreate:不受支持的参数组合。 如何通过kCGImageAlphaNoneSkipFirst

我最初在Obj-C编写这个应用程序( GitHub ),但需要将其转换为Swift。 在转换时,我一直无法获取创build的位图的上下文。 错误信息: Whiteboard[2833] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 24 bits/pixel; 3-component color space; kCGImageAlphaNone; 1500 bytes/row. 本来我有这个: self.cacheContext = CGBitmapContextCreate (self.cacheBitmap, size.width, size.height, 8, bitmapBytesPerRow, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst); 现在我有: self.cacheContext = CGBitmapContextCreate(self.cacheBitmap!, UInt(size.width), UInt(size.height), 8, bitmapBytesPerRow, CGColorSpaceCreateDeviceRGB(), CGBitmapInfo.ByteOrder32Little); 我相信这个问题与CGBitmapInfo.ByteOrder32Little ,但我不知道要传递什么。 有没有办法将kCGImageAlphaNoneSkipFirst作为CGBitmapInfo ? 完整来源: // // WhiteBoard.swift // Whiteboard // import […]

AVAssetWriter如何创build没有压缩的movvideo?

我从一系列图像创buildvideo。 我的工作的目的是创build一个没有压缩的.movvideo。 我已经在开发库中看到它存在一个关键“AVVideoCompressionPropertiesKey”,但我不知道如何用这个键指定没有压缩。 请问你能帮帮我吗? 这是我的示例代码: NSDictionary *videoCleanApertureSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:320], AVVideoCleanApertureWidthKey, [NSNumber numberWithInt:480], AVVideoCleanApertureHeightKey, [NSNumber numberWithInt:10], AVVideoCleanApertureHorizontalOffsetKey, [NSNumber numberWithInt:10], AVVideoCleanApertureVerticalOffsetKey, nil]; NSDictionary *codecSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:960000], AVVideoAverageBitRateKey, [NSNumber numberWithInt:1],AVVideoMaxKeyFrameIntervalKey, videoCleanApertureSettings, AVVideoCleanApertureKey, nil]; NSDictionary *videoOutputSettings = [NSDictionary dictionaryWithObjectsAndKeys:AVVideoCodecH264, AVVideoCodecKey,codecSettings,AVVideoCompressionPropertiesKey, [NSNumber numberWithInt:size.width], AVVideoWidthKey, [NSNumber numberWithInt:size.height], AVVideoHeightKey, nil]; self.videoWriterInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoOutputSettings];