Your first iOS app - 43 WKWebView

Just finished “Your First iOS App” and it was amazing. Just a couple problems:
Building project to simulator created the following error when closing out of About:
2019-07-22 09:13:22.097853-0400 BullsEye[8134:1927445] [ProcessSuspension] 0x105af7450 - ProcessAssertion::processAssertionWasInvalidated()

Second (Building to my phone XS Max) hitting the info button. Note - html file does not load:
Could not create a ‘com.apple.iphone.axserver-systemwide’ sandbox extension

2019-07-22 09:30:24.690867-0400 BullsEye[1302:475858] Received an unexpected URL from the web process: ‘file:///var/containers/Bundle/Application/B2381050-6182-48BF-9EE1-282250D4A3BC/BullsEye.app/BullsEye.html’

Received an unexpected URL from the web process: ‘file:///var/containers/Bundle/Application/B2381050-6182-48BF-9EE1-282250D4A3BC/BullsEye.app/BullsEye.html’

2019-07-22 09:30:24.690905-0400 BullsEye[1302:475858] [Process] 0x108809618 - WebPageProxy::Ignoring request to load this main resource because it is outside the sandbox

When closing info page:
2019-07-22 09:31:54.425056-0400 BullsEye[1302:476173] [general] Connection to daemon was invalidated

2019-07-22 09:31:55.255697-0400 BullsEye[1302:475858] [ProcessSuspension] 0x1098e0240 - ProcessAssertion::processAssertionWasInvalidated()

2019-07-22 09:31:55.255894-0400 BullsEye[1302:475858] [ProcessSuspension] 0x1098e0330 - ProcessAssertion::processAssertionWasInvalidated()

2019-07-22 09:32:25.137165-0400 BullsEye[1302:475858] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

2019-07-22 09:32:25.141247-0400 BullsEye[1302:475858] [assertion] Error acquiring assertion: <NSError: 0x28103dad0; domain: RBSAssertionErrorDomain; code: 2; reason: “Specified target process does not exist”>

@fredraynaud Do you still have issues with this?

I have this Problem also, could you please help me?

The ‘processAssertionWasInvalidated’ comes after the ‘WKWebView’ object is released from memory. Retaining a reference (for example, by reusing the view controller that contains it instead of creating a new one) avoids this warning. Apparently something is trying to communicate with web view and has not been told it has been released.

I can’t help on the other issues, sorry.

Steve. I am having this very problem with my app. I have a simple app that has two views: a list and detail view. In the details view controller, I reference a WKWebView that exists in my storyboard layout for my detail view. Everything runs fine but when I hit the navigational button to go back to the list view from the details view I get this error twice:

[ProcessSuspension] 0x10cef6390 - ProcessAssertion::processAssertionWasInvalidated()

To see what was causing the problem I commented everything out in my details view controller that referenced the webview but the error still showed up. I then removed the webview’s reference from the storyboard to the detail viewcontroller’s variable but the error still showed up when I return from the detail view to the list view. I then removed the webview altogether from the SB and the error went away. I added a brand new webview on the SB without adding any references to it and the error returns. I am not referencing this object anywhere that I can see especially since it is brand new. Is there something that I am supposed to do when I segue back from the details view to the list view that deals specifically with the webview cleanup?

From my own tests, this message only appears when the WKWebView is released from memory. If I keep a reference to the view, I don’t see this message.

Your app sounds very much like the Master-Detail App template in Xcode (one of the options you see when creating a new project). This code keeps a reference to the ‘DetailViewController’ in a property on the main view controller (in its header file).

As long as this reference is kept, the detail view controller is not released. And the detail view controller would have a reference to the WKWebView when that view is added as a subview, so it will not be released as long as the parent view persists.

(In my code I keep the web view as a property, which also retains the web view as long as that view controller persists.)

In any case, I haven’t seen any bad behavior when this message does appear, so the issue appears to be a benign warning rather than an error.

But keeping a reference to the web view (directly as an explicit property, or indirectly by it being an added subview) should keep this message from appearing.

Steve, thank-you very much. I was not familiar with the xCode Master-Details template that you mentioned so I opened it to see how it works and when I segue back and forth it does not create any messages.

The structure of that template is quite a bit different than mine in that it uses a split view → navigator to a Master view in one path. In another path it goes from the split view to a navigator to a detail view. And there is also a segue from the master view to the detail view’s navigator. My App simple goes from a navigator – >master view → detail view.

I believe my problem is with how I am instantiating the detail viewcontroller on the main viewcontroller’s prepare to segue function. Thanks for posting this, at least it gives me a starting point on where to begin debugging.

Steve:

I’m still having issues with this problem. I implemented the suggestions that you recommended and the problem still shows up but just later on in the sequence of events. I Wrote up a post here: https://forums.developer.apple.com/message/392627#392627 describing the situation. I’d appreciate your help as I am not quite sure how to troubleshoot the problem further.

This topic was automatically closed after 166 days. New replies are no longer allowed.

@vancouver Do you still have issues with this?

@broncoscoder Do you still have issues with this?

the Problem of the first app is gone, thank you for asking :slight_smile: but im having a new Problem with the Checkliste app, i posted my question in the Topic “Checklist”. Could you please give me a hint?

Do you have a link for that topic? I may be able to help you out. Thanks!

1 Like

Thank you so much for your Response @bdmoakley . The Problem was solved :)maybe later if i have question i will ask again :slight_smile:

1 Like

@vancouver would you please share what you have done to resolve the issue?
this is happening to my app too.

@omidian Do you still have issues with this?

@shogunkaramazov
yes, the problem is still there.

Hi @omidian, could you share with us what your current issue is? I wasn’t able to gather the information from this thread.