ios12

How can I use Siri Shortcuts to show a specific page in my app?

强颜欢笑 提交于 2019-12-06 04:46:48
问题 I want to advanced research Shortcuts technology. So here are some questions: Can Siri shortcuts be used in any type of app? Because of SiriKit only working in tourism, chatting etc. Now using shortcuts. Can I jump to my app showing specific page by Siri? 回答1: Can Siri shortcuts be used in any type of app? Because of SiriKit only working in tourism, chatting etc. Yes, any. They aren't tied to any specific domain. They are custom. Now using shortcuts. Can I jump to my app showing specific page

Xcode 10 test failure when running on older iOS simulators - “Failed to load test bundle… no suitable image found”

你离开我真会死。 提交于 2019-12-05 19:58:25
问题 I've installed Xcode 10 and upgraded my iOS application to Swift 4.2. When I run my tests (both UI and Unit) via Xcode, on an iPhone simulator running iOS 12, the tests successfully start. When I attempt to run the tests on a simulator running a prior iOS version (e.g. iOS 10.3.1), I get a "failure to load the test bundle". These tests were running successfully on Xcode 9.4. I can run my app on this older simulator without an issue. The Xcode output is as follows ("Reading List" is the

How to unarchive data with unarchivedObjectOfClass:fromData:error:?

别来无恙 提交于 2019-12-05 18:50:26
I am using unarchiveObjectWithData to unarchive data from NSUserDefaults and it is working good, but it was deprecated in iOS 12.0. Xcode suggests to use unarchivedObjectOfClass:fromData:error: , but this method does not work. I have an array of objects of my class to unarchive. I have tried to use unarchivedObjectOfClass:fromData:error: , also unarchivedObjectOfClasses:fromData:error: with all classes (NSArray, NSString, MYCLASS..) Works NSArray *stored = [NSKeyedUnarchiver unarchiveObjectWithData:data]; Does not: NSArray *stored = [NSKeyedUnarchiver unarchivedObjectOfClass:[MYCLASS class]

UITableView does not scroll when keyboard appears

心不动则不痛 提交于 2019-12-05 08:31:47
UITableView does not auto-scroll when a UITextField/UITextView becomes the first responder. It used to work just fine on iOS 9-11, but now it doesn't work anymore on iOS 12. What should I set up or change in the tableView to fix the behavior? Reference GIF Ruslan I found solution in the code, as you said. This part of code was blame: if #available(iOS 11.0, *) { tableView.contentInsetAdjustmentBehavior = .never } else { automaticallyAdjustsScrollViewInsets = false } 来源: https://stackoverflow.com/questions/52736185/uitableview-does-not-scroll-when-keyboard-appears

AFNetworking error 53 during attempted background fetch

孤街浪徒 提交于 2019-12-05 06:36:05
While updating my application to support Background App Refresh I ran into problem with AFNetworking. I am getting NSPOSIXErrorDomain Code=53 "Software caused connection abort" . The problem seems to occur in iOS 12, where the background connection gets terminated. AFNetworking 2.6.3 is used to make the fetch. AppDelegate.m : - (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { [OrdersService performFetch]; completionHandler(UIBackgroundFetchResultNewData); } OrdersService.m : -(void) performFetch { [

ReplayKit's RPSystemBroadcastPickerView not showing preferredExtension

牧云@^-^@ 提交于 2019-12-04 17:02:31
问题 I am using RPSystemBroadcastPickerView to show a picker view, from which a user can select a broadcast service to record the screen. Based on documentation, preferredExtension should allow me to set which broadcast extension should the picker show. The code is super simple: let broadcastPickerView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 51, height: 51)) view.addSubview(broadcastPickerView) broadcastPickerView.preferredExtension = "com.milan.nosal.broadcast-extension"

How can I use Siri Shortcuts to show a specific page in my app?

冷暖自知 提交于 2019-12-04 11:21:14
I want to advanced research Shortcuts technology. So here are some questions: Can Siri shortcuts be used in any type of app? Because of SiriKit only working in tourism, chatting etc. Now using shortcuts. Can I jump to my app showing specific page by Siri? Can Siri shortcuts be used in any type of app? Because of SiriKit only working in tourism, chatting etc. Yes, any. They aren't tied to any specific domain. They are custom. Now using shortcuts. Can I jump to my app showing specific page by Siri? Yes. The code below shows the easiest way on how to show a specific page by Siri, it's called

How to use environment map in ARKit?

[亡魂溺海] 提交于 2019-12-04 11:04:07
ARKit 2.0 added a new class named AREnvironmentProbeAnchor. Reading it's instructions, it seems that ARKit can automatically collect environment texture (cubemap?). I believe that we can now create some virtual objects reflecting the real environment. But I am still not clear how this work, particularly how the environment texture is generated. Does anyone have simple sample code demonstrating this cool feature? Its pretty simple to implement environmentTexturing in your AR project. Set the environmentTexturing property on your tracking configuration to automatic (ARKit takes the video feed

How to create a Siri Intent that accepts input passed from user

二次信任 提交于 2019-12-04 10:47:36
问题 I created a custom Intent with parameters like so: I've donated it: let intent = PlayIntent() intent.color = color let interaction = INInteraction(intent: intent, response: nil) interaction.donate() and it shows up correctly: However, I'd like an Intent which accepts input from the user. Example, Messages.app: How do I configure my custom Intent to handle input? 回答1: As far as I can tell, this functionality is not available for third-party shortcuts - by which I mean, the shortcuts not

Can I get the measurements for eyes using ARKit 2

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 08:44:38
问题 I am working on a project which requires size of each eye and distance between the eyes using ARKit and True depth Camera on iPhone X with iOS 12 beta 4 on Xcode 10 beta 4. As I am new to ARKit, I am searching the solution online with very little understanding. However, I came across a demo code on apple developer portal. In that code, I tried to fetch the required values. Also referred to the answer by @rickster I worked on ARSCNFaceGeometry and ARFaceAnchor to fetch few values. func update