ios12

iOS 12 web push notifications

 ̄綄美尐妖づ 提交于 2019-11-29 05:24:12
问题 Does the new iOS 12 safari support web push notification with service worker? In the last version of iOS there was service worker but there wasn't the pushManager object. 回答1: iOS 12 and 13 still doesn't support these features: Web Push Notification Background Sync Page Lifecycle Service Workers on WebViews Universal Links / Link Capturing I think iOS doesn't want to support these in PWA because these features have a bigger chance to be unnecessary exploited(spam, etc). And also maybe they

SystemConfiguration.CaptiveNetwork doesn't work on iOS 12

删除回忆录丶 提交于 2019-11-29 02:58:28
问题 I have a function that detects the current SSID from the user. Unfortunately this doesn't work anymore with iOS 12. This means it just jumps over the if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? { part. Maybe it's just a bug or it's deprecated. I've found nothing on Apple Docs. On older iOS 11, 10, and 9 devices, it works well. Here's my Code: func getWiFiSsid() -> String? { if let interfaces = CNCopySupportedInterfaces() as NSArray? { for interface

Is SwiftUI backwards-compatible with iOS 12.x and older?

喜夏-厌秋 提交于 2019-11-28 20:01:31
If I have an app made with swiftUI, will it work for iOS below iOS 13? I just checked it out in Xcode 11 and can confirm it won't be backwards-compatible, as can be seen in SwiftUI's View implementation: /// A piece of user interface. /// /// You create custom views by declaring types that conform to the `View` /// protocol. Implement the required `body` property to provide the content /// and behavior for your custom view. @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) public protocol View : _View { /// The type of view representing the body of this view. /// /// When you create a

UICollectionViewFlowLayout estimatedItemSize does not work properly with iOS12 though it works fine with iOS 11.*

好久不见. 提交于 2019-11-28 19:11:59
For UICollectionView's dynamic height cells we use, if let layout = self.collectionViewLayout as? UICollectionViewFlowLayout { layout.estimatedItemSize = UICollectionViewFlowLayoutAutomaticSize } with the proper constraint of height and width, it works fine with iOS 11.* versions but it breaks and does not make the cells dynamic for iOS 12.0 ale84 In my case, I solved this by explicitly adding the following constraints to the cell's contentView. class Cell: UICollectionViewCell { // ... override func awakeFromNib() { super.awakeFromNib() // Addresses a separate issue and prevent auto layout

iOS 12 specific problem: Core Data External Storage Binary Data corruption

扶醉桌前 提交于 2019-11-28 16:43:15
I've spent the better part of a workday trying to solve this. Background I have a simple core data model, with books and reading sessions. The books have covers (images) that are stored as binary data with "Allows External Storage". On iOS 11.4 and below, everything works fine all the time. When I save a new session everything gets updated properly. Problem Since iOS 12, when I create a new reading session and link it to the book, about every second time, core data generates a SQL statement that also updates the book cover field, sometimes resulting in a bad reference (to file on disk) which

How to detect vertical planes in ARKit?

折月煮酒 提交于 2019-11-28 16:11:20
How is it possible to implement a vertical plane detection (i.e. for walls)? let configuration = ARWorldTrackingSessionConfiguration() configuration.planeDetection = .horizontal //TODO Edit: This is now supported as of ARKit 1.5 (iOS 11.3). Simply use .vertical . I have kept the previous post below for historical purposes. TL;DR Vertical plane detection is not (yet) a feature that exists in ARKit. The .horizontal suggests that this feature could be being worked on and might be added in the future. If it was just a Boolean value, this would suggest that it is final. Confirmation This suspicion

iOS app won't run on device any more under iOS 12: Unrecoverable CT signature issue

懵懂的女人 提交于 2019-11-28 07:34:38
I have an app that crashes immediately when starting under iOS 12 on a device. The console shows the following error: kernel AMFI: 'AppName' does not pass CT evaluation, result: 0x80008 kernel AMFI: Unrecoverable CT signature issue, bailing out. The app runs fine in the iOS 12 simulator, and it also runs just fine on devices with iOS 11 or iOS 10. (I can even distribute the app through enterprise OTA on older devices just fine!) What did iOS 12 change? What is this "CT signature"? Many thanks in advance! I'm not sure if this will fix it for everyone, but I had the exact same problem and it

Swift 4.2 Cannot convert value of type '(UIImagePickerController.InfoKey).Type' to expected argument type 'UIImagePickerController.InfoKey'

谁说胖子不能爱 提交于 2019-11-27 23:35:25
问题 My below code was working just fine with swift 4 but after upgrading to swift 4.2 I am getting this error, I had wasted my 3 hours searching what's the issue but failed. Please if anyone can guide me how to fix this. func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { if postType == 2 { let image = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey)] as! UIImage mediaType.image

Unarchive Array with NSKeyedUnarchiver unarchivedObject(ofClass:from:)

情到浓时终转凉″ 提交于 2019-11-27 23:09:09
Since upgrading to Swift 4.2 I've found that many of the NSKeyedUnarchiver and NSKeyedArchiver methods have been deprecated and we must now use the type method static func unarchivedObject<DecodedObjectType>(ofClass: DecodedObjectType.Type, from: Data) -> DecodedObjectType? to unarchive data. I have managed to successfully archive an Array of my bespoke class WidgetData, which is an NSObject subclass: private static func archiveWidgetDataArray(widgetDataArray : [WidgetData]) -> NSData { guard let data = try? NSKeyedArchiver.archivedData(withRootObject: widgetDataArray as Array,

Read SMS message in iOS

百般思念 提交于 2019-11-27 22:00:35
I'm an iOS developer and i have tried to build a mobile application with automatic activation functionality, i found more than way to read SMS message but only using private API which will cause Apple rejection to my app.,i have two questions and appreciate any feedback can help me. 1- Is there any way to read SMS message in iOS platform without facing Apple rejection ? 2- Can anybody provide me with the related section in Apple developer documentation, the section that describe that its not allowed to read SMS message in iOS platform ? rckoenes No, there is no way to read SMS messages. Apple