Search code examples
ionic-frameworkcapacitor

Capacitor did not create 'resources' folder


I am currently building an application using Ionic + Angular, with Capacitor for iOS & Android applications.

As mentioned in the doc, I ran the following command to generate android and iOS platforms to the app:

npx cap add android

and

npx cap add ios

I have observed the project structure of Ionic + Capacitor applications in Github and other resources and they all have this structure:

enter image description here

But the app I have has something else instead.

enter image description here

This does not look like a good practice. Moreover, if I wanted some resources like "Splash Screen" in my application, it will require a resources directory. Is there a way to manage this, so I have all iOS & android related files within the resources directory without breaking the existing application?


Solution

  • Every project have two android as well as IOS folders, one in the root directory which contains the platform data and one in the resources directory which contains the resources for the respective platform. The android and ios folders in the resources folder will be auto generated once you run the generate resources command. The folders you moving manually are the platform folders not the resources folders and they should be kept in the root directory of the project.

    Follow the steps to generate resources