Page 1 of 1

No known instance method for selector 'UserAgent'

Posted: Tue Jul 21, 2020 8:25 pm
by SteveLacy

While trying to build in Xcode, I get the following error message "No known instance method for selector 'UserAgent' CDVFileTransfer.m". I'm using JQM with the latest library version 5.1 and Cordova ios 6.0.0. I did find a suggested workaround here: https://github.com/apache/cordova-plugi ... issues/258 (suggesting removing lines 107 to 110 in CDVFileTransfer.m) but when I implemented the suggested fix, other multiple issues were encountered which prevented me from building the app in Xcode. So I changed it back.

What do you suggest to get this app to build in Xcode?


Re: No known instance method for selector 'UserAgent'

Posted: Thu Jul 23, 2020 9:09 am
by ayakovenko

Have you tried File Transfer plugin version 1.7.1-patch1? You can set in in App Builder -> App Settings -> Cordova Plugins


Re: No known instance method for selector 'UserAgent'

Posted: Thu Jul 23, 2020 4:27 pm
by SteveLacy

when using the File Transfer 1.7.1-patch1, I get 3 errors when building in Xcode:

  • Property 'userAgent' not found on object of type 'CDVViewController' (line 274 in CDVWKWebViewEngine.m)
  • Use of undeclared identifier 'CDVUserAgentUtil' (line 674 in CDVWKWebViewEngine.m)
  • Use of undeclared identifier 'CDVUserAgentUtil' (line 687 in CDVWKWebViewEngine.m)

The following is the list of enabled plugins on my project:

  • Battery
  • Camera
  • Contacts
  • Device
  • File
  • File Transfer
  • Geolocation
  • Globalization
  • InAppBrowser
  • Network Information
  • Notification
  • PushPlugin
  • Splashscreen
  • Vibration
  • cordova-plugin-ionic-webview

Re: No known instance method for selector 'UserAgent'

Posted: Fri Jul 24, 2020 9:18 am
by Evgene Karachevtsev

Hello Steve,

It's hard to say since we don't support xCode. Could you please specify what issue you have when building your project in Appery.io?


Re: No known instance method for selector 'UserAgent'

Posted: Fri Jul 24, 2020 4:38 pm
by SteveLacy

I am expecting that my export from Appery.io to an Xcode project would work within Xcode so that I can publish the app. The export process works OK, but the content that is exported during the process does not work in Xcode. I've been using Appery for years to publish iOS apps. It's not uncommon that there's a problem with the export content. In the past Appery would provide software fixes to their system or workarounds to solve the problems.

This app is a clone of another app that I just released to the Apple App store a week or two ago without an issue. So either Appery (or more likely Apple) implemented a change that has resulted in the app not working within Xcode when building.

I'm expecting Appery to provide an Xcode export that will actually work to release an app on iOS.

Your help is greatly appreciated.

I've shared the project with Appery support. It's called "Carpenters Way Digital Campus".

Thanks,

Steve


Re: No known instance method for selector 'UserAgent'

Posted: Mon Jul 27, 2020 9:34 pm
by SteveLacy

Appery support wasn't able to provide any useful suggestions or identify the issue.

Although until Appery gets things fixed, I found a workaround that allowed me to successfully build in Xcode so we could submit the app for Apple review:

  • in iOS binary, choose Cordova iOS = 5.1.1 (previously we were using 6.0.0)
  • in Cordova plugins, choose InAppBrowser = 3.2 (otherwise external links don't work)

With these options, the Xcode build worked and we were able to submit to Apple for review.

Thanks,

Steve


Re: No known instance method for selector 'UserAgent'

Posted: Thu Aug 06, 2020 3:07 pm
by Serhii Kulibaba

Hello Steve,

What xCode version do you use there?