Ionic version:
@ionic/vue: 5.4.1
Current behavior:
Can not build ios app based on the Ionic Vue guide here.
Is this issue caused by using Ionic inside Docker?
I'm receiving errors in Xcode stating there are missing pod files. When I attempt to generate the pod files using pod update and install I'm receiving the following error:
No podspec found for `Capacitor` in `../../node_modules/@capacitor/ios`
The node module and podspec both exist.
In Xcode I'm seeing the following error:
Swift Compiler error: No such module 'Capacitor'
Expected behavior:
The project should build without needing to manually generate pod files according to the Ionic guide.
Steps to reproduce:
Download repo below
Install node modules
Build ios project
Build Xcode project
Related code:
Here's the link to the repo:
https://github.com/michaelalhilly/photoly
Other information:
Everything is building with no errors and running in the browser.
Ionic info:
Ionic:
Ionic CLI : 6.12.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 5.4.1
Capacitor:
Capacitor CLI : 2.4.2
@capacitor/core : 2.4.2
Utility:
cordova-res : 0.15.1
native-run : 1.2.2
System:
NodeJS : v12.18.3 (/usr/local/bin/node)
npm : 6.14.6
OS : Linux 4.19 (this is the Docker OS)
macOS: 10.15.7
Here're are the steps I had to take to resolve this issue:
1. Deleted the ios directory to start over
2. ionic build
3. ionic cap add ios
4. ionic cap copy
5. Copy Podfile contents to temp file
6. Navigate to ios/App directory
7. Delete Podfile, Podfile.lock, and Pods directory
8. Switch to mac terminal session (from Docker)
9. pod init (now there's a working pod build, but no Capacitor)
10. pod install
11. Paste Podfile contents back to Podfile
12. pod update (now the Capacitor files have been added)
13. Open ios/App directory in Xcode (didn't realize this was important)
14. Update Signing Team
15. Follow prompts to add recommended changes
16. Connect iPhone and select
17. Build and run project
I think this issue is related to running Ionic in Docker. Since cocaopds is not available in Docker the ionic-cli may not be completing the pods setup, which is understandable.
Additionally, due to lack of experience I was opening the project in Xcode via the ios/App/App.xcodeproj file. However, it seems you have to open the project from the ios/App directory to ensure Xcode can identify the Pods directory.
Everything seems to be working.
If you can please let me know if my understanding is correct or if there is a way to build the project correctly from within Docker.
when you clone a capacitor app, a few folders are not included because they are auto generated, so they are ignored by default
so the steps to be able to build a capacitor apps are
git clone app
npm install
ionic build
ionic cap sync ios
ionic cap open ios
@jcesarmobile Yes. Unfortunately ionic cap open ios can not be run from within Docker. It seems the auto generated files happen within this open process.
Is that correct?
no, they are generated on sync command
Ah I’ll give it a shot. Thx!
Most helpful comment
Here're are the steps I had to take to resolve this issue:
I think this issue is related to running Ionic in Docker. Since cocaopds is not available in Docker the ionic-cli may not be completing the pods setup, which is understandable.
Additionally, due to lack of experience I was opening the project in Xcode via the ios/App/App.xcodeproj file. However, it seems you have to open the project from the ios/App directory to ensure Xcode can identify the Pods directory.
Everything seems to be working.
If you can please let me know if my understanding is correct or if there is a way to build the project correctly from within Docker.