# iOS build Archive Failed

**URL:** <https://forum.ionicframework.com/t/ios-build-archive-failed/110429>\
**Category:** ionic-v3\
**Created:** [October 30, 2017, 9:45am UTC](https://forum.ionicframework.com/t/ios-build-archive-failed/110429 "2017-10-30T09:45:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimitri320](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/dimitri320/32/116022_2.png) [@dimitri320](https://forum.ionicframework.com/u/dimitri320)\
**Post date:** [October 30, 2017, 9:45am UTC](https://forum.ionicframework.com/t/ios-build-archive-failed/110429/1 "2017-10-30T09:45:57Z")

</div>

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.

```auto
**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!

---

<div class="post-metadata">

**Author:** ![Dlamiman](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dlamiman](https://forum.ionicframework.com/u/Dlamiman)\
**Post date:** [January 22, 2018, 11:23am UTC](https://forum.ionicframework.com/t/ios-build-archive-failed/110429/2 "2018-01-22T11:23:49Z")

</div>

Did you sort this out?

---

<div class="post-metadata">

**Author:** ![Nexi](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nexi/32/117290_2.png) [@Nexi](https://forum.ionicframework.com/u/Nexi)\
**Post date:** [January 22, 2018, 11:40am UTC](https://forum.ionicframework.com/t/ios-build-archive-failed/110429/3 "2018-01-22T11:40:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hesters](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hesters/32/118759_2.png) [@Hesters](https://forum.ionicframework.com/u/Hesters)\
**Post date:** [January 22, 2018, 11:52am UTC](https://forum.ionicframework.com/t/ios-build-archive-failed/110429/4 "2018-01-22T11:52:57Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![Unkn0wn0x](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@Unkn0wn0x](https://forum.ionicframework.com/u/Unkn0wn0x)\
**Post date:** [February 6, 2019, 9:16pm UTC](https://forum.ionicframework.com/t/ios-build-archive-failed/110429/5 "2019-02-06T21:16:32Z")

</div>

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

Hope it helps!
