天道酬勤,学无止境

ios9

Unable to install iPhone app from diawi after iOS 9 upgrade?

I have upgraded my iPhone OS to iOS 9.0. After that I am not able to install the app via IPA file from diawi. I am able to install it from iTunes. Is there any solution or alternative to that other than iTunes? P.S. iPhone Configuration Utility is also crashing on my Mac.

2022-01-16 18:56:18    分类:问答    ios   iphone   ios9   itunes   diawi

ios9 Safari 计算错误总和(ios9 Safari miscalculating sum)

问题 我有一些代码可以计算循环中哈希中的键/值之和。 与其他任何地方相比,它似乎在 ios9 Safari 上以不同的方式计算总和。 虽然我可以找到一种方法来修复这个单独的用例,但我们在整个大型代码库中都使用这种类型的语法,所以我正在寻找一些理解 为什么在 ios9 中会发生这种情况如果有一种方法可以全局修复它,它适用于所有可能有 Vue __ob__对象的对象。 在此处尝试代码:https://liveweave.com/kKo88G。 我也把它贴在下面: // Define a hash var totalItems, sum, type, value totalItems = {} totalItems['0'] = 3 // This definition of __ob__ is done dynamically by Vue, // but I include it here by way of example of what breaks in ios9 totalItems.__ob__ = new Object() Object.defineProperty(totalItems, '__ob__', { enumerable: false, writable: true, configurable: true }); // Loop through the

2022-01-16 16:02:15    分类:技术分享    javascript   vue.js   ios9   ecmascript-5

ios9 Safari miscalculating sum

I have some code that calculates the sum of key/values in a hash in a loop. It appears to be calculating the sum in a different manner on ios9 Safari compared with anywhere else. Although I can find a way to fix this individual use case, we use this type of syntax throughout our large code base, so I am looking for some understanding of why this is happening in ios9 if there is a way to globally fix it that would be applicable to all objects that might have a Vue __ob__ object on them. Try the code out here: https://liveweave.com/kKo88G. I also pasted it below: // Define a hash var totalItems

2022-01-16 12:12:00    分类:问答    javascript   vue.js   ios9   ecmascript-5

iOS 9 / Xcode 7:SKSpriteNode spriteNodeWithImageNamed 在某些设备上不起作用(iOS 9 / Xcode 7: SKSpriteNode spriteNodeWithImageNamed not working on some devices)

