SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

No known instance method for selector 'UserAgent'

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?

ayakovenko
Posts: 1
Joined: Tue Jul 21, 2020 7:39 am

Re: No known instance method for selector 'UserAgent'

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

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

Re: No known instance method for selector 'UserAgent'

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
Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Re: No known instance method for selector 'UserAgent'

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?

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

Re: No known instance method for selector 'UserAgent'

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

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

Re: No known instance method for selector 'UserAgent'

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Re: No known instance method for selector 'UserAgent'

Hello Steve,

What xCode version do you use there?

Return to “Issues”