Archiving project stuck for hours
Asked Answered
L

7

8

Hello My App is already on app store uploaded with same method archive project and upload it , now i have done some little bit changes, so when ever now i archive project it got stuck on some points for hours but not complete

what i have Done

  1. Deleted all derived data
  2. Deleted Archive Projects
  3. Tried with bitcode NO

Xcode 10 not being able to archive project

you can see image that archive stuck here Stuck Image

it was working before and on some other projects also properly no issue, but on this project after updating xcode to 10.2 facing this issue

Lei answered 9/4, 2019 at 6:42 Comment(7)
Can you check the warnings in Xcode 10.2?Outworn
Did you check with older version of Xcode as you said after updating xcode you are facing this issue.Misbehavior
yes these warning are related to podsLei
@Misbehavior but i am using Xcode 10.2 nowLei
Yes I know just want to know this is xcode problem or your project's problemMisbehavior
i need to archive using thisLei
this post solved my problem forums.developer.apple.com/thread/115303Lei
A
7

A bit late to provide an answer but I ran to the same problem today.

Building and installing my app on my device works like a charm, but archiving was a different story. Every time, I was stuck to step 1225 of 1235.

Clean all cash, removing all derived data, even restarting my Mac didn't change a thing.

I finally found the solution that worked for me.

Using CocoaPod, I could solve this issue by moving the Upload DSYM build script phase to the en of the list

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/YourProjectName/Beta/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
# /!\ this script should always be the last one of the list /!\
Adal answered 22/12, 2020 at 9:39 Comment(4)
can you show me please where you put that line of code?Spruce
On your Xcode project target > build phasesAdal
I was struck in a look into trying to archive my builds. This worked for me as well!Rankle
This is such an obscure answer. Not every app has this run script but mine did. I'm glad I came across this without tearing my hair out. Thanks so much!Wachter
F
3

Changing optimization level to "no optimization" for all pods solved it for me.

Select your Pods project and highlight all Targets, go to build settings and search for "optimization level" and set it to "No optimization"

optimization level

Source: Xcode 11 stuck on archiving

Freon answered 22/10, 2019 at 1:49 Comment(0)
B
1

Change below build settings of swift compiler - code generation and try

Compilation Mode - Incremental (Instead Whole Module) Optimization Level - No Optimization

Betaine answered 28/11, 2019 at 9:39 Comment(1)
I just had this same issue with Xcode 15.2 trying to archive a visionOS app. Changing Compilation Mode to Incremental made the issue go away.Fivepenny
D
0

I also had the same issue in my multi-modular SPM project which has a dependency on Realm. Building was fine, but when archiving everything was stuck. The solution was to change Package.swift target dependency from

.product(name: "Realm", package: "realm-swift")

to

.product(name: "RealmSwift", package: "realm-swift")

Hope this will help somebody having a similar issue.

Disport answered 29/1, 2023 at 16:48 Comment(0)
A
0

I had the same symptom - the archiving process got stuck as it was almost finished. My problem was that the Metro port 8081 was taken by another application. As soon as I closed the other application the archiving worked.

Aplanatic answered 26/6, 2023 at 8:15 Comment(0)
L
0

Using Xcode 15.2

Follow the steps:

  1. Go to your project Build Settings tab and find for optimization:

Change it to None

enter image description here

  1. Then at the same Build Settings tab and find for compilation mode:

Change it to Incremental

enter image description here

  1. Now try to Archive your project again.

enter image description here

Licha answered 17/5, 2024 at 6:8 Comment(0)
T
0

Xcode version 15.4

On Archive I had face the same issue, Every time, I was stuck on 1063 of 1086. The solution for me

Go to your project Build Phase move the Run Script at the last.

Titanic answered 2/9, 2024 at 7:25 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.