Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Monaca Localkit iOS project and iOS Simulator
@ales_stritesky, the suggestion that @Fran-Diox gave you it’s correct and it should not break anything I’m aware of. The thing is that Monaca uses its own version of ios platform, which cannot be imported/exported. This means that, while working with Localkit, you cannot have access to Monaca’s ios platform file, so you need to add your own local ios platform with ‘monaca platform add ios’. It will just be used locally and will never overwrite the one used in Monaca IDE.
Regarding Localkit inspector, you are right, it will just allow you to inspect one app per time. Another solution would be to make your app run on the debugger and inspect it with the Safari’s inspector.
Hope it helps!
One more thing, if you want to add Monaca’s exact version, execute
monaca platform add email@example.com
Thanks for the answers, @Andi.
So, removing and re-adding iOS platform via Monaca Cli, i shouldn’t “break” anything, but one doubt remains: doing this, can i use always all Monaca functionalities?
When you say “It will just be used locally and will never overwrite the one used in Monaca IDE”, i don’t understand if this can break the integration with Monaca settings (i think at config.xml, adding plugins, etc).
Is there a difference with working at the same project without that passage (removing and re-adding a platform locally), in terms of “final result”?
More clearly, i don’t understand if that working with the two methods (“standard Monaca Localkit way” and “my way” ^^) can give different results and the second can create potential problems to the final app.
I’m sorry to bother you all ^^
Thanks for the patience!
In terms of final result, there should not be any issue. Worst case, if there is any issue, you can simply copy the platform folder from a new project and paste it into the old project. :)
Hi @Andi , i really appreciate your support.
I was testing that solution, and ios emulation works, but when i launch “Build Settings” from Monaca Localkit, it gives me a reading information error, i think because it can’t find Monaca platform files, in platforms/ios, overwritten by local platform ones.
Can it cause problems in adding plugins and media resources (icons/splash screens)?
@AlesSper can you post the build log? I’ll also make an attempt to see if there is any issue (already tried with Android, it seems working fine)
Just tried to perform the operation also with iOS and it worked well. Here is what I did:
- Created a blank project with CLI
- Built the app in iOS debug mode -> successfully built
- Removed the platform using
monaca platform rm ios
- Added the platform using
monaca platform add ios
- Built again the app in iOS debug mode -> successfully built
Probably your issue is related to something else.
@Andi , this was my workflow:
created a project from a Monaca Localkit template (Onsen UI Minimum Template)
removed iOS platform using Monaca CLI command: monaca platform rm ios
added iOS platform using CLI command: monaca platform add ios
launched Monaca Localkit “Build Settings” for adding some plugins and changing some settings, but a popup appeared with an “Error reading setting” message
@AlesSper I just tried to replicate your procedure and I encountered the same error. Nevertheless, if I try to build with CLI instead of Localkit, it builds without problems. This probably happens due to some changes that have been implemented in the latest version of
monaca-lib, which is available in the latest CLI version but is absent in Localkit 1.2.8
I suggest you to use CLI for now as there isn’t an ETA for a new localkit release.
Hi @Andi, thanks for testing and letting me know.
So, i can use monaca CLI commands to create a project (from templates) and i can remove/adding ios platform in order to emulate it in iOS simulator. But doing so, can i still import the project in Monaca Localkit, and then using all its features (adding plugins, graphic resources, certs, etc in remote “Build Settings”), or i have to do all by CLI?
tfutada last edited by
I am not 100% sure what your problem is, but this might help.
This works with our project.
First off, create a Cordova project, on top of that,
Replace www folder and config.xml with your Monaca ones.
Under the Cordova project,
$ rm -rf www $ ln -s $(your_monaca_project)/www www $ cp $(your_monaca_project)/config.xml . $ cordova build
Note that UIWebView needs to be replaced with WKWebView.
$ cordova plugin add https://github.com/apache/cordova-plugin-wkwebview-engine.git\#1.0.0
add other Cordova plugins if you use.