When attempting to build for ios, the xcode workspace that capacitor outputs is empty
I was able to reproduce it with the starter template, so I get the impression something is missing from my setup.
What might I be missing from my installation?
Thanks in advance.
Reproduction:
#with angular and capacitor
ionic start
<snip>
XXXX@XXXXs-Mac-mini test % ionic cap build ios
> npm i -E @capacitor/[email protected]
added 1 package, and audited 1275 packages in 1s
223 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> capacitor add ios
[capacitor] ✔ Adding native Xcode project in ios in 11.46ms
[capacitor] ✔ add in 11.58ms
[capacitor] [warn] sync could not run--missing www directory.
[capacitor] [success] ios platform added!
[capacitor] Follow the Developer Workflow guide to get building:
[capacitor] https://capacitorjs.com/docs/basics/workflow
> ng run app:build
Would you like to share pseudonymous usage data about this project with the Angular Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy. For more
details and how to change this setting, see https://angular.dev/cli/analytics.
No
Global setting: not set
Local setting: disabled
Effective status: disabled
✔ Browser application bundle generation complete.
✔ Copying assets complete.
⠋ Generating index html...20 rules skipped due to selector errors:
:host-context([dir=rtl]) .ion-float-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-sm-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-sm-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-sm-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-sm-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-md-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-md-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-md-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-md-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-lg-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-lg-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-lg-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-lg-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-xl-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-xl-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-xl-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-xl-end:dir(rtl) -> Unknown pseudo-class :dir
✔ Index html generation complete.
Initial chunk files | Names | Raw size | Estimated transfer size
main.931aa13acf295be3.js | main | 564.02 kB | 133.91 kB
polyfills.f588b3ff12db8167.js | polyfills | 34.61 kB | 11.21 kB
styles.d2b228d0a7e34779.css | styles | 28.79 kB | 4.43 kB
runtime.e0695bcb5a8f90bb.js | runtime | 2.92 kB | 1.42 kB
| Initial total | 630.35 kB | 150.98 kB
Lazy chunk files | Names | Raw size | Estimated transfer size
699.2aebcd5be8f69b5f.js | ios-transition-js | 10.68 kB | 2.73 kB
402.b0c72a21534680e5.js | input-shims-js | 5.04 kB | 1.91 kB
180.8333632402dc7de0.js | shadow-css-js | 4.60 kB | 1.96 kB
154.a78c73c12e838891.js | folder-folder-page | 1.76 kB | 784 bytes
338.12fcf3e57ead2a20.js | index9-js | 1.65 kB | 756 bytes
179.9fa9a4cb4886d094.js | md-transition-js | 1.07 kB | 486 bytes
499.dee85932469231d0.js | swipe-back-js | 730 bytes | 455 bytes
631.efee619f6baec671.js | status-tap-js | 530 bytes | 332 bytes
Build at: 2024-06-06T14:43:55.952Z - Hash: 64d7d68558168692 - Time: 8564ms
> capacitor sync ios
[capacitor] ✔ Copying web assets from www to ios/App/App/public in 4.81ms
[capacitor] ✔ Creating capacitor.config.json in ios/App/App in 454.83μs
[capacitor] ✔ copy ios in 26.84ms
[capacitor] ✔ Updating iOS plugins in 1.98ms
[capacitor] [warn] Skipping pod install because CocoaPods is not installed
[capacitor] ✔ Updating iOS native dependencies with pod install in 2.29s
[capacitor] [info] Found 4 Capacitor plugins for ios:
[capacitor] @capacitor/[email protected]
[capacitor] @capacitor/[email protected]
[capacitor] @capacitor/[email protected]
[capacitor] @capacitor/[email protected]
[capacitor] ✔ update ios in 2.31s
[capacitor] [info] Sync finished in 2.485s
[INFO] Ready for use in your Native IDE!
To continue, build your project using Xcode!
> capacitor open ios
[capacitor] ✔ Opening the Xcode workspace... in 3.00s
.. Which opens an empty code window (originally included a screenshot, but was flagged as spam)
I would expect the project to not be empty – or is the project hiding behind a button I’ve missed?
The fact that ionic serve
works fine, and I can build the android app on a windows machine, makes me think its a Capacitor installation issue. It seems as though something is missing, but it is not causing an error.
If I try ionic cap run ios
, it errors out:
? Which device would you like to target? XXXXXXXX’s iPhone (XXXX-XXXX)
> ng run app:build
✔ Browser application bundle generation complete.
✔ Copying assets complete.
⠋ Generating index html...20 rules skipped due to selector errors:
:host-context([dir=rtl]) .ion-float-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-sm-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-sm-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-sm-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-sm-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-md-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-md-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-md-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-md-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-lg-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-lg-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-lg-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-lg-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-xl-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-xl-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-xl-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-xl-end:dir(rtl) -> Unknown pseudo-class :dir
✔ Index html generation complete.
Initial chunk files | Names | Raw size | Estimated transfer size
main.cd3749f4d491a7e7.js | main | 429.19 kB | 111.92 kB
polyfills.e9ea84778c1ce49f.js | polyfills | 34.61 kB | 11.18 kB
styles.d2b228d0a7e34779.css | styles | 28.79 kB | 4.43 kB
runtime.e4a07441849f82c1.js | runtime | 4.66 kB | 2.24 kB
| Initial total | 497.25 kB | 129.76 kB
Lazy chunk files | Names | Raw size | Estimated transfer size
polyfills-core-js.c76198334f717402.js | polyfills-core-js | 94.03 kB | 28.56 kB
2885.4d2a88f67c3daa25.js | - | 73.73 kB | 14.06 kB
3506.151869de32bc0602.js | - | 55.68 kB | 7.38 kB
2348.df35a54ea763d47b.js | - | 47.09 kB | 5.71 kB
7720.0c4f80c9090b5491.js | - | 41.80 kB | 9.39 kB
9344.e564adef1ead568f.js | - | 41.08 kB | 5.71 kB
7076.71a45190e5ca65bb.js | - | 38.45 kB | 6.88 kB
5222.b0018640841e9b69.js | - | 35.56 kB | 6.48 kB
4591.dac479045434cfa6.js | - | 28.50 kB | 5.72 kB
8477.94ab00063aa5ec3a.js | - | 28.23 kB | 5.56 kB
2560.f3af57781552ab9c.js | - | 27.97 kB | 5.27 kB
441.b08be8572ea81ea8.js | - | 27.09 kB | 6.89 kB
5197.c8159d0c56fe4686.js | - | 24.67 kB | 5.19 kB
8193.4686fb519743c3b3.js | - | 24.39 kB | 4.45 kB
2075.c99d84c79750f8c6.js | - | 24.18 kB | 5.28 kB
6433.283025559f3e4621.js | - | 24.17 kB | 6.04 kB
8814.84861689a28e98b3.js | - | 23.18 kB | 4.40 kB
4463.15203300b5752e0c.js | - | 22.29 kB | 3.87 kB
5949.9af9b6b68c667bbd.js | - | 20.80 kB | 4.18 kB
3814.18c75518c5dfa4d5.js | - | 20.78 kB | 3.60 kB
2415.8c764efc36b1a3bd.js | - | 20.14 kB | 5.08 kB
9977.492ed6ae52958bba.js | - | 19.56 kB | 1.99 kB
common.23cdf9c1f8129c33.js | common | 19.34 kB | 5.65 kB
4406.f13eb57dfa54b4b5.js | - | 19.07 kB | 3.40 kB
polyfills-dom.bf542500b6fca113.js | polyfills-dom | 18.48 kB | 5.16 kB
8066.cca74157a7d3159e.js | - | 16.70 kB | 3.27 kB
8314.067fca1446119965.js | - | 15.03 kB | 3.14 kB
3511.011b09b874390d2a.js | - | 14.59 kB | 2.61 kB
1293.19d706934eb20a5d.js | - | 13.62 kB | 4.41 kB
3162.184c2e0f43619292.js | - | 12.34 kB | 2.50 kB
5712.a2b67e6c20f1ba42.js | - | 12.28 kB | 3.91 kB
2375.d98c7e363642bf7e.js | - | 11.85 kB | 3.05 kB
8584.edc1aeb25901c924.js | - | 11.85 kB | 2.43 kB
8970.5f01546d88727a72.js | - | 11.81 kB | 4.06 kB
4699.01733b3942afbe92.js | ios-transition-js | 10.68 kB | 2.73 kB
6840.58fb2f6fecf85bad.js | - | 10.40 kB | 2.31 kB
7372.132ec8a5f49c774a.js | - | 10.03 kB | 2.69 kB
1459.5c52b82b749976fe.js | - | 9.78 kB | 3.15 kB
5100.7325a2fea8c9ca68.js | - | 9.10 kB | 1.53 kB
6024.817db4a6403159b5.js | - | 7.25 kB | 1.36 kB
7428.644e4cf6591c50d4.js | - | 7.22 kB | 2.19 kB
8805.20c9d6bae94f64e4.js | - | 6.42 kB | 1.61 kB
4171.65fbebc623446b43.js | - | 6.23 kB | 1.57 kB
7030.45c951ea18a051db.js | - | 5.68 kB | 2.04 kB
2144.5d46fa3641b801f2.js | ios-transition-js | 5.34 kB | 2.08 kB
8361.7e5cb10827031736.js | input-shims-0314bbe5-js | 5.04 kB | 1.92 kB
1102.b0121cda4634f5e8.js | - | 4.27 kB | 1.53 kB
1049.76e2f5e018023be2.js | - | 4.24 kB | 1.18 kB
5887.381ea1161fe70cf6.js | - | 3.37 kB | 1.14 kB
964.07b092bfa76bc577.js | - | 3.17 kB | 970 bytes
9013.1c394b8b968d9a4e.js | - | 2.88 kB | 1.09 kB
6521.f99840daed981dcc.js | - | 2.29 kB | 1.11 kB
8812.844be1102ff8cb0f.js | folder-folder-module | 2.10 kB | 869 bytes
4183.cbd9d594123025e1.js | - | 1.85 kB | 761 bytes
7356.911eacb1ce959b5e.js | index-79b30591-js | 1.65 kB | 753 bytes
7240.b0497cce3164f1bf.js | - | 1.44 kB | 507 bytes
1577.02de3d75ee505163.js | - | 1.14 kB | 637 bytes
7179.80391eb100990080.js | md-transition-js | 1.07 kB | 488 bytes
9057.b337ccee4398fd8f.js | status-tap-53150009-js | 528 bytes | 330 bytes
Build at: 2024-06-06T16:23:12.008Z - Hash: 045523d39da968a2 - Time: 2142ms
> capacitor run ios --target XXXX-XXXX
[capacitor] ✔ Copying web assets from www to ios/App/App/public in 231.03ms
[capacitor] ✔ Creating capacitor.config.json in ios/App/App in 1.25ms
[capacitor] [info] Inlining sourcemaps
[capacitor] ✔ copy ios in 261.11ms
[capacitor] ✔ Updating iOS plugins in 2.36ms
[capacitor] [warn] Skipping pod install because CocoaPods is not installed
[capacitor] ✔ Updating iOS native dependencies with pod install in 696.90ms
[capacitor] [info] Found 4 Capacitor plugins for ios:
[capacitor] @capacitor/[email protected]
[capacitor] @capacitor/[email protected]
[capacitor] @capacitor/[email protected]
[capacitor] @capacitor/[email protected]
[capacitor] ✔ update ios in 716.42ms
[capacitor] ✖ Running xcodebuild - failed!
[capacitor] [error] Command line invocation:
[capacitor] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace App.xcworkspace -scheme App -configuration Debug -destination id=XXXX-XXXX -derivedDataPath /Users/XXXX/Documents/git_repos/test/ios/DerivedData/XXXX-XXXX
[capacitor]
[capacitor] User defaults from command line:
[capacitor] IDEDerivedDataPathOverride = /Users/XXXX/Documents/git_repos/test/ios/DerivedData/XXXX-XXXX
[capacitor] IDEPackageSupportUseBuiltinSCM = YES
[capacitor]
[capacitor] 2024-06-06 17:23:13.823 xcodebuild[20496:197702] Writing error result bundle to /var/folders/n0/5ynq2fzj05gcqq1bgvfbp0rc0000gn/T/ResultBundle_2024-06-06_17-23-0013.xcresult
[capacitor] xcodebuild: error: The workspace named "App" does not contain a scheme named "App". The "-list" option can be used to find the names of the schemes in the workspace.
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.
capacitor run ios --target XXXX-XXXX exited with exit code 1.
Other info:
Code is running on a new Mac mini
Xcode v15.3
macOS Sonoma 14.5
ionic info
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package.json'
Require stack:
- /Users/XXXX/.nvm/versions/node/v22.2.0/lib/node_modules/@ionic/cli/lib/project/index.js
- /Users/XXXX/.nvm/versions/node/v22.2.0/lib/node_modules/@ionic/cli/lib/index.js
- /Users/XXXX/.nvm/versions/node/v22.2.0/lib/node_modules/@ionic/cli/index.js
- /Users/XXXX/.nvm/versions/node/v22.2.0/lib/node_modules/@ionic/cli/bin/ionic
Ionic:
Ionic CLI : 7.2.0 (/Users/XXXX/.nvm/versions/node/v22.2.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.2.1
@angular-devkit/build-angular : 18.0.3
@angular-devkit/schematics : 18.0.3
@angular/cli : 18.0.3
@ionic/angular-toolkit : 11.0.1
Capacitor:
Capacitor CLI : 6.0.0
@capacitor/android : not installed
@capacitor/core : 6.0.0
@capacitor/ios : 6.0.0
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v22.2.0 (/Users/XXXX/.nvm/versions/node/v22.2.0/bin/node)
npm : 10.7.0
OS : macOS Unknown
Again, Thanks in Advance
user25454505 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.