I have an ionic application in iOS, where we are presenting a native screen and calling a webservice there. after getting response from server we are sending response again to ionic screen and dismissing the native screen.
But the callback is not working getting
WARN: Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
this.nativewebview.nativeMethod({}).subscribe((result) => {
console.log('SUCCESS API CALL FROM NATIVE ------ >>>>> ');
this.handleCloseWebView();
}, (err) => {
console.log(err);
});
And iOS code is
- (void)nativeMethod:(CDVInvokedUrlCommand*)command {
[self apiCall command:command];
}
-(void)apiCall command:(CDVInvokedUrlCommand*)wsCommand {
[webViewController callCheckoutWebService completionHandler:^(NSString * _Nullable result) {
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:result];
[self.commandDelegate sendPluginResult:pluginResult callbackId:wsCommand.callbackId];
NSLog(@"=======1");
}];
}
can anyone tell me what might be the issue?