ios10

How can I add media attachments to my push notifications in an iOS 10 app?

走远了吗. 提交于 2019-12-05 03:34:22
There are multiple examples how you should set up your project to add rich notifications which use 'media attachments' technology to show images. I've read most of them but something I missed, because my project does not display any rich notifications with this payload (tested with APNS-Tool and Boodle): { "aps":{ "alert":{ "title": "Rich test", "body": "Dancing Banana" }, "mutable-content": 1 } } The notification is visible, but on 3D Touch, there are no additional infos displayed (like the image or the modified title). The notification extension breakpoints and NSLog messages are also not

iOS10 - can't render Sprite Kit scene within SceneKit with openGL

白昼怎懂夜的黑 提交于 2019-12-05 03:32:05
Since I've updated to iOS 10, I'm not able anymore to render a Sprite Kit scene to a Scene Node while using openGL for rendering. Things work fine with Metal. The error logs: "Failed to create IOSurface image (texture)" I used to be able to do something like: class ViewController: UIViewController { @IBOutlet weak var scnView: SCNView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. scnView.showsStatistics = true scnView.allowsCameraControl = true let scnScene = SCNScene() scnView.scene = scnScene print("scnView

Is there still a ~64 local notification limit for the new UserNotifications in iOS 10?

天涯浪子 提交于 2019-12-05 02:12:44
问题 In everything before iOS 9 there was a limit of 64 notifications that could be scheduled at any one time. Is this still true with the new notification system or can I schedule as many in advance as I'd like with the new UNUserNotifications? 回答1: Yes. I just updated an app of mine that schedules a lot of local notifications and the 64 limit is still in place. 来源: https://stackoverflow.com/questions/40685128/is-there-still-a-64-local-notification-limit-for-the-new-usernotifications-in-i

CNContactViewController hiding navigation bar

百般思念 提交于 2019-12-05 01:13:15
问题 When I push a CNContactViewController on to the stack of UITableViewController subclass which is within a UINavigationController , the top navigation bar is almost entirely hidden. But with the brightness all the way up, you make out the back arrow followed by the word "Detail", and the system status bar. When I tap that corner of the screen, the CNContactViewController is indeed dismissed. Of course this is not good, since a user would probably not even see the text of the navigation bar and

Reading Serial Port iOS

丶灬走出姿态 提交于 2019-12-05 01:07:42
I have the following code to read and write to serial ports on iOS 10.3.3 Jailbroken iPhone 6S (I used h3lix to jailbreak): Serial.h: // // Serial.h // iOUSB // // Created by Brandon on 2018-05-21. // Copyright © 2018 XIO. All rights reserved. // #if !defined(__cplusplus) //-fmodules -fcxx-modules @import Foundation; #else #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wauto-import" #import <Foundation/Foundation.h> #pragma clang diagnostic pop #endif #define BAUD_RATE 9600 @interface Serial : NSObject + (instancetype)shared; - (bool)setup:(NSString *)filePath; - (bool

What is Core Audio error 561015905 and why does it happen when I use the lock button?

情到浓时终转凉″ 提交于 2019-12-05 01:04:35
问题 Since upgrading to iOS 10 and Xcode 8, my iOS app has been throwing an error and crashing whenever I turn off the screen using the lock button. The error is: *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'error 561015905' I'm not explicitly using Core Audio, or any audio at all. But I am using SceneKit, which I assume uses Core Audio. Actually this behavior doesn't seem to be related to my code at all. It happens on a brand new untouched SceneKit

iOS 10 UITabBar more items visible after setting title

随声附和 提交于 2019-12-05 00:48:35
I have a tab bar in my app, and the tab bar items are subclasses of UITabBarItem. After fetching an update from the server, these tab bar items set their title from code using this line: [self setTitle:@"SomeText"]; Once this line runs, the tab bar items that were previously hidden (behind the more tab) become visible in the main tabs area, and stack on top of the other tabs. See the screenshot below. This only happens in iOS 10 (beta). Is this a bug in my code or an issue in iOS 10? I have created a minimal XCode project and posted to Github to demonstrate the issue: https://github.com

Unrecognized selector UIDeviceRGBColor countByEnumeratingWithState:objects:count:

孤人 提交于 2019-12-04 23:40:52
I know this is kind of a dupe, but I don't have enough reputation yet to comment on the original post and, while I don't have an answer, I do have more useful information (a concrete example). Moderators, feel free to move this to the proper location. When compiling my code using the latest XCode 8 beta 6 (iOS 10 SDK), I get an exception "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x600000071340'" This happens during the call: auto viewController = [[

iOS 10 don't call Notification Service Extension

牧云@^-^@ 提交于 2019-12-04 23:32:59
I tried to implement the new Notification Service Extension, but I have a problem. In my NotificationService.swift file I have this code: class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) if let bestAttemptContent =

Perform Selector With Object in swift 3

流过昼夜 提交于 2019-12-04 23:13:13
I am trying to perform selector with object in swift 3.0 I have a selector which have one parameter func imageSelected(aImage : UIImage) and I am calling it like viewC.perform(Selector.init("imageSelected:"), with: image, afterDelay: 0.1) But the app crashes with error that the selector is not defined. Here's something I always do when I encounter selectors in swift: Ignore the parameters, just use the name. You used this: imageSelected: What is that : doing there? Delete it! Just use the name of the method! Also, there is this great #selector syntactic sugar, please use that: viewC.perform(