I’m going through the tutorial for building an Ionic Angular app. Everything works as expected on web & on Android. On iOS, the app builds successfully, but when it runs, it opens up and instantly closes, with the following output:
ERROR: Unable to load public/index.html
⚡️ This file is the root of your web app and must exist before
⚡️ Capacitor can run. Ensure you've run capacitor copy at least
⚡️ or, if embedding, that this directory exists as a resource directory.
I’ve tried running ionic cap copy
and restarting Xcode, as well as cleaning out the Dervied Data folder. I can confirm that there is in fact a public/index.html
file in the root of the project, as well as in the iOS project folder. However, the behavior when running the app remains the same.
Current system info:
OS: Catalina 10.15.7
XCode: 12.2
Node: 12.16.1
Ionic: 6.12.2
Let me know if I can provide any other useful info. Thanks!