ios11

In IOS 11, DeviceMotion in background stopped working

依然范特西╮ 提交于 2019-11-30 13:33:06
My app reports and records location, altitude, rotation and accelerometer data (DeviceMotion) while in the background. This works fine on ios 10.3.3. On IOS 11, I no longer have access motion data while the device is locked. Altitude data and location data is still streaming to the console, though. Has something changed in IOS 11 that prevents me from accessing motion data or am I doing trying to access it in a way that Apple now blocks like OperationQueue.main Here is how I'm starting motion updates. If the phone is unlocked, all works fine. If I locking the phone, no more updates.: let

Xcode 9 UITextView links no longer clickable

我的未来我决定 提交于 2019-11-30 13:32:48
Prior to Xcode 9 and iOS 11 I had a UITextView within a UITableViewCell that contained multiple links. Each link worked as expected, however since upgrading to iOS 11 and Xcode 9, the links no longer work. The UITextView doesn't appear to recognise any touch interaction with func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool never firing. Has anyone else found this same problem after upgrading? Turns out there wasn't a problem after all. Changes in the way UITextView responds to touches in iOS11 means that

How to create a border for SCNNode to indicate its selection in iOS 11 ARKit-Scenekit?

廉价感情. 提交于 2019-11-30 13:26:37
How to draw a border to highlight a SCNNode and indicate to user that the node is selected? In my project user can place multiple virtual objects and user can select any object anytime. Upon selection i should show the user highlighted 3D object. Is there a way to directly achieve this or draw a border over SCNNode? You need to add a tap gesture recognizer to the sceneView . // add a tap gesture recognizer let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap(_:))) scnView.addGestureRecognizer(tapGesture) Then, handle the tap and highlight the node: @objc func

Technique World tracking performance is being affected by resource constraints

不羁岁月 提交于 2019-11-30 13:01:38
问题 While running an ARKit session with world tracking enabled, the Xcode console shows log messages about (I presume: reduced) tracking performance , even though the AR Session is in Normal tracking state, I am using the device in a well-lit office room with plenty of "features" to detect, and The device moves only subtly. TLDR: I want to understand what can be causing them, what impact they have, and how to prevent them, or (re)act on them when they do occur— NB. not simply hide the error.

WKWebView page height issue on iPhone X

Deadly 提交于 2019-11-30 12:58:51
问题 I find that if I use WKWebView with viewport-fit=cover and body :{height:100%} the height of html body still can not reach the bottom of iPhone X and is equal to the height of safeArea, However, the background-color can cover the fullscreen. https://ue.qzone.qq.com/touch/proj-qzone-app/test.html I load this page in a fullscreen WKWebView to reproduce the problem. 回答1: I was able to fix the issue with (ObjC / Swift): if (@available(iOS 11.0, *)) { webView.scrollView

iOS 11 - Is in app purchase testing using a sandbox user keeps asking to sign in for anyone else too? Forever loop?

我们两清 提交于 2019-11-30 11:47:02
问题 I am testing a non-consumable IAP on an iPhone 6s running iOS 11 GM. Whenever I tap my "Buy" button, it asks me to sign in. I tap "Sign in with existing apple ID" and enter my sandbox user details (which worked fine as of a few days ago on iOS 10). After entering, it just goes back to the same "Sign in" screen. I tried entering a few more times and it just goes back to the same screen again. Keeps looping forever. Is this down for anyone else? 回答1: The same thing happens for me, for three

How do I disable the full swipe on a tableview cell in iOS11

馋奶兔 提交于 2019-11-30 11:38:30
UITableViewDelegate.h // Swipe actions // These methods supersede -editActionsForRowAtIndexPath: if implemented // return nil to get the default swipe actions - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView leadingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos); - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos); However, I am returning nil in my

Swift Safe Area Layout Guide and Visual Format Language

我是研究僧i 提交于 2019-11-30 11:03:22
I want to use Apples visual format language to constrain a view to the new Safe Area Layout Guide in iOS 11. However, I get an exception: -[NSLayoutYAxisAnchor nsli_superitem]: unrecognized selector sent to instance 0x1c447ed40 //Make View Dictionary var views: [String: Any] = ["left": self.leftContainer] //Check swift version and add appropriate piece to the view dictionary if #available(iOS 11, *) { views["topGuide"] = self.view.safeAreaLayoutGuide.topAnchor }else{ views["topGuide"] = self.topLayoutGuide } //Make the constraint using visual format language let leftVertical =

How to tell Smart Invert in iOS 11 not to invert my app colors and detect if it is enabled?

南笙酒味 提交于 2019-11-30 10:29:54
问题 iOS 11 has a new feature called "Smart Invert Colors", and I want to take advantage of that in my app. I already have my own dark mode implemented in my app, so I'll do the "color inversion" process myself when Smart Invert is enabled. What I want to know is: How do I tell iOS 11 that the app has a dark interface and don't invert colours, similar to the iOS Clock app in iOS 10+? How do I detect which kind of Invert Colors, specifically "Smart Invert" or "Classic Invert", is enabled? I've

How to line break long large title in iOS 11?

﹥>﹥吖頭↗ 提交于 2019-11-30 09:56:37
I am trying to use the new large title system in iOS 11 using Swift. When the title gets too long (see image example), it adds ... instead of line breaking or shrinking the text size. How can I add a line break? Here is some of the code I'm using to set up the title: self.navigationController?.navigationBar.prefersLargeTitles = true self.navigationController?.navigationBar.largeTitleTextAttributes = [NSForegroundColorAttributeName: MyGlobalVariable.themeMainColor] self.navigationController?.navigationBar.largeTitleTextAttributes = [NSFontAttributeName: UIFont.systemFont(ofSize: 22)]