ios10

how to get the incoming call number by using callkit

[亡魂溺海] 提交于 2019-11-26 14:46:34
问题 How to get the incoming call phone number programmatically by using call kit framework. i tried with cxcallobserver class but no use. Any suggestions most helpful... 回答1: When using CallKit's Call Blocking & Identification feature (new in iOS 10), phone numbers to be blocked or identified are loaded by your app's Call Directory extension prior to an incoming call and the phone numbers are stored by the system. Then, when an incoming call arrives, this stored data is consulted by the system

How to use call directory extension to identify a incoming call in my application?

烈酒焚心 提交于 2019-11-26 14:41:54
问题 I am working on callKit framework, I found that by the use of call directory extension, we can Identify the incoming phone number. My question how to implement a call directory extension in iOS app to identify incoming call detail. I am working in Objective C. Let a number "+919876xxxxx" add in call directory extension using this method: - (BOOL)addIdentificationPhoneNumbersToContext:(CXCallDirectoryExtensionContext *)context { // Numbers must be provided in numerically ascending order.

App rejected due to missing usage descriptions (Xcode8)

。_饼干妹妹 提交于 2019-11-26 14:19:26
So I got this mail today saying that the latest build of my app was rejected by iTunes Connect due to some missing usage descriptions. To be exact: This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data. This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data. This app

How to schedule a local notification in iOS 10 (objective-c) [closed]

倾然丶 夕夏残阳落幕 提交于 2019-11-26 13:54:25
问题 I'd like to schedule local notifications using iOS 10. I'd like to know how to do this. I've looked all around the web, but I keep finding clues only for registering and handeling the notifications. Not for the scheduling of a local notification. So, does anyone know how to do this? 回答1: Try it. Its deprecated but working code. Use it for Before iOS 10.0 : //Get all previous noti.. NSLog(@"scheduled notifications: --%@----", [[UIApplication sharedApplication] scheduledLocalNotifications]);

The “prefs” URL Scheme is not working in iOS 10 (Beta 1 & 2)

冷暖自知 提交于 2019-11-26 12:44:58
问题 I can\'t get the \"prefs\" URL Scheme to work in iOS 10 (Beta 1). It\'s set up correctly since the same App works fine on iOS 9. Is this a bug or did it get renamed / removed? Code: let settingsUrl = NSURL(string: \"prefs:root=SOMETHING\") if let url = settingsUrl { UIApplication.sharedApplication().openURL(url) } Update: (Beta 2) Still not working in Beta 2. It seams to be an bug. For example if you want do invite someone using GameCenter in iOS 10 and you\'re not logged into iMessage, you\

NSLog on devices in iOS 10 / Xcode 8 seems to truncate? Why?

百般思念 提交于 2019-11-26 12:17:22
Why the console output shows incomplete in Xcode 8 / iOS 10? A temporary solution, just redefine all NSLOG to printf in a global header file. #define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); Elist In iOS 10 & Xcode 8, Apple switched from the good old ASL (Apple System Log) to a new logging system called Unified logging . NSLog calls are in fact delegating to new os_log API's. (source: https://developer.apple.com/reference/os/logging ): Important Unified logging is available in iOS 10.0 and later, macOS 10.12 and later, tvOS 10.0 and

Resume NSUrlSession on iOS10

半城伤御伤魂 提交于 2019-11-26 11:49:50
问题 iOS 10 is going to be released soon so it worth to test applications for compatibility with it. During such test we\'ve discovered that our app can\'t resume background downloads on iOS10. Code that worked well on previous versions does not work on new one, both on an emulator and on a device. Instead of reducing our code to minimal working test case I\'ve searched internet for NSUrlSession tutorials and tested them. Behaviour is the same: resuming works on previos versions of iOS but breaks

ERROR ITMS - 90167 No. app bundles found in the package

空扰寡人 提交于 2019-11-26 11:46:42
问题 Before I start writing about the error, I\'m running on macOS Sierra and using Xcode 7.3.1. So I\'m creating an Archive from my App, I validate the App and it passes validation, but when uploading to App Store, I get the error \"ERROR ITMS - 90167 No. app bundles found in the package\". I\'ve checked all my documentation and I have everything. I have all my provisioning profiles. I have Release as \"iOS Distribution\". This error just started appearing after I installed macOS Sierra. Anyone

Swift 3 saving and retrieving custom object from userDefaults

雨燕双飞 提交于 2019-11-26 11:40:35
I have this in Playground using Swift 3, Xcode 8.0: import Foundation class Person: NSObject, NSCoding { var name: String var age: Int init(name: String, age: Int) { self.name = name self.age = age } required convenience init(coder aDecoder: NSCoder) { let name = aDecoder.decodeObject(forKey: "name") as! String let age = aDecoder.decodeObject(forKey: "age") as! Int self.init( name: name, age: age ) } func encode(with aCoder: NSCoder) { aCoder.encode(name, forKey: "name") aCoder.encode(age, forKey: "age") } } create array of Person let newPerson = Person(name: "Joe", age: 10) var people =

Failed to read values in CFPrefsPlistSource iOS 10

拜拜、爱过 提交于 2019-11-26 10:19:50
问题 I\'ve updated my Xcode 8 to beta 2 today and I\'m trying to share data between App and Today Extension. I\'m facing with this log warning: 2016-07-08 18:00:24.732472 ProjetctX[941:42801] [User Defaults] Failed to read values in CFPrefsPlistSource<0x1700f1280> (Domain: group.x.p.t.o, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null)): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd Anyone can help me? 回答1: This is actually a