ios10

Add Local Notification in iOS 10 - Swift 3

北战南征 提交于 2019-11-26 22:32:12
So I been trying to add a notification to the new UNUserNotificationCenter, but I don't seem to get it. My view controller has an action: @IBAction func sendPressed(_ sender: AnyObject) { let content = UNMutableNotificationContent() content.title = "Hello" content.body = "What up?" content.sound = UNNotificationSound.default() // Deliver the notification in five seconds. let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: 5, repeats: false) let request = UNNotificationRequest.init(identifier: "FiveSecond", content: content, trigger: trigger) // Schedule the notification. let

How to update data in TableView without the delay using CloudKit when Creating new Records

六月ゝ 毕业季﹏ 提交于 2019-11-26 21:52:06
问题 There are 2 View Controllers in my App. The first "MainViewController" displays a tableView with CKRecords fields fetched from the private CloudKit database. Inside the viewWillAppear method of this VC I fetch records from CloudKit and reload data of a tableview to show the latest fetched results that have been previously saved in the CloudKit by the user. The second view controller "CreateRecordViewController" is made for creating CKRecords and saving them to the private database of the

iOS 10 - App crashes To access photo library or device camera via UIImagePickerController

廉价感情. 提交于 2019-11-26 21:42:35
问题 Below is my code to access photo library -(void)click_gallery { if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *imgPicker= [[UIImagePickerController alloc] init]; UIColor* color = [UIColor colorWithRed:46.0/255 green:127.0/255 blue:244.0/255 alpha:1]; [imgPicker.navigationBar setTintColor:color]; imgPicker.delegate = self; imgPicker.allowsEditing = YES; imgPicker.sourceType =

What is 'Vary for Traits' in Xcode 8?

人走茶凉 提交于 2019-11-26 21:15:15
I am using AutoLayout and Size classes, but with release of iOS 10 and new Xcode 8.0, there is one new option Vary for Traits . Is this replacement of Size Classe for different width and height of devices. By selection of width checkbox, it displays varying 14 compact width devices . By selection of height checkbox, it displays varying 18 compact height devices . By selection of both checkbox, it displays varying 11 compact width regular height devices . How to make use of this options ? Can we use AutoLayout with size classes as like Xcode7.0 ? If any one has in depth knowledge then please

Contact Address book crash on iOS 10 beta

混江龙づ霸主 提交于 2019-11-26 20:53:38
问题 When click on any contacts in address book (inside my app) it's crashing on iOS 10 beta and working fine on iOS 9 versions; This is the crash log *** Terminating app due to uncaught exception 'CNPropertyNotFetchedException', reason: 'A property was not requested when contact was fetched.' *** First throw call stack: (0x1cf11a07 0x1c62af63 0x1cf1194d 0x246f0f4f 0x246c6a71 0x1ce355eb 0x1ce2e19b 0x246c69cf 0x246c6883 0x25e4a375 0x2538f283 0x254204ef 0x25420bb1 0xe9da97 0xe9da83 0xea2321

libMobileGestalt MobileGestaltSupport.m:153 MobileGestalt.c:550 Xcode Console

偶尔善良 提交于 2019-11-26 19:34:30
问题 I am getting Following messages on Xcode Console View libMobileGestalt MobileGestaltSupport.m:153: pid 231 (myproject) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see ) MacOs Sierra Version: 10.12.4 Xcode Version 8.3 Programming Language : Objective C I get this message after application launch, Device is plugged with xcode while running the application. It seems like a rare issue

Xcode 8 generates broken NSManagedObject subclasses for iOS 10

烂漫一生 提交于 2019-11-26 19:34:26
I updated my iOS app project recently to iOS 10. Now I'm trying to change the Core Data Model of my app but the new NSManagedObject subclasses which Xcode generates are broken. I also tried to fix the subclasses manual but this doesn't work. The minimum tools version for the Core Data Model is set to Xcode 7.0 and code generation language is set to Swift. This is the code which Xcode generates: import Foundation import CoreData import extension Group { @nonobjc public class func fetchRequest() -> NSFetchRequest { return NSFetchRequest(entityName: "Group"); } @NSManaged public var name: String?

Xcode error: Code signing is required for product type 'Application' in SDK 'iOS 10.0'

牧云@^-^@ 提交于 2019-11-26 19:22:53
I have Xcode 8 installed on OS X El Capitan. I get this error: Signing for "target" requires a development team. Select a development team in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.0' Shrawan With Xcode-8.1 & iOS-10.1 Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID : Enable signing to Automatically && Select Team that you have created before: Change the Bundle Identifier: Code Signing to iOS Developer: Provision profile to Automatic: You can now run your project on a device! Lion To add developer account to Xcode: Press Cmd ⌘

iOS 10 doesn't print NSLogs

孤街醉人 提交于 2019-11-26 18:55:47
问题 Nothing prints from NSLog on Xcode 8.0 beta (8S128d). printf is unchanged Here's my code: NSLog(@"hello from NSLog"); printf("hello from printf"); Here's the output on iOS 9 Simulator: 2016-06-17 09:49:10.887 calmapp-dev[28517:567025] hello from NSLog hello from printf Here's the output on iOS 10 Simulator: hello from printf 回答1: It could be that you added the property "OS_ACTIVITY_MODE": "disable" in the Scheme environment variables (to hide OS output from the simulator) and forgot about it,

how to display image in ios push notification?

耗尽温柔 提交于 2019-11-26 18:26:09
iOS 10 introduced push notification framework updates, UserNotificationsUI.framework As written on apple docs, it lets us customize the appearance of local and remote notifications when they appear on the user’s device. So if anyone have idea how to display image in push notification when on lock screen. same like andorid push notification are doing. Thanks, If you want to customize the appearance of local and remote notifications, perform the following steps: Create a UNNotificationCategory and add to the UNUserNotificationCenter category: let newCategory = UNNotificationCategory(identifier: