ios11

iOS 11 crashing with bundleProxy != nil error on using UNUserNotificationCenter

心不动则不痛 提交于 2019-12-03 12:38:55
The following line of code is where our app has suddenly started to crash on iOS 11 / 11.0.1 / 11.0.2 / 11.1.1 / 11.2.2 for some users: UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; We've got this in didFinishLaunchingWithOptions . The crash report says: Fatal Exception: NSInternalInconsistencyException Invalid parameter not satisfying: bundleProxy != nil Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x1869b3d38 __exceptionPreprocess 1 libobjc.A.dylib 0x185ec8528 objc_exception_throw 2 CoreFoundation 0x1869b3c0c +[NSException

iOS: Detect if the device is iPhone X family (frameless)

六月ゝ 毕业季﹏ 提交于 2019-12-03 12:06:34
In my app there is some logic for frameless devices (iPhoneX, Xs Xs max, Xr). Currently it works base on the model of the devices, so, I detect the model by DeviceKit framework. But I want to extend this logic to future frameless devices. Probably in one year we will have some extra frameless devices. So, how can I detect if device is frameless or not? It should cover all current frameless devices and future one. We can not rely on faceID, safeAreaInset, screen height or size. So, then what? You could "fitler" for the top notch, something like: var hasTopNotch: Bool { if #available(iOS 11.0,

Search bar overlaps with status bar on iOS 11

℡╲_俬逩灬. 提交于 2019-12-03 11:15:49
I am using a UISearchController and a UISearchResultsController to implement search functionality. MySearchResultsController implements UISearchResultsUpdating and UISearchBarDelegate: override open func viewDidLoad() { super.viewDidLoad() self.edgesForExtendedLayout = []; self.automaticallyAdjustsScrollViewInsets = false; } I display the searchbar in the tableHeader like this in MyTableViewController: - (void)viewDidLoad { [super viewDidLoad]; self.searchController = [[UISearchController alloc] initWithSearchResultsController:self.searchResultsController]; self.searchController

Adjust position of bar button item when using large titles with iOS 11

匆匆过客 提交于 2019-12-03 11:14:29
问题 I am using the large title navbar with iOS 11, but when I add a bar button item it looks weird positioned in the same location as the original title navbar. I would like to move the bar button item down when the title is large, and move it back into its original position when the navbar is no longer large. What would be the best way of doing this? This is an image showing the weird position of the bar button item I can get the navbar height dynamically using the viewWillLayoutSubviews(), but

iOS 11. What the KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED is mean?

元气小坏坏 提交于 2019-12-03 11:09:08
问题 In the new iOS11, I get some strange exceptions. I do not understand why this is happening. In the previous iOS, there was no such exception. Log attached: Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x180a5e7e8 object_isClass + 16 1 Foundation 0x181f013e8 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 68 2 Foundation 0x181eff8ec NSKeyValueWillChangeWithPerThreadPendingNotifications + 300 3 QuartzCore 0x18555a6dc CAAnimation_setter

How to calculate iOS 11 size in different orientation?

我是研究僧i 提交于 2019-12-03 10:39:49
I calculate itemSize dependent on safe area for UICollectionView with horizontal scroll and custom layout. But for iPhone X safe area has different size for different orientation. My question is how should I calculate safe area size for landscape orientation in viewWillTransition function? Or how is it possible to do without this calculation? EDIT To get safe area size without creating any additional views, use this: view.safeAreaLayoutGuide.layoutFrame.size If you want to use viewWillTransition method you can use this: override func viewWillTransition(to size: CGSize, with coordinator:

iOS 11 URL Scheme for specific Settings section stopped working

≡放荡痞女 提交于 2019-12-03 09:08:43
问题 My app uses a URL scheme to take users directly to Settings/General/About section, the following URL was working fine in 10.3.x. "App-Prefs:root=General&path=About" However, this URL scheme no longer works in iOS 11 GM build. It only launches the Settings app, but doesn't take user any further. Does anybody know if this is expected in iOS 11 official release? Thanks in advance. 回答1: let url = NSURL(string: "app-settings:root=Privacy&path=LOCATION")! as URL UIApplication.shared.open(url,

ios11 webview html canvas content got cleared by page scroll

孤街浪徒 提交于 2019-12-03 08:28:55
The html page I made by using canvas becomes different in ios11! When first show in the webview, the page looks fine, but, when it scrolls down and the canvas in it becomes invisible in the viewport, the content in the canvas disappears and never comes back when the page scroll back to top. Does somebody know how to fix this problem or I should just wait until apple fixes it later? Same problem for me. I noticed that if I toggle in Safari Web Inspector any properties of the canvas, it is rendered again. Another similar issue is reported on SO ( Cordova Webview canvas redering bug on recent iOS

Firebase FCM push notifications stopped working iOS 11.1.1

梦想与她 提交于 2019-12-03 08:00:50
问题 I am using Firebase FCM to send push notifications from an iOS device. The push notifications did work, until yesterday. When I now send a push notification, everything shows successful, but nothing is received on the device. If I send directly via a curl request, this is the response: {"multicast_id":7815294000653973158,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1510474219556035%ca9ff0f8ca9ff0f8"}]} If I send from the Notification dashboard on the firebase console,

ARKit vs SceneKit coordinates

一曲冷凌霜 提交于 2019-12-03 07:25:56
I'm trying to understand the difference between the different element introduced in ArKit and their maybe equivalents in SceneKit: SCNNode.simdTransform vs SCNNode.transform . In ARKit, it seems that people use SCNNode.simdTransform instead of SCNNode.transform . How do they differ? simdTransform seems to use column major order, while transform (SCNMatrix4) is row major. How do I convert one to the other? Just transpose? I've the impression that the tracking doesn't work as well if I use transform instead of simdTransform . Is that expected or just an impression? If I set one property, what