Answer the question
In order to leave comments, you need to log in
How to fix gap_init:3 error when building on ios?
Hello!
When building a project on android, there are no problems, but when you build the same project on ios, 3 prompts fly out with messages:
1) gap_init:3
2) gap:[null,"CoreAndroid","messageChannel","CoreAndroid569204053" ]
3) gap:[null,"CoreAndroid","show","CoreAndroid569204054"]
As for my project and config.xml:
I specify where to get static for the application and instead of taking it from the www folder, it is taken from me with S3 AWS <content src="https://mydomen.com/" />
and <allow-navigation href="https://mydomen.com/*" />
I won’t bore you why it’s done this way, I’ll just say that in order for the statics to be loaded without a server, you need to rewrite the entire project, and it’s also written in angular.js with a terrible routing implementation.
I looked at the cordova.js file, which is included in index.html, and found out where these prompt messages come from.
This is the first message, line: 1002
androidExec.init = function() {
bridgeSecret = +prompt('', 'gap_init:' + nativeToJsBridgeMode);
channel.onNativeReady.fire();
};
module.exports = {
exec: function(bridgeSecret, service, action, callbackId, argsJson) {
return prompt(argsJson, 'gap:'+JSON.stringify([bridgeSecret, service, action, callbackId]));
},
setNativeToJsBridgeMode: function(bridgeSecret, value) {
prompt(value, 'gap_bridge_mode:' + bridgeSecret);
},
retrieveJsMessages: function(bridgeSecret, fromOnlineEvent) {
return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret);
}
};
Answer the question
In order to leave comments, you need to log in
The solution turned out to be simple, the cordova.js file that I kept on AWS S3 was configured for android, I had to make a separate bucket with one more static but with cordova.js for iOS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question