-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No known instance method for selector 'userAgent' in CDVFileTransfer.m #258
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Same error with: |
By removing lines 107-110 from CDVFileTransfer.m I was able to compile:
|
Thank you very much, I'll try that. You can no longer publish an app with cordova-ios v5.1.1. |
is there any alternative to this plugin? |
I did go through the process of moving from this plugin to XHR but found that it failed for downloads of large zip files, causing me to revert back to this plugin. I can compile now thanks to @jansc's comment above. I'm wondering if there is any effect on functionality from removing the userAgent lines. I've not been able to test for myself as yet. |
Same error with: I cant not compile with @jansc Solution because Ive got: Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m:27:9: 'Cordova/CDVUserAgentUtil.h' file not found if I delete Lines 107-110 |
That was fixed on the master branch of |
It's working for me. |
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 |
Same issue here. I just comment lane 107-110 and my project could build successfully. |
Although @alssl-ross did a fork removing the lines, I thought about combining @kolbasa 's solution tip into an own fork so that checking still happening: https://github.com/zoopit/cordova-plugin-file-transfer |
Please @alssl-ross create a PR, and hopefully someone with access can merge it in. |
I switched to use this Fork |
After deleting, my network request will not succeed. It seems that userAgent is needed |
I've created a thread on the dev mailing list to discuss the matter with this plugin. It would help us PMC members to understand the reasons why you rely on the plugin (too) and especially the reasons why you can't migrate to the proposed XHR/fetch alternative. |
@timbru31 I have the same issue as @alssl-ross describes. |
@HarelM could you please share this insight with the dev mailing list as requested? I'm pretty sure not all active PMC members and committers are watching this issue. |
@msudol - why don't you contribute to the project versus criticizing it. I am certain everyone would appreciate the effort. |
I made no criticism, only a request. Your comment is cringy, unwarranted, and provides even less contribution than mine. Where is your PR speaking of contributing. |
@msudol - Doesn't sound like a request....reads like a whiny complaint. Just sayin'. Moving along now... |
Please be civil :) I'll remove any other off-topic comments after this one without a warning. Thanks! |
Quick question, on cordova-ios 6.2.0 which by default uses WKWebView, is it only a matter of commenting out those 4 lines of code? Our app uploads video files around 200/300 MB, we are refactoring to WKWebView as per Apple requirements.
|
@mirko77 I'm using this fork. Works for me. https://github.com/sitewaerts/cordova-plugin-file-transfer. I created that fork to merge the fixes from https://github.com/zoopit/cordova-plugin-file-transfer plus the current commits of https://github.com/apache/cordova-plugin-file-transfer |
Thanks, very useful, I will give it a try |
I'm using https://github.com/dpa99c/cordova-plugin-file-transfer for now |
But thats 12 commits behind apache:master. |
still not working on cordova 10 |
@Noext I do not think this repository ever will, try the linked forks |
thankyou, its works with capacitor 3 and last ionic/vue 2021 |
Just a question (I have loose some comments) but these plugins Excuse my ignorance, but if they work... why to install them the command is always the same? I have to do something else? |
To anyone facing this issue this is the only one that worked for me: (add this to dependencies) "cordova-plugin-file-transfer": "https://github.com/dpa99c/cordova-plugin-file-transfer/tarball/446b175154491f67bc04a657041a26bc5db92b30", |
cordova plugin add https://github.com/sitewaerts/cordova-plugin-file-transfer |
it worked for me. Thanks. |
This is again not working. Only the fork worked for me. |
+1 |
you are life saver bro. |
Thanks for the fork, seems to work nicely! :) |
Anyone else notice that the download example in this blog post doesn't actually save the file? You can use cordova-plugin-file to do that like the example here: https://github.com/apache/cordova-plugin-file#write-to-a-file- |
Thank you very much |
|
To anyone confused (like I was) by the above... it seems that running
And running I guess tagging a new release would be pretty great |
I tried to push that forward but failed, there are falling tests that prevent publishing a new version of this package to npm. |
I tried jansc 's solution, but when I type ionic capacitor run ios -l --external, the file goes back to what it was. Changes are reverted. Any idea of why this happens? |
This closes apache#263 apache#258 (cherry picked from commit 64bfd15)
NPM seems to have the current version (2.0.0) now. (From 09/2023.) I don't know if there's any reason to keep using the sitewaerts version (which was a lifesaver!) or anything. |
Bug 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
The text was updated successfully, but these errors were encountered: