ios10

Class PLBuildVersion is implemented in both frameworks

喜欢而已 提交于 2019-12-16 21:18:43
问题 iOS 10 / Xcode 8 GM build getting the below, never had it before on Xcode 7. Any ideas? objc[25161]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x12049a910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library

Swift 3 & iOS 10 false memory leak bug

北战南征 提交于 2019-12-14 03:46:09
问题 There seems to be a (false) memory leak bug in Xcode 8 when using with iOS 10 & Swift 3. The following code reports a memory leak in Instruments and the Xcode 8 memory debugger: class SomeClass: NSObject { var view: SomeView! deinit { print("SomeClass deinit") } } class SomeView: UIView { weak var reference: SomeClass? deinit { print("SomeView deinit") } } class ViewController: UIViewController { var someProperty: SomeClass? override func viewDidLoad() { super.viewDidLoad() let c = SomeClass(

Local notifications - repeat Interval in swift 3

无人久伴 提交于 2019-12-14 02:25:30
问题 I want to repeat local notification every week, before iOS10 there is repeatInterval , but i am not able to find anything suitable to repeat notifications in iOS10. TimeTrigger and calendarTrigger both have repeat as true or false, where can i apply repeat as weekly, daily, monthly. Thanks. 回答1: Try this. func scheduleNotification(at date: Date, body: String) { let triggerWeekly = Calendar.current.dateComponents([.weekday,hour,.minute,.second,], from: date) let trigger =

How to dismiss a navigation controller presented from another navigation controller in iOS 10 and below?

夙愿已清 提交于 2019-12-13 20:08:24
问题 I'm presenting a UINavigationController from another UINavigationController like this: let customNavigationController = CustomNavigationController() customNavigationController.viewControllers = [myController] customNavigationController.modalPresentationStyle = .custom self.navigationController.present(customNavigationController, animated: true, completion: nil) Then, when a "close" button tapped, I try to dismiss it like this: navigationController.dismiss(animated: true, completion: nil) That

WKWebView not loads http image in iOS 10 and above

淺唱寂寞╮ 提交于 2019-12-13 15:49:57
问题 I am loading a https URL in WKWebView and inside that few images are coming from HTTP URL which is loading perfectly fine on enabling NSAllowsArbitraryLoads in info.plist file in iOS 9. But on iOS 10 and above it is not loading the HTTP images. I read Apple and followed all possible way but no luck. 回答1: Add the below line in info.plist , NSAllowsArbitraryLoadsInWebContent and set its value as YES 回答2: Allowing Insecure Connection to a Single Server fetching media from an insecure server use

Repeating local notification is triggered immediately — how to defer?

大兔子大兔子 提交于 2019-12-13 14:02:30
问题 My goal is to set a notification that will occur N seconds in the future for the first time, and then repeat every N seconds. However, creating a repeating notification seems to trigger the UNUserNotificationCenterDelegate immediately. App delegate: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let center = UNUserNotificationCenter.current() center.delegate = self return true } func startRequest() {

iOS 10 Notification Content Extension not loading

给你一囗甜甜゛ 提交于 2019-12-13 12:34:44
问题 I have a bare-bones app to play with push notifications. I have the Notification Service Extension working. I can send a remote notification with an image URL and have it load. I can't seem to get Notification Content Extension working. I've gone through multiple tutorials and they all say, just create a Notification Content Extension from the target menu and then inside the Notification Content Extensions Info.plist set the UNNotificationCategory to some string. Then when you push the

Today's extension iOS10 Show More/Less

半城伤御伤魂 提交于 2019-12-13 12:06:19
问题 Had updated the today's extension for iOS 10 implement the delegate method: -(void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode withMaximumSize:(CGSize)maxSize { if (activeDisplayMode == NCWidgetDisplayModeCompact){ [UIView animateWithDuration:0.25 animations:^{ self.preferredContentSize = maxSize; [self.view layoutIfNeeded]; }]; } else if (activeDisplayMode == NCWidgetDisplayModeExpanded){ newHeight = [self getNewWidgetHeight]; [UIView animateWithDuration:0.25

URL scheme “prefs:root=PASS” iOS10

六月ゝ 毕业季﹏ 提交于 2019-12-13 10:29:59
问题 I know there are lot of topics about this problem but is there a solution? I have not found official documentation for that. My problem is I need to redirect my code on storage settings like this : (work in iOS 9) let settingsUrl = NSURL(string: "prefs:root=CASTLE&path=STORAGE_AND_BACKUP") if let url = settingsUrl { UIApplication.shared.openURL(url as URL) } But since ios10 this method don't work, so Is there an alternative? I saw SnapChat, Google Maps redirect their apps to different part on

Custom Keyboard Storyboard with Xcode 8 beta

和自甴很熟 提交于 2019-12-13 09:27:14
问题 I'm having some problems designing my custom keyboard from the storyboard in Xcode 8 beta 6. For some reason when I launch the keyboard on a iOS 10 device this is the result: This is how i design it in the Storyboard, Top View: Bottom View: So it displays only the height of the bottom view. I don't have this problem with iOS 9. Any ideas on what is going wrong? UPDATE : this it's how the keyboard gets loaded in iOS 9: UPDATE 2: Even creating the view programmatically this way in viewDidLoad()