ios10

iOS10 and Safari and Chrome no longer working with Bluetooth scanner

旧时模样 提交于 2019-12-05 14:05:09
This is almost an EXACT reoccurrence of problem that was in iOS 8 and finally fixed in iOS 8.3. That problem was documented here : iOS8 and Safari no longer working with Bluetooth scanner What's happening is using a bluetooth barcode scanner. Scanning into a web application produces inconsistent results. Sometimes more characters sometimes less. In the previous iOS 8 issue the problem was only in Safari. This time it's worse because the problem is now in both Safari AND Chrome. So there's no backup browser this time. Scanning into a non web browser app like Email or Notes works EVERY TIME. It

Swift 3.0 how to use startDeviceMotionUpdates(to: withHandler)?

廉价感情. 提交于 2019-12-05 12:50:32
Swift 3.0 was released alongside Xcode 8.0 and apparently a lot has changed. I'm very unfamiliar with the new syntax in swift. Can someone help me out? I'm trying to figure out what goes in motionManager.startDeviceMotionUpdates( to: OperationQueue.current()!, withHandler: ) after the "withHandler:" I am trying to get my SceneKit program be able to utilize the accelerometer to determine the orientation of an SCNNode platform. I am also fairly new to swift (about 5 days into programming in Swift) so if there's something fundamental I am messing up, let me know. Reference You must pass the block

Swift 3D Touch iOS 10 Home screen quick actions share Item missing

半城伤御伤魂 提交于 2019-12-05 12:49:02
问题 In my apps that use 3D touch home screen quick actions I do not have the new iOS 10 default sharing option that all apps got for free. I have seen some apps, for example Amazon, that have their 4 custom shortcut items (quick actions) and the 1 default sharing option. Is there a way I can get the default iOS 10 sharing option back? 回答1: That feature or option is only available for apps that are live on the App Store, it will not show up when testing your app. It is done automatically so there

How to handle UNNotificationAction when app is closed?

限于喜欢 提交于 2019-12-05 11:35:38
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 notification... maybe i can't handle background task and i always have to launch app? Yes, it always

Sprite Kit app crashes when run on real device and plugged into computer

北战南征 提交于 2019-12-05 10:32:12
I just updated to iOs10 on my test phone and XCode 8. I ran the code migration and was running tests succeessfully on my simulated devices. However, once I started trying to test on my real device things stopped working smoothly. After running my Sprite Kit game for around 5 - 10 seconds it would crash and render the phone inoperable until I unplugged it from the computer. After I unplug it the game runs as normal and is still really smooth. This are the startup notifications printed to the console: 2016-09-15 22:20:49.490959 AppName[411:38688] [DYMTLInitPlatform] platform initialization

UIView Shadow using User Defined Runtime Attributes

淺唱寂寞╮ 提交于 2019-12-05 10:10:30
I'm having a hard time getting a drop shadow to show when I am using "User Defined Runtime Attributes". It seems to work completely fine if I use code, as follows. func formatView(view: UIView, cornerRadius: Bool) { if (cornerRadius) {view.layer.cornerRadius = 12 } view.layer.shadowColor = UIColor.black.cgColor view.layer.shadowOffset = CGSize.zero view.layer.shadowRadius = 3 view.layer.shadowOpacity = 0.3 } But when I try it with User Defined Runtime Attributes it doesn't show anymore. These are the ones I'm currently using. The only thing that is weird is if I remove the layer.shadowColor

(iOS 10, Swift 3) Reading `userInfo` dictionary from a CloudKit notification: How do I cast `[AnyHashable : Any]` to `[String : NSObject]`?

跟風遠走 提交于 2019-12-05 07:48:18
Background I'm trying to load the userInfo dictionary from application:didReceiveRemoteNotification:userInfo:fetchCompletionHandler in my app delegate. I then need to cast userInfo from [AnyHashable:Any] to [String:NSObject] so I can use it in CloudKit's CKNotification:fromRemoteNotificationDictionary . Question When I do: let ui = userInfo as! [String : NSObject] I get the error: '[AnyHashable:Any]' is not convertible to '[String:NSObject]' Is there a better way to convert userInfo to the appropriate type, or am I on a completely wrong track? You just need to cast it first to NSDictionary and

SiriKit payment confirmation currency is always US$

拟墨画扇 提交于 2019-12-05 06:28:14
I build Intents Extension and I'm handling INSendMoneyIntent and I'm saying: Send 25€ to John Smith response after app confrimation Here's your <Your_App> payment for US$25.00. Do you want to send it? Intent contains proper currency iso 3 code - EUR, so why siri displays wrong currency in payment confirmation? returning intent INSendPaymentIntentResponse *reponse = [[INSendPaymentIntentResponse alloc] initWithCode:INSendPaymentIntentResponseCodeReady userActivity:userActivity]; completion(reponse); You need to add a paymentRecord to your response in (void)confirmSendPayment:

applicationWillResignActive called without reason on iOS 10 ( swift 3 )

岁酱吖の 提交于 2019-12-05 06:04:49
When I launch my app on iOS 10, I can see that after a short delay, the Appdelegate function -> applicationWillResignActive() is called. There is no reason for that. The app is still active and in foreground state when it occurs and the app continues to run normally. Please see above the lifecycle of my app : --> Click on the app icon App launch application --> didFinishLaunchingWithOptions application --> applicationDidBecomeActive RootViewController --> viewDidAppear application --> applicationWillResignActive <-- issue ! application --> applicationDidBecomeActive <-- again ??!! at this

How to handle push notification in background in ios 10?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 05:47:55
I am not handle push notification in background. For Handle push notification in background following below steps :- In Capabilities -> Enable Remote notification. In Capabilities -> Background Mode -> Enable Remote notifications. In didFinishLaunchingWithOptions give all permission for ios 10. For push notification used UNUserNotificationCenter . App In Foreground then push notification is working fine and below method call : userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)