Post

Replies

Boosts

Views

Activity

PDF in WKWebview Disappears when Switching Tabs
I've run into an issue where a PDF that is correctly rendered disappears when switching to a different tab and then back to the original controller. The issue is easily reproducible using Xcode 10.1's Tabbed App template. I created a project using this template, and then placed the following code in SecondViewController (after removing the default subviews added by the template):import UIKit import WebKit class SecondViewController: UIViewController { private lazy var webView: WKWebView = { let view = WKWebView() view.translatesAutoresizingMaskIntoConstraints = false return view }() override func viewDidLoad() { super.viewDidLoad() view.addSubview(webView) webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true webView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true webView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true webView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true let url = URL(string: "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf")! webView.load(URLRequest(url: url)) } }When launching the app and switching to the second tab, the PDF renders correctly. Then, after switching back to the first tab and then back to the second it shows just a gray background with no PDF content. You can still scroll through the document and it will show page numbers, etc. But no content.Any help or suggestions would be appreciated.
9
1
5.3k
Mar ’19
Siri Custom Intent Parameters
Simple question. I know this has been asked before but the iOS 14/2020 WWDC videos seem to imply things have changed. I want a Siri intent to gather a parameter via voice for me. The generalized use case is that I want Siri to understand a command and pass me the trailing parameters. E.g.: "Hey Siri, create new task 'My Task'" I want this to invoke an intent and pass the "My Task" (string) parameter value to my handler. I know previously this was not possible. But the WWDC 2020 example projects (e.g. Recipe Assistant) seem to imply parameters can be passed via voice. However, nothing I do will enable Siri to pass me a parameter from the voice command. When creating a shortcut for this intent there are obvious placeholders for variables- but they are not recognized. Is this still not possible? Siri already translates trailing parameters to text. Siri shows it when trying to search. Is it really true this translation will not be passed when attempting to invoke an intent- still? Or am I simply missing something? I hope so.
0
0
582
Oct ’20
Auto Renewing Subscription & Sandbox Testing in iOS 14
I'm attempting to utilize the new sandbox testing announced 9/9/2020. I'm most interested in the ability to test cancellation, renewal, etc of an auto renewing subscription by following the instructions here: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox But a number of things don't jive: The documentation indicates there should be a Sandbox Account section on the device in Settings > Apple ID, iCloud, iTunes & App Store. This is not the case for me. I simply don't have that section. I do, however, have a Sandbox Account section in Settings > App Store. I can successfully sign in my sandbox account here. I'm able to then make sandbox purchases just fine. But, when I tap on the sandbox account I get the option to Manage it. I would expect this is where I could test cancellation, resubscribing, etc. But all it does is present a page that says "Cannot Connect" with a Retry button. One thing I'm unclear about is whether I should verify the sandbox testing account I created. Apple sent an email asking me to, but I'm afraid if I sign in at id.apple.com it will disable the sandbox features. I'm running the app via Xcode 12 beta 6. My test device is running iOS 14 beta (18A5373a). The instructions seem straightforward. But I feel like I've missed something simple as I cannot find other folks reporting the same issue after the announcement that this is available. Any help would be appreciated as the cancellation, renewal, etc process has been a black box to develope against until now.
2
0
827
Sep ’20