ioscocos2d-html5

iOS app loads html , can I change the url prefix


I just took over the company's app, the app needs to load html to play a cocos2d-html5 game. Loading the index.html and the url prefix of index.html is file:///, but the code contains a judgment, if the url prefix contains negame:// then some methods can response, so can I change the prefix into negame://


Solution

  • the question is not a question, because i mistook that the prefix url of index.html need to change into 'negame://',actually, There are a lot of buttons in the game, clicking on the buttons will pass the url, some of the urls contain 'negame://'...