Issue
When running cordova build ios
on my ionic project, I received this error:
xcodebuild: Command failed with exit code 65
I've tried this solution: Ionic ios build fails, error archive not found
And this: https://forum.ionicframework.com/t/build-ios-error-code-65/120058
And this: https://github.com/apache/cordova-ios/issues/407
But nothing seems to work. I am running Ionic 5 with Angular 9. I am on a Macbook Pro Mojave 10.14.6 and Xcode 11.3.1.
Any help would be greatly appreciated. Also, this was returned to me in yellow during the build: "No simulator found for ". Falling back to the default target."
Update:
People have asked for a full log of the error, so I ran cordova build ios --verbose
:
NUS12256-9-darhart:status-app darhart$ cordova build ios --verbose
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform ios
Checking for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
Generating platform-specific config.xml from defaults for iOS at /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/MyApp/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
Current launch storyboard CDVLaunchScreen
Not changing launch storyboard setting in info plist.
Wrote out iOS Bundle Version "0.0.1" to /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/MyApp/MyApp-Info.plist
No need to update build settings for launch storyboard support.
Set IPHONEOS_DEPLOYMENT_TARGET to "11.0".
Did not update build settings for launch storyboard support.
iOS Product Name has not changed (still "MyApp")
Updating icons at platforms/ios/MyApp/Images.xcassets/AppIcon.appiconset/
Updating splash screens at platforms/ios/MyApp/Images.xcassets/LaunchImage.launchimage/
Updating launch storyboard images at platforms/ios/MyApp/Images.xcassets/LaunchStoryboard.imageset/
Updating Storyboard image set contents.json
This app does not have additional resource files defined
Prepared iOS project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
No simulator found for ". Falling back to the default target.
Building for "iPhone 11 Pro Max" Simulator (com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro-Max, iPhone-11-Pro-Max).
Building project: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/MyApp.xcworkspace
Configuration: Debug
Platform: emulator
Target: iPhone 11 Pro Max
Running command: xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Debug -sdk iphonesimulator -destination platform=iOS Simulator,name=iPhone 11 Pro Max build CONFIGURATION_BUILD_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/sharedpch
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/emulator
SDKROOT = iphonesimulator13.2
SHARED_PRECOMPS_DIR = /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/sharedpch
note: Using new build system
note: Planning build
note: Constructing build description
error: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/cordova/../pods-debug.xcconfig:2: could not find included file 'Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig' in search paths (in target 'MyApp' from project 'MyApp')
error: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/cordova/../pods-debug.xcconfig:2: could not find included file 'Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig' in search paths (in target 'MyApp' from project 'MyApp')
error: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/cordova/../pods-debug.xcconfig:2: could not find included file 'Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig' in search paths (in target 'MyApp' from project 'MyApp')
** BUILD FAILED **
Command finished with error code 65: xcodebuild -workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/sharedpch
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:311:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
Solution
Use the legacy build system of XCode to build app for iOS.
Open XCode, Go to File-> Workplace Settings-> Change build system to Legacy Build System.
Then you can run your app on iPhone simulator from the XCode itself.
Answered By - Pankaj Sati
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.