ios10

UIImagePickerController crashes on iOS10

别来无恙 提交于 2020-01-21 01:01:49
问题 On presenting UIImagePickerController with photo library source on iOS10 , my app crashes. On iOS10 with camera source and on iOS9 with photo library and camera sources, the app does not crash. The app is written in Swift 2.2 and built by Xcode 7.3.1 . Why does the crash occur? let imagePicker = UIImagePickerController() imagePicker.sourceType = .PhotoLibrary imagePicker.allowsEditing = true imagePicker.delegate = self self.presentViewController(imagePicker, animated: true, completion: nil)

UIImagePickerController crashes on iOS10

我的未来我决定 提交于 2020-01-21 01:01:02
问题 On presenting UIImagePickerController with photo library source on iOS10 , my app crashes. On iOS10 with camera source and on iOS9 with photo library and camera sources, the app does not crash. The app is written in Swift 2.2 and built by Xcode 7.3.1 . Why does the crash occur? let imagePicker = UIImagePickerController() imagePicker.sourceType = .PhotoLibrary imagePicker.allowsEditing = true imagePicker.delegate = self self.presentViewController(imagePicker, animated: true, completion: nil)

Background fetch execution time with iOS 10 UserNotifications without user interaction

烈酒焚心 提交于 2020-01-15 05:55:07
问题 In the Push Notification API before iOS 10, I could easily run a background job triggered by a Push Notification being received. Just received -- the user didn't have to interact with it at all. Now it seems in order for my same background jobs to be carried out with this new framework the user must interact with the notification somehow. Is there a way with this new framework to just run a background job when a certain push is just received by the client device, but not interacted with by

Can imessage extension open host app?

一个人想着一个人 提交于 2020-01-14 19:09:55
问题 I've tried [self.extensionContext openURL:completion] , but my app crashed. I heard some extensions can't use this method, can iMessage extensions? By the way, can host app activate its iMessage extension? 回答1: Share Extensions and Action Extensions are not designed to function as app launchers. App Extension Programming Guide There is no direct communication between an app extension and its containing app; typically, the containing app isn’t even running while a contained extension is

Can imessage extension open host app?

扶醉桌前 提交于 2020-01-14 19:08:00
问题 I've tried [self.extensionContext openURL:completion] , but my app crashed. I heard some extensions can't use this method, can iMessage extensions? By the way, can host app activate its iMessage extension? 回答1: Share Extensions and Action Extensions are not designed to function as app launchers. App Extension Programming Guide There is no direct communication between an app extension and its containing app; typically, the containing app isn’t even running while a contained extension is

Open phone settings when button is clicked in my app

自作多情 提交于 2020-01-13 11:36:22
问题 I recently upgraded to Xcode 8 and converted my code to Swift 3. I am making a custom keyboard (extension) which worked perfectly fine till iOS 9, but i am facing a couple of issues in iOS 10. The container app of the custom keyboard contains a button which directs the user to the keyboard settings to add the keyboard Issue: This button click is not working in iOS 10 i.e the user is not directed to the settings. I have configured the URL Schemes in my project and have tried the following code

Perform Selector With Object in swift 3

烂漫一生 提交于 2020-01-13 07:36:06
问题 I am trying to perform selector with object in swift 3.0 I have a selector which have one parameter func imageSelected(aImage : UIImage) and I am calling it like viewC.perform(Selector.init("imageSelected:"), with: image, afterDelay: 0.1) But the app crashes with error that the selector is not defined. 回答1: Here's something I always do when I encounter selectors in swift: Ignore the parameters, just use the name. You used this: imageSelected: What is that : doing there? Delete it! Just use

Core data crash occurring since iOS 10

懵懂的女人 提交于 2020-01-13 04:56:30
问题 I've been struggling to resolve a locally-unreproducible crash since iOS 10 within the sqlite/coredata library. It's occurring very infrequently - somewhere in the realm of 0.2% in production. What I know (or at least suspect): It only happens on iOS 10 and above. Most often occurs while saving the context, but may also be occurring during a core data fetch request. Occurring fairly rarely (ballpark rate of 0.15% of sessions) I have run stress tests with concurrency debug flags enabled, as

How to add buttons above keyboard

混江龙づ霸主 提交于 2020-01-12 11:06:11
问题 How to add button above the keyboard like this one in Stack Exchange app? And when you long press the text in UITextView How to add "Select" and "Select All"? 回答1: The first question, you can set textField 's inputAccessoryView to your custom view, this can customize the keyboard's header. The result: You can do it like below; first, you should instance the view you want to add above the keyboard. class ViewController : UIViewController { @IBOutlet weak var textField: UITextField! override

Got an error when trying to get the geolocation in safari on iOS 10

喜欢而已 提交于 2020-01-12 04:58:17
问题 [blocked] Access to geolocation was blocked over insecure connection to http://www.hnsjb.cn. Should I change my website to the https protocol? 回答1: iOS 10 and also desktop Safari 10 seem to require https connection now. Safari also seems to be more strict than what Chrome did earlier. No mixed content warnings are allowed, Chrome allows e.g. map tiles to load over normal http. 回答2: I could not find any guideline specific to Safari, but this issue has been discussed by other web browsers as