VoltBuilder Error 'Cordova/CDVUserAgentUtil.h'

I’m getting the following error from Volt Builder trying to compile adhoc for iOS:

fatal error: ‘Cordova/CDVUserAgentUtil.h’ file not found
reset_keychain
Output:
Build c85d9af4-2440-45be-9734-639f82a78ee2 failed

No errors when running in Chrome. Just Volt Builder. Nothing has changed in the app prior to AS 8.2.1.1. other than adding the ‘cordova-plugin-inappbrowser" source=“npm” spec=“3.2.0”’ plugin. Could this be causing the error?

This message is being returned by Cordova - it isn’t coming from VoltBuilder itself.

One of the big changes VoltBuilder brought in was using the up to date Cordova and SDK libraries. PhoneGap’s were getting so old that they didn’t qualify for Android and iOS stores.

This caused changes to a number of plugins. You might to check with the maintainers of the plugin to see if they can help.

Ok, thanks. I’ll check with the devs about the InAppBrowser plugin.

Does anyone know of a better way to open a url in a separate browser/window instead of the inside the app itself?

Still getting this same Volt Builder error with one of our other apps now where nothing has changed at all. They both use the InAppBrowser plugin and were compiling fine in 8.1… Now with AppStudio 8.2. we’re getting this Volt Builder error. We’re trying to re-compile the apps to be in compliance with Apple’s WKWebView standard. No code changes have been made in the apps. Just opened, and sent to Volt Builder.

Can someone shed some light on what has changed in from 8.1. to 8.2 that might cause Cordova to throw this error? From doing some research, the InAppBrowser plugin should be working as it did before with the latest version of cordova.

Have you considered using (in Javascript): window.open(‘your url’, flags). Leaving out the flags opens a new window with the content and brings it forward on all devices I’ve tried.

Thanks Gary but on iOS that opens a web page in the same window (no way to get back to the app). And that is with no flags assigned. It works right on Android.

Tested the safariviewcontroller to replace the InAppBrowser but that shuts down the app completely when trying to open a web page.
If you got this working on iOS, in your example, did you assign a null value to ‘flags’?

I’m using an iPad 13 with iOS 13.5.1 and Chrome 84.0 and it opens a new tab in the same window (I stated a new window incorrectly above). I just found a coding error where I was opening two tabs yesterday, so I’m sure on how this works for me.

But I’m wondering if it’s because I’m running as a web app, not an iOS app.

Web apps are going to work completely differently than compiled .ipa apps in this regard.

SOLVED on iOS:
Ok, found a solution that works on iOS using the safariviewcontroller plugin. The sample function provided for the safariviewcontroller was missing a parameter that causes the app to crash. If you don’t pass the parameter ‘controlTintColor’, it is sent as null and shuts down the app completely.

Want a “Quit” feature in your app? This is one way to do it :wink:

On a sidenote: I believe that the InAppBrowser plugin no longer works because it does not use the new WKWebView but still uses UIWebView. I’m guessing here but that might be why it was compiling in an earlier version of Volt Builder.

Here’s the latest on inappbrowser from the Cordova team:

Thanks George. Apparently pulling from source=“npm” without a version reference does not pull the latest release, i.e. 4.0.0. Version 3.2.x was the only version I was able to find and assumed it was the latest, on npm anyway. Wish I knew about 4.0.0 a few days ago :confused: It would have saved me about 12 adhoc Voltbuilder runs.

Thanks again for finding that. :slight_smile: