ios12

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

♀尐吖头ヾ 提交于 2019-12-17 23:30:26
问题 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 回答1: In my case, I solved this by explicitly adding the following constraints to the cell's contentView. class Cell: UICollectionViewCell { // ...

iOS 12 not supported by Xcode 9.4 : Could not locate device support files

纵然是瞬间 提交于 2019-12-17 23:02:00
问题 This iPhone 8 (Model A1863, A1905, A1906, A1907) is running iOS 12.0 (16A5308e), which may not be supported by this version of Xcode. (Version 9.4.1 (9F2000)) can anyone help with iOS 12.x device support files from Xcode 10 beta? 回答1: iOS 12 is only supported by the beta of Xcode 10 or higher. If you want to use your iPhone 8 with this iOS version (NOT RECOMMENDED) with your Xcode 9.4 you can try to download the last beta of Xcode 10 and after connecting the iPhone to the mac go to this

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

核能气质少年 提交于 2019-12-17 22:07:20
问题 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

iOS 12 terminates apps in the background for no reason

雨燕双飞 提交于 2019-12-17 17:33:39
问题 Starting from iOS 12 the CLLocationManager doesn't run endless anymore in the background. The app get's terminated without a crashlog at random times. This was working fine before iOS 12. To demonstrate this problem I've created an sample app here The demo app just launches an CLLocationManager and keep this running in the background. While running on the background we keep track of it by logging it. The problem is that the app get terminated by iOS. The demo app is created to demonstrate

Automatic OTP verification in iOS?

安稳与你 提交于 2019-12-17 15:35:44
问题 Is there any way to access data from iPhone inbox(SMS) to ios application to do automatic OTP verification like the one in Android? I shall be grateful for your help. 回答1: In iOS 12 Apple has introduced feature called Security Code AutoFill . To use this in your app all you need to do is set UITextField 's input view’s textContentType property oneTimeCode . otpTextField.textContentType = .oneTimeCode NOTE : Security Code AutoFill will only works with System Keyboard it will not work with

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

筅森魡賤 提交于 2019-12-17 10:44:36
问题 If I have an app made with SwiftUI, will it work for iOS below iOS 13? 回答1: 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, *)

Compress Image in iOS 12. How will this code be updated? [duplicate]

假装没事ソ 提交于 2019-12-17 10:00:08
问题 This question already has answers here : UIImageJPEGRepresentation has been replaced by instance method UIImage.jpegData(compressionQuality:) (3 answers) Closed last year . // compressing image(avaImg)before sending it to the server(Parse) let avaData = UIImageJPEGRepresentation(avaImg.image!, 0.5) let avaFile = PFFile(name: "ava.jpg", data: avaData!) user["ava"] = avaFile When I replace it to the following line as recommended by the notifications I get the error below let avaData = UIImage

UIImageJPEGRepresentation has been replaced by instance method UIImage.jpegData(compressionQuality:)

折月煮酒 提交于 2019-12-17 07:23:08
问题 I've tried to upload a photo to Firebase but it's giving me this error. It was working before Xcode 10. I'm getting this error: 'UIImageJPEGRepresentation' has been replaced by instance method 'UIImage.jpegData(compressionQuality:)' and I don't know how to use this function. import UIKit import Firebase class SignUpViewController:UIViewController { @IBOutlet weak var profileImageView: UIImageView! @IBOutlet weak var tapToChangeProfileButton: UIButton! var continueButton:RoundedWhiteButton!

Model is running iOS 10.2 (14C92), which may not be supported by this version of Xcode

社会主义新天地 提交于 2019-12-17 07:07:41
问题 I am facing this error, i am done with research on that. I conclude the result, i need one file for device support 10.2(14C92) Please share that file. GoTo: Right click on Xcode 8 or Newer version of your Xcode, select "Show Package Contents", "Contents", "Developer", "Platforms", "iPhoneOS.Platform", "Device Support" Copy the 10.2(14C92) folder (or above for later version). I need that folder. Thanks. 回答1: If somebody facing similar issue with Xcode 9.1 Open directory: /Applications/Xcode

dyld_shared_cache_extract_dylibs failed for iPhone XS Max running ios 12.1.2

这一生的挚爱 提交于 2019-12-12 14:51:50
问题 I am trying to run my app on iPhone XS Max running iOS 12.1.2, but till the end of the build and it returns "dyld_shared_cache_extract_dylibs failed" , i removed the supported files for it and rerun my app and it gives the same error , any suggestions i'm stuck ????? 回答1: There is a (temporary) solution I've been using... Open Devices and Simulators Remove your device from the list Tap the + button on the bottom left of the window Select the device (before tapping Trust on it) Tap Trust on