ios10

HTTP/2 Server Push in iOS 10

跟風遠走 提交于 2019-12-21 20:24:07
问题 I am trying to get server push working on iOS 10. I am working off of the Akamai HTTP/2 demo. https://http2.akamai.com/demo The following is my attempt at testing server push. @interface ViewController () <NSURLSessionTaskDelegate> @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; NSURLSessionConfiguration *defaultConfigObject = [NSURLSessionConfiguration defaultSessionConfiguration]; NSURLSession *defaultSession = [NSURLSession sessionWithConfiguration:

Launch app from INExtension in SiriKit

你离开我真会死。 提交于 2019-12-21 17:26:37
问题 I want to use SiriKit to start a workout. Starting the workout requires opening the main app from the app extension. The boilerplate that Apple provides for the INStartWorkoutIntentHandling handler is func handle(startWorkout startWorkoutIntent: INStartWorkoutIntent, completion: (INStartWorkoutIntentResponse) -> Void) { let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartWorkoutIntent)) let response = INStartWorkoutIntentResponse(code: .success, userActivity: userActivity

Getting Firebase MobileAssetError warning in XCode 8

橙三吉。 提交于 2019-12-21 16:51:55
问题 Just downloaded XCODE 8 and IOS 10 on my iphone. I am getting some Firebase warnings on Xcode, but read that they were working on it and that you could continue to run simulator on your phone with no problems. The build succeeds but then I get this output on Xcode: 2016-09-15 15:04:54.598607 TheApp[443:51993] [MC]System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2016-09-15 15:04

Does UNTimeIntervalNotificationTrigger nextTriggerDate() give the wrong date?

与世无争的帅哥 提交于 2019-12-21 12:47:50
问题 I’m updating my localnotifications to work with iOS 10 and I’ve run into an issue where I think the nextTrigger function returns NOT “The next date at which the trigger conditions will be met.” but instead returns whatever the current date time is PLUS what you had initially set the UNTimeInvervalNotificationTrigger to. So if you set the trigger to go off in 60 seconds, from the documentation I expect that when I call the nextTriggerDate() that I’d get it to return whatever the date time is

Does UNTimeIntervalNotificationTrigger nextTriggerDate() give the wrong date?

♀尐吖头ヾ 提交于 2019-12-21 12:47:06
问题 I’m updating my localnotifications to work with iOS 10 and I’ve run into an issue where I think the nextTrigger function returns NOT “The next date at which the trigger conditions will be met.” but instead returns whatever the current date time is PLUS what you had initially set the UNTimeInvervalNotificationTrigger to. So if you set the trigger to go off in 60 seconds, from the documentation I expect that when I call the nextTriggerDate() that I’d get it to return whatever the date time is

User Notification request always come with default action identifier

一个人想着一个人 提交于 2019-12-21 11:54:15
问题 I am using the UNUserNotificationCenterDelegate (> ios 10) and one of the delegate methods where I can check the response from the notification has always actionIdentifier equal "com.apple.UNNotificationDefaultActionIdentifier" no matter what I do. The "response.notification.request.content.categoryIdentifier" comes right, with the expected value, but the request.actionIdentifier never comes correctly ("mycustomactionidentifier" in the example below). Does anyone know if I'm missing something

Swift 3 and NumberFormatter (.currency) == ¤?

强颜欢笑 提交于 2019-12-21 11:07:28
问题 Xcode 8.0 (8A218a) GM Target : iOS 10 (Swift 3) Consider the following code: let number = NSDecimalNumber(decimal: 22.4) let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .currency numberFormatter.locale = Locale.current let result = numberFormatter.string(from: number) print(result!) The result is: ¤22.40 (I have no idea what ¤ means.) But if I initialize the locale such as: numberFormatter.locale = Locale(identifier: "en_US") The result will be: $22.40 ... which is what

MPMediaItemArtwork init(image:) deprecated in iOS 10.0

你离开我真会死。 提交于 2019-12-21 07:25:32
问题 Apple has deprecated init(image:) method in MPMediaItemArtwork in iOS 10. What is the new alternative. the class shows interface shows method below to be available in the new OS version public init(boundsSize: CGSize, requestHandler: @escaping (CGSize) -> UIImage) Anyone know how to use it? Also question 2, part of the previous question: Does showing now playing metadata on the lock-screen and control-center using MPNowPlayingInfoCenter work in the simulator? 回答1: You can use the following

UITextfield text position not animating while width constraint is animated

我的未来我决定 提交于 2019-12-21 05:05:37
问题 I have three UITextField aligned in a container used to choose a date. At first only the month textfield is shown in the container and takes the full width, then when the user chose the month, the day textfield appear and they both take half of the container. The text alignement in these textfields is centered. My problem is that when I animate their size, the text doesn't animate and jumps directly to the final position while the width of the textfields animate correctly . Step 1 : The

How do you create a notification content extension without using a storyboard

时光怂恿深爱的人放手 提交于 2019-12-21 04:28:13
问题 I want to create a Notification Content Extension to take advantage of the new iOS 10 rich notifications. However, in the main application we do not make use of interface builder. How can I create a content extension that does not utilize a story board? 回答1: Create the Notification Content extension target as you normally would. Remove the storyboard file from the project Remove the NSExtensionMainStoryboard entry from the extension's Info.plist. Add a new entry of NSExtensionPrincipalClass