Skip to content

Commit

Permalink
Fix for cordova-ios@6
Browse files Browse the repository at this point in the history
  • Loading branch information
dpa99c committed Jul 15, 2020
1 parent dc8fbd7 commit 446b175
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/ios/CDVFileTransfer.m
Expand Up @@ -104,11 +104,6 @@ - (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLReques
{
[req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];

NSString* userAgent = [self.commandDelegate userAgent];
if (userAgent) {
[req setValue:userAgent forHTTPHeaderField:@"User-Agent"];
}

for (NSString* headerName in headers) {
id value = [headers objectForKey:headerName];
if (!value || (value == [NSNull null])) {
Expand Down

3 comments on commit 446b175

@phusting
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to understand what is different in the above compared to what is erroring. On userAgent I'm getting no known instance. It all looks the same to what I have installed that errors.

@attebury
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix.

@attebury
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to understand what is different in the above compared to what is erroring. On userAgent I'm getting no known instance. It all looks the same to what I have installed that errors.

I think this removes a reference to userAgent that is no longer created by UIWebView. Before using this forked plugin, I had build errors in Xcode. Search brought me here. Deleting the original plugin and using this one resolved the issue for me.

Please sign in to comment.