ios10

How to open our app from iMessage

倾然丶 夕夏残阳落幕 提交于 2019-12-22 12:39:20
问题 I had created an app in iMessage that is work perfactly but i want to know how can i open our app from iMessage Suppose I have one app after that i added iMessage target and from iMessage I want to open my app from iMessage is it possible ? I tried with this but not succeed NSString *customURL = @"appName://"; if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]]) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]]; } Error : 回答1: Finally

Remotely remove previously sent notification

烂漫一生 提交于 2019-12-22 12:19:31
问题 Since iOS 10 and UNUserNotificationCenter , a lot of things can be achieved with notifications, but I can't figure out how to remotely remove a push notification every time . Using the mutable-content attribute, I'm able to modify the content of my push notification. But let's say I want to remove it later (the content has expired). I used content-available and then the following code: UNUserNotificationCenter.current() .removeDeliveredNotifications(withIdentifiers: [xxx]) It almost works,

OpenCV MatToUIImage causes memory leak

谁都会走 提交于 2019-12-22 10:57:56
问题 My project is working with openCV for iOS(2.4.9). And I found function MatToUIImage which will cause memory leaks, and it only occurs on iOS 10.X. After I updated this function(2.4.9) to latest(3.2.0) version everything got worked. The only difference is CGBitmapInfo . So can anyone tell me why? 2.4.9 UIImage* MatToUIImage(const cv::Mat& image) { NSData *data = [NSData dataWithBytes:image.data length:image.elemSize()*image.total()]; CGColorSpaceRef colorSpace; if (image.elemSize() == 1) {

Short circuiting of audio in VOIP app with CallKit

荒凉一梦 提交于 2019-12-22 10:53:08
问题 I'm using the SpeakerBox app as a basis for my VOIP app. I have managed to get everything working, but I can't seem to get rid of the "short-circuiting" of the audio from the mic to the speaker of the device. In other words, when I make a call, I can hear myself in the speaker as well as the other person's voice. How can I change this? AVAudioSession setup: AVAudioSession *sessionInstance = [AVAudioSession sharedInstance]; NSError *error = nil; [sessionInstance setCategory

CGImageDestinationFinalize or UIImageJPEGRepresentation - Crash when saving a large file on IOS 10

半城伤御伤魂 提交于 2019-12-22 10:33:46
问题 I am trying to create tiles for a larger image, and it seems that as of IOS 10 the following code no longer works and crashes with EXC_BAD_ACCESS. This happens on IOS 10 Device only, IOS 9 works fine. The crash happens with any image that is larger than ~1300x1300. Profiling in instruments doesn't yield anything interesting and points to CGImageDestinationFinalize. There is no memory spike. I tried both ways below: UIImage* tempImage = [UIImage imageWithCGImage:tileImage]; NSData* imageData =

iOS 10 : How can I get a call event using CallKit/CXCallObserver?

a 夏天 提交于 2019-12-22 08:39:01
问题 I changed the CTCallCenter with CXCallObserver in iOS 10. Here is my code: #import <CallKit/CXCallObserver.h> #import <CallKit/CXCall.h> -(void)viewDidLoad { CXCallObserver *callObserver = [[CXCallObserver alloc] init]; [callObserver setDelegate:self queue:nil]; ... ... } - (void)callObserver:(CXCallObserver *)callObserver callChanged:(CXCall *)call { if (call.hasConnected) { NSLog(@"********** voice call connected **********/n"); } else if(call.hasEnded) { NSLog(@"********** voice call

xcode 8 beta ios 10 push notifications stopped working

我们两清 提交于 2019-12-22 08:17:34
问题 After switching to xcode 8 beta my push notifications have stopped working. My code signing identity for release is set to distribution. I am registering the device, receiving the token and successfully uploading it to my server without any problem. But the status of the push messages is failed. Just wondering if i need to make any changes or if it will not work with a beta version of xcode. 回答1: In the targets, under Capabilities and Push Notifications I needed to add the push notification

SFTranscriptionSegment's timestamp is always 0

拈花ヽ惹草 提交于 2019-12-22 08:16:51
问题 This is a questoin regarding new iOS 10 Speech framework. I get the speech recognition result using following method recognitionTask = [speechRecgzr recognitionTaskWithRequest:recognitionRequest resultHandler:^(SFSpeechRecognitionResult * _Nullable result, NSError * _Nullable error) { } But the timestamp of each SFTranscriptionSegment in result is 0 and also confidence is always 0 What can be the problem here? Have apple not implemented the API properly yet? Thank you. 回答1: After few weeks I

Crash requesting authorisation to Photos Library in iOS 10

回眸只為那壹抹淺笑 提交于 2019-12-22 08:11:45
问题 I have a sample iOS 10 application requesting authorisation to the Photos Library and crashing on a real device with the following crash error: PhotosAuthorizationCrashTest[2014:42551] [access] <private> The repo can be found here Here's the code that requests authorisation (Swift 3.0): private func requestAuthorizationIfNeeded() { DispatchQueue.main.async { let status = PHPhotoLibrary.authorizationStatus() if status == .authorized { return } PHPhotoLibrary.requestAuthorization({ (status) in

How to handle UNNotificationAction when app is closed?

放肆的年华 提交于 2019-12-22 06:53:45
问题 How to handle new iOS10 Notification Action when app is closed (not in background) ? when app is minimalized everything works fine with: UNUserNotificationCenter.current().delegate = x and handling it in class x: UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) { } } but nothing is called when app is closed and user tap action in