iOS build Archive Failed

#1

I don’t know what to do, been stuck on this for days. I’m trying to build for ios, and I’m getting this error. I’ve tried to remove and add the platform multiple times, without any result.

** ARCHIVE FAILED **

The following build commands failed:
	Ld /Users/user/Library/Developer/Xcode/DerivedData/app-appdahiizzsdsdsdddoqgtygiuoqxm/Build/Intermediates.noindex/ArchiveIntermediates/app/IntermediateBuildFilesPath/Fishtank.build/Debug-iphoneos/app.build/Objects-normal/arm64/app normal arm64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user/Documents/app/Development/app/platforms/ios/cordova/build-debug.xcconfig,-workspace,app.xcworkspace,-scheme,app,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,app.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/user/Documents/app/Development/app/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/user/Documents/app/Development/app/platforms/ios/build/sharedpch

[ERROR] An error occurred while running cordova build ios (exit code 1).

Here’s my ionic info:

cli packages:

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : ios 4.5.2
Ionic Framework    : ionic-angular 3.7.1

System:

ios-deploy : 1.9.2 
ios-sim    : 5.0.12 
Node       : v7.10.0
npm        : 4.2.0 
OS         : macOS Sierra
Xcode      : Xcode 9.0 Build version 9A235 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

Any advice will be greatly appreciated! Many thanks!

#2

Did you sort this out?

#3

You could try cordova platform update ios. Some people wrote it solved that problem for them.

#4

The lines of code in the error before the message archive failed would be pretty neat to know.

For me the reason this error got displayed, is because I didn’t sign it with my developer account.

Look here https://ionicframework.com/docs/intro/deploying/

I know this says how to deploy, but in order to build ios you need to be on mac, have xcode and sign the project.
You can find the project under /platforms/ios/.xcodeproj

Open this with xcode and then sign it.

1 Like
#5

I fixed this issue by removing the affected platform (in this case iOS) and re-add it again.

Hope it helps!