No known instance method for selector 'userAgent' in CDVFileTransfer.m
See original GitHub issueBug Report
Problem
When building using cordova-ios v6.0.0 an error is thrown saying:
“No known instance method for selector ‘userAgent’ in CDVFileTransfer.m”
What is expected to happen?
iOS build and run without error.
What does actually happen?
Error occurs as above
Information
The error occurs on line 107 of CDVFileTransfer.m":
NSString* userAgent = [self.commandDelegate userAgent];
Command or Code
Create a Cordova v9 project using cordova-ios 6.0.0 platform and version 1.7.1 of cordova-plugin-file-transfer run: cordova build ios
Environment, Platform, Device
Build error occurs using Cordova v9. cordova-ios 6.0.0 cordova-file-transfer-plugin v1.7.1
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 3 years ago
- Reactions:43
- Comments:58 (4 by maintainers)
Top Results From Across the Web
Error in iOS Build with cordova-plugins - Appflow - Ionic Forum
I'm trying to build my app with the latest cordova-ios version 6.1.1 to ... /CDVFileTransfer.m:107:49: no known instance method for selector ...
Read more >[GitHub] [cordova-plugin-file-transfer] sandip7878 commented ...
... on issue #258: No known instance method for selector 'userAgent' in ... By removing lines 107-110 from CDVFileTransfer.m I was able to ......
Read more >Issue with iOS build on meteor version 2.3.6 - help - Meteor forums
... version from 2.0 to 2.3.6, now i am getting below error while building iOS, No known instance method for selector 'userAgent' in...
Read more >No known instance method for selector 'userAgent'
cordova-plugin-file-transfer has been updated to support cordova-ios 6, # but it has not been released yet, so you can only install it from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
By removing lines 107-110 from CDVFileTransfer.m I was able to compile:
Given the plugin is deprecated, is it worth creating a pull request? I’m not sure if anyone is able to merge the pull request if it was created.
I’ve forked this repository and made this change in if it’s of use to anyone:
https://github.com/alssl-ross/cordova-plugin-file-transfer