ios10

NSFetchRequest Core Data Swift 3 Backward compatibility

走远了吗. 提交于 2019-12-07 11:02:52
问题 I have converted my code in swift 3. I am using core data in my application. As you know, NSFetchRequest has been changed. In swift 2 it was: let request = NSFetchRequest(entityName: "UnsyncedTask") In swift 3: let request:NSFetchRequest<NSFetchRequestResult> = UnsyncedTask.fetchRequest() My question is, It only supports ios 10. How can I make it backward ios compatible? I want NSFetchRequest which supports ios 9, ios 10 with swift 3. 回答1: NSFetchRequest(entityName:) is still available in

AVAudioSession : microphone headphone as input and iphone speaker as output

两盒软妹~` 提交于 2019-12-07 09:59:15
问题 With iOS10 there are more possibilities to manage AUdioSession, but i couldn't manage to keep the headphone microphone as input while audio is going out through the iphone speaker. The 'overrideOutputAudioPort' method below also override the input audio port as the iphone microphone let session = AVAudioSession.sharedInstance() do { try session.setCategory(AVAudioSessionCategoryPlayAndRecord) try! session.overrideOutputAudioPort(.speaker) } catch { } Is there any solution to keep the

Can I submit Swift 2.2 app with Xcode 7.3 when iOS 10 is released?

被刻印的时光 ゝ 提交于 2019-12-07 08:12:21
问题 When iOS 10 be released, will I be able to submit to the app store app that runs with Swift 2.2 and was built with Xcode 7.3? Or is it mandatory to move to swift 2.3 or Swift 3 and build the app with Xcode 8? 回答1: Yes you can. Even macOS Sierra will support Xcode 7.3 (unlike Xcode 6 on El Capitan), so you can choose to build your applications in Swift 2.2 or Swift 3. For the App Store submission, the minimum Xcode version is 6.0. (October 2016) For more information you can check out this

Rendering a video with webGL in IOS 10 beta 7 (Safari) - shows weird purplish colors

狂风中的少年 提交于 2019-12-07 07:40:01
问题 I'm rendering a video in webGL, by passing a Video object as the source for texImage2D . This works great in all platforms (that supports webGL), however in Safari in IOS 10 beta 7, it is rendered with weird colors (in previous IOS versions it looks ok). For example, this is an image frame from it, that looks how it's supposed: And this is how it's rendered in IOS 10 (the weird version): Is this an IOS10 beta bug? Here is the render code (that happens for each frame): gl.clear(gl.COLOR_BUFFER

Visual Studio Cordova deploy to remote iOS 10 Device Failing

故事扮演 提交于 2019-12-07 07:03:14
问题 I had successfully set up remote deployment from Visual Studio on my Windows machine to iOS 9.x devices with Xcode 7.x on my mac by following this guide. https://taco.visualstudio.com/en-us/docs/ios-guide/ With iOS 10 you need to upgrade to Xcode 8 and do some tweaking to get your developer team identifier in the build config to get it to sign properly. Thanks to this guide I was able to get a successful compile. https://dpogue.ca/articles/cordova-xcode8.html However I'm still getting this

How to handle Push on App not running state?

随声附和 提交于 2019-12-07 05:25:36
问题 Is it possible to open the iOS App based on push notification content? I believe it's not possible. Is there any other way around? I believe we can go with the widget in iOS10, right? Please suggest some good solution? Thanks! 回答1: Whenever your payload has content-available:1 your app will get called in the backgroundstate as soon as it arrives and will call application(_:didReceiveRemoteNotification:fetchCompletionHandler:). It will only not get called if the user killed the app manually.

Swift 2 to 3 Migration for Swift Sequence Protocol

 ̄綄美尐妖づ 提交于 2019-12-07 05:19:29
问题 I'm attempting to convert the following code from this library (https://github.com/dankogai/swift-json) into Swift 3 Compatible code. I'm having a tough time figuring out how to convert the Sequence protocol used in Swift 2 with the correct version for Swift 3. I can't find any documentation on Swift 2 Sequence protocol changes as compared to 3. Here is the code that I currently have converted as much as possible to Swift 3 extension JSON : Sequence { public func generate()->AnyIterator<

Sprite Kit app crashes when run on real device and plugged into computer

走远了吗. 提交于 2019-12-07 05:09:31
问题 I just updated to iOs10 on my test phone and XCode 8. I ran the code migration and was running tests succeessfully on my simulated devices. However, once I started trying to test on my real device things stopped working smoothly. After running my Sprite Kit game for around 5 - 10 seconds it would crash and render the phone inoperable until I unplugged it from the computer. After I unplug it the game runs as normal and is still really smooth. This are the startup notifications printed to the

applicationWillResignActive called without reason on iOS 10 ( swift 3 )

纵饮孤独 提交于 2019-12-07 04:07:08
问题 When I launch my app on iOS 10, I can see that after a short delay, the Appdelegate function -> applicationWillResignActive() is called. There is no reason for that. The app is still active and in foreground state when it occurs and the app continues to run normally. Please see above the lifecycle of my app : --> Click on the app icon App launch application --> didFinishLaunchingWithOptions application --> applicationDidBecomeActive RootViewController --> viewDidAppear application -->

(iOS 10, Swift 3) Reading `userInfo` dictionary from a CloudKit notification: How do I cast `[AnyHashable : Any]` to `[String : NSObject]`?

痞子三分冷 提交于 2019-12-07 02:56:55
问题 Background I'm trying to load the userInfo dictionary from application:didReceiveRemoteNotification:userInfo:fetchCompletionHandler in my app delegate. I then need to cast userInfo from [AnyHashable:Any] to [String:NSObject] so I can use it in CloudKit's CKNotification:fromRemoteNotificationDictionary . Question When I do: let ui = userInfo as! [String : NSObject] I get the error: '[AnyHashable:Any]' is not convertible to '[String:NSObject]' Is there a better way to convert userInfo to the