问题 我在从 .xcassets 图像集中为 SKSpriteNode 加载图像时遇到问题。 虽然它在带有[SKSpriteNode spriteNodeWithImageNamde:imageName]的 iOS 8.x 上运行良好,但它不适用于 iOS 9 上的某些设备。例如,它适用于 iPhone 6/6 Plus 和 iPad Air,但不适用于 iPod Touch 5G。 适用于所有运行 iOS 8.x 的设备,但不适用于运行 iOS 9.x(Xcode 7、Xcode 7.1 Beta 3)的所有设备(例如 iPod Touch 5g): SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@"MenuBackgroundImage"]; background.anchorPoint = CGPointMake(0, 0); background.zPosition = 100; [self addChild:background]; 有趣的是,如果我像这样加载图像,它可以在 iOS 9 上运行: SKTexture *imageTexture = [SKTexture textureWithImage:[UIImage imageNamed:@"MenuBackgroundImage"]

2022-01-16 07:16:28    分类:技术分享    ios   objective-c   xcode   sprite-kit   ios9

iOS 9 / Xcode 7: SKSpriteNode spriteNodeWithImageNamed not working on some devices

I am having problems to load a image from a .xcassets imageset for a SKSpriteNode. While it worked fine on iOS 8.x with [SKSpriteNode spriteNodeWithImageNamde:imageName] it doesn't work on some devices on iOS 9. For example it works on iPhone 6/6 Plus and iPad Air but not on the iPod Touch 5G. Works on all devices with iOS 8.x but not on all devices (for example iPod Touch 5g) on iOS 9.x (Xcode 7, Xcode 7.1 Beta 3): SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@"MenuBackgroundImage"]; background.anchorPoint = CGPointMake(0, 0); background.zPosition = 100; [self addChild

2022-01-16 03:42:39    分类:问答    ios   objective-c   xcode   sprite-kit   ios9

电话不工作后恢复 AVAudioPlayer(Resume AVAudioPlayer after phone call not working)

问题 SO上已经有一些看似相似的问题,但是经过数小时的搜索和试验我的代码,我一直无法找到明确的答案。 我能找到的最接近的是这个答案,它暗示了 4 年前的一个“已知错误”,但没有详细说明如何解决它。 我有一个 audioPlayer 类,它使用 AVAudioPlayer 播放音频文件并监听AVAudioSessionDelegate方法beginInterruption和endInterruption 。 我知道endInterruption不能保证,所以我在beginInterruption中存储一个布尔值并在applicationDidBecomeActive中处理重新启动音频播放。 如果电话接到电话并且用户拒绝它或让它转到语音信箱,这一切都可以正常工作。 一旦我的应用程序恢复到活动状态,音频播放就会恢复。 这是我遇到奇怪行为的地方:如果用户接听电话,一旦他们挂断,一切似乎都按预期工作,但耳机或扬声器都没有声音。 我可以通过每秒打印它的音量和 currentTime 来验证音频是否在技术上播放,但声音没有发出。 如果我等待 20 到 40 秒,音频会突然插入并发出声音,就好像它一直在后台无声播放一样。 经过更多调试后,我注意到AVAudioSession.sharedInstance().secondaryAudioShouldBeSilencedHint在这 20-40

2022-01-15 20:56:50    分类:技术分享    ios   iphone   swift   ios9   avaudioplayer

Resume AVAudioPlayer after phone call not working

There are some seemingly similar questions already on SO, but after hours of searching and experimenting with my code, I have been unable to find a clear answer. The closest thing I could find was this answer which alludes to a "known bug" 4 years ago, but does not elaborate on how to address it. I have an audioPlayer class that is playing an audio file with AVAudioPlayer and listening for the AVAudioSessionDelegate methods beginInterruption and endInterruption. I know that endInterruption is not guaranteed so I store a boolean in beginInterruption and handle restarting the audio playback in

2022-01-15 18:34:15    分类:问答    ios   iphone   swift   ios9   avaudioplayer

UITableView 背景颜色 iOS 9(UITableView background color iOS 9)

问题 我有一个 UITableView,我想将其背景颜色设置为透明。 界面生成器中表格视图和所有子视图的背景颜色设置为透明。 它适用于 iOS 8 和 7。但是,不适用于 iOS 9。知道吗? cellForRowAtIndexPath 方法: [cell setSelectedBackgroundView:[[UIView alloc] init]]; [cell.selectedBackgroundView setBackgroundColor:[UIColor clearColor]]; [cell setBackgroundColor:[UIColor clearColor]]; [cell.contentView setBackgroundColor:[UIColor clearColor]]; [cell setBackgroundView:[[UIView alloc] init]]; [cell.backgroundView setBackgroundColor:[UIColor clearColor]]; 回答1 目标-c: [self.yourTableView setBackgroundColor:[UIColor clearColor]]; 迅速: self.yourTableView.backgroundColor = .clear XCode 7.0

2022-01-15 09:06:18    分类:技术分享    ios   objective-c   xcode   uitableview   ios9

UITableView background color iOS 9

I have a UITableView that I want to set its background color to transparent. Background color for the table view and all subviews at interface builder is set to transparent. It works fine for iOS 8 & 7. but, not iOS 9. any idea? cellForRowAtIndexPath method: [cell setSelectedBackgroundView:[[UIView alloc] init]]; [cell.selectedBackgroundView setBackgroundColor:[UIColor clearColor]]; [cell setBackgroundColor:[UIColor clearColor]]; [cell.contentView setBackgroundColor:[UIColor clearColor]]; [cell setBackgroundView:[[UIView alloc] init]]; [cell.backgroundView setBackgroundColor:[UIColor

2022-01-15 06:38:23    分类:问答    ios   objective-c   xcode   uitableview   ios9

如何在点击推送通知时打开特定帖子(How to open particular post on the click on push notification)

问题 在我的应用程序中,我实现了推送通知。 当我的应用程序处于运行状态并且如果推送通知到来时,我将使用此代码处理它。 func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { print(userInfo) myid = (userInfo["id"] as? String)! print(myid) if let notification = userInfo["aps"] as? NSDictionary, let alert = notification["alert"] as? String { var alertCtrl = UIAlertController(title: "Notification", message: alert as String, preferredStyle: UIAlertControllerStyle.Alert) alertCtrl.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) // Find the presented VC... var

2022-01-14 09:41:51    分类:技术分享    ios   swift   push-notification   swift2   ios9