ios10

How to use Notification service extension with UNNotification in iOS10

血红的双手。 提交于 2019-11-27 14:57:50
问题 Apple introduce new extension names "UNNotificationServiceExtension", but how to launch it from push notification ? I read that service extension provide end to end encryption for payload. Which key is required to set payload of push notification ? How to identify payload and how to launch service extension from push notification ? 回答1: Let me take it step by step. UNNotificationServiceExtension - What it is? UNNotificationServiceExtension is an App Extenstion target that you bundle along

UICollectionView - iOS 10 - crash on iPhone 6 Plus simulator but works on real device

谁说胖子不能爱 提交于 2019-11-27 14:48:35
问题 I've created an UICollectionView that works fine on small devices like iPhone 5s/SE/6/6s/7 on both simulator and real device, but I have a strange situation when it comes about iPhone 6Plus, iPhone 7Plus and any iPad version. It works fine on real device, but it crashes in simulator with the following error: Assertion failure in -[_UIFlowLayoutSection computeLayoutInRect:forSection:invalidating:invalidationContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.5.2

How do I set an NSCalendarUnitMinute repeatInterval on iOS 10 UserNotifications?

此生再无相见时 提交于 2019-11-27 14:47:41
In UILocalNotification we use NSCalendarUnitMinute like repetition ..... but I can't find in iOS 10 UserNotification doc ... How can I use NSCalendarUnitMinute like repetition in iOS 10 UserNotification ? here is the code which will schedule local notification at 8:30 pm and will repeat after every one minute. UILocalNotification* localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = pickerDate; localNotification.alertBody = self.textField.text; localNotification.timeZone = [NSTimeZone defaultTimeZone]; localNotification.repeatInterval = NSCalendarUnitMinute;

Core Data file's Location iOS 10

核能气质少年 提交于 2019-11-27 14:46:56
问题 I am trying to us SQLite Browsers to see my Core Data objects. I am not able to find where does the core data save its sql file. I looked into the app documents folder but there is nothing there. Do you know where does the core data in IOS 10(simulator) save its SQLite files on? 回答1: I tested it on XCode 8 Swift 3 OS macOS Sierra IOS 10 In Your Appdelegate.swif t func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?)

iOS 10, NSUserDefaults Does Not Work

纵然是瞬间 提交于 2019-11-27 14:38:48
I try to write/read values to/from [NSUserDefaults standardUserDefaults] , but it seems not to work. My code is: [[NSUserDefaults standardUserDefaults] setObject:@"sampleString" forKey:@"sampleKey"]; [[NSUserDefaults standardUserDefaults] synchronize]; NSString *defaultsValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"sampleKey"]; return defaultsValue; This code returns nil , for Xcode 8.0 beta and iPhone 6s (10.0) simulator. However it returns sampleString for Xcode 8.0 beta and iPhone 6s (9.1) simulator I am testing my app with the new systems. Am I doing something wrong? Or is

Alert from os: app may slow down your iPhone

纵然是瞬间 提交于 2019-11-27 14:35:55
问题 Hy, I have uploaded the app to App Store with both architecture. Please see the attached image for Build Settings of TARGETS in Architectures . And luckily it get Ready for sale, but iPhone 5s giving alert. The alert is: "APP" may slow down your iPhone. The developer of this app needs to update it to improve its compatibility. I googled but do not found solution to get rid off this alert. On other hand i also need to support iPhone5 and prior (32 bit architectures). Please help. 回答1: Check if

The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data

て烟熏妆下的殇ゞ 提交于 2019-11-27 14:18:58
问题 Got a build rejection The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data. The app does not use microphone. Or so I think. How do I track down where mic is used? UPD23112016: given that the lazy answer is being upvoted I've filed a new feature request with apple to close this security hole. UPD05042017: it is still bothersome that once you proxy mic access into some 3rd party framework via some half baked

iOS 10.0 - 10.1: AVPlayerLayer doesn't show video after using AVVideoCompositionCoreAnimationTool, only audio

社会主义新天地 提交于 2019-11-27 14:08:07
问题 Here is a complete project if you care to run this yourself: https://www.dropbox.com/s/5p384mogjzflvqk/AVPlayerLayerSoundOnlyBug_iOS10.zip?dl=0 This is a new problem on iOS 10, and it has been fixed as of iOS 10.2. After exporting a video using AVAssetExportSession and AVVideoCompositionCoreAnimationTool to composite a layer on top of the video during export, videos played in AVPlayerLayer fail to play. This doesn't seem to be caused by hitting the AV encode/decode pipeline limit because it

iOS 10 GM with xcode 8 GM causes views to disappear due to roundedCorners & clipsToBounds

妖精的绣舞 提交于 2019-11-27 13:03:19
I tested my app with iOS 10 Beta 7 and Xcode 8 beta and everything worked fine. However just a few minutes ago I installed the now available GM releases of both and faced a weird issue. I am using custom table view cells in my app and in my custom cell's I am using cornerRadius and clipsToBounds to create rounded views. - (void)awakeFromNib { [super awakeFromNib]; self.tag2label.layer.cornerRadius=self.tag2label.frame.size.height/2; self.tag2label.clipsToBounds=YES; } This looked okay before however in the new GM releases all the views which had the rounded corners disappeared. This happened

iOS 10 heading arrow for MKUserLocation dot

こ雲淡風輕ζ 提交于 2019-11-27 12:19:06
问题 The Maps app in iOS 10 now includes a heading direction arrow on top of the MKUserLocation MKAnnotationView . Is there some way I can add this to MKMapView in my own apps? Edit: I'd be happy to do this manually, but I'm not sure if it's possible? Can I add an annotation to the map and have it follow the user's location, including animated moves? 回答1: I also experienced this same issue (needing an orientation indicator without having the map spin around, similar to the Apple Maps app).