Closed theneverstill closed 8 years ago
My guess is this has to do with ionic calling .xcodeproj instead of .xcworkspace.
If I leave an emulate command running (despite the above error), then fire up the emulator via Xcode using the .xcworkspace, it works fine and will connect with the command line / emulator control.
You are right. It's an issue with Cordova. Let me look into what if anything I can do about this.
Possible solution: https://gist.github.com/jcayzac/9522678
Mainly referring to the last chunk:
# Fix cordova's scripts to use the workspace instead of the project
Yeah, that was the right idea.. just need to make a few adjustments based on cordova version.
In file build.js [platforms/ios/cordova/lib/build.js], function getXcodeArgs change (in both device and emulator block):
'-project', projectName + '.xcodeproj',
to '-workspace', projectName + '.xcworkspace',
'-target', projectName,
to '-scheme', projectName,
Can you make this into a (node, not shell) hook that changes the appropriate lines in build.js?
Should be working now.
xcodebuild: error: The workspace named "appName" does not contain a scheme named "appName". The "-list" option can be used to find the names of the schemes in the workspace.
Okay, to get it working based on your latest changes, I replaced all ".xcodeproj" with ".xcworkspace" and that worked.
In the build.js? Had you modified the file already? On Jul 20, 2016 10:05 PM, "Lucas Still" notifications@github.com wrote:
Okay, to get it working based on your latest changes, I replaced all ".xcodeproj" with ".xcworkspace" and that worked.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/blakgeek/cordova-plugin-cocoapod-support/issues/2#issuecomment-234137065, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyU3imbyHccVzJHwtO3sG7fQAHBXqLJks5qXtP4gaJpZM4JRPmw .
I updated to your latest version (which made the two changes noted previously to build.js), but that unfortunately resulted in the aforementioned new error. In addition to your two changes, I did a find/replace in build.js to replace all occurrences of ".xcodeproj" with ".xcworkspace" and that fixed the build.
Ok. Let me test with Ionic and see if it uses a different build.js. What version of Ionic are you using?
On Wed, Jul 20, 2016 at 10:27 PM, Lucas Still notifications@github.com wrote:
I updated to your latest version (which made the two changes noted previously to build.js), but that unfortunately resulted in the aforementioned new error. On top of your two changes, I did a find/replaces in build.js to replace all occurrences of ".xcodeproj" with ".xcworkspace" and that fixed the build.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/blakgeek/cordova-plugin-cocoapod-support/issues/2#issuecomment-234139617, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyU3npdWk_jWw3IzjRwOnbsIZ1mTqjVks5qXtkDgaJpZM4JRPmw .
Want to waste some time or challenge your mental skills? Check out my games on www.bggamecentral.com or download them from the App Stores https://itunes.apple.com/us/artist/henry-lawton/id895605107 [image: https://play.google.com/store/search?q=pub:BG%20Games&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1] https://play.google.com/store/search?q=pub:BG%20Games&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1 Get it on Google https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png
node: v6.2.0 cordova: 6.2.0 ionic: 2.0.0-beta.32
And what version of the iOS platform?
4.1.1
@theneverstill Would you mind trying the latest version of the plugin? It should work completely out of the box now.
That did it - thanks!!
Hmm.. now it seems like the first build never actually completes (I didn't discover this until I reset my platforms and plugins). The build "finishes", ie the command stops without any noticeable errors, but it doesn't say that the build was completely. Also the simulator never launches. However, if I immediately re-run the command, the build launches fine.
@theneverstill I found the issue. I needed to return a promise because part of the plugin's execution was async. It's fixed in the latest release.
All subsequent build attempts are failing for me, requiring a wipe of platforms/plugins directories before a new build will succeed. The error:
E.g.
ionic state restore
ionic build ios
ionic build ios