Sunday, 7 February 2021

Issue when trying to run Ionic Core on Cordova with JavaScript on IOS Simulator

I have decided to use Ionic Core due to the fact of me not needing to use Frameworks like Vue, Angular and React.

I have created a project using Cordova and installed @ionic/core with npm to create the files that would otherwise use a CDN.

However, I have included them into my index.html application with an h1 tag saying Hello World, this does not appear on the IOS Simulator using XCode. I do not get any error messages, it just shows a blank white screen.

This leads me to believe that this could be due to me not initialising the Ionic Core javascript file.

Here is my index.html file:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="module" src="core/dist/ionic/ionic.esm.js"></script>
    <script nomodule src="core/dist/ionic/ionic.js"></script>
    <link href="core/css/ionic.bundle.css" rel="stylesheet">
</head>

<body>
    <h1>Hello World</h1>
</body>

</html>

Here is my project directory shown using VSCode:

Project Directory

No errors are shown on XCode nor on the Cordova side of things when launching it with cordova run ios

I cannot launch with Ionic as I am only using the Javascript files not the actual CLI



from Issue when trying to run Ionic Core on Cordova with JavaScript on IOS Simulator

No comments:

Post a Comment