Build fails for iOS: Undeclared Identifiers
MAOstrander opened this issue · comments
I've got this working just fine for me on Android devices, but I'm unable to build in iOS.
In CordovaHttpPlugin.m it throws the following errors in Xcode:
"Use of undeclared identifier 'manager'" on the lines with ! and
"No visible @interface for 'CordovaHttpPlugin declares the selector 'setRequestHeaders:'" on the line with ?
- (void)post:(CDVInvokedUrlCommand*)command {
! HttpManager *manager = [HttpManager sharedClient];
NSString *url = [command.arguments objectAtIndex:0];
NSDictionary *parameters = [command.arguments objectAtIndex:1];
NSDictionary *headers = [command.arguments objectAtIndex:2];
? [self setRequestHeaders: headers];
CordovaHttpPlugin* __weak weakSelf = self;
! manager.responseSerializer = [TextResponseSerializer serializer];
! [manager POST:url parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
I thought maybe something was wrong with my Xcode, so now I'm on Xcode 8.2.1
If I build in CLI with ionic build ios
I get a failure similar to Issue#96
Same error 👍
how solve it?.
Plugins/cordova-plugin-http2/CordovaHttpPlugin.m:75:4: Use of undeclared identifier 'HttpManager'
Showing Recent Messages
Plugins/cordova-plugin-http2/CordovaHttpPlugin.m:75:17: Use of undeclared identifier 'manager'
Plugins/cordova-plugin-http2/CordovaHttpPlugin.m:79:10: No visible @interface for 'CordovaHttpPlugin' declares the selector 'setRequestHeaders:'
i have fixed this issue on building ios project
please click the link to my github page for checking out new plugin
xiaomiwujiecao/cordova-HTTP: Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!