Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode > Product->Archive never finish

Tags:

xcode

ios

archive

I am trying to archive my iOS app and upload it to iTunes connect.

After selecting Product->Archive in XCode, the process does not go further starting from this point.enter image description here

I left it for more than 10 hours, but nothing seems changed.

There is another similar question in Stackoverflow though, he takes long to archive the app and takes forever to upload to App Store. In my case, it takes me forever even to archive the app. These are the solutions for other developers of that question:

  • delete AppleID certificates in Keychain
  • remove iMessage Encrption Key
  • able/unable Automatically manage signing

I tried all the above solutions, all certificates are updated again after this issue appears. None of them work for me. I am totally stuck at here. Any suggestion is appreciated. Thanks!

I am using XCode 8.2.1, macOS 10.12.3.

like image 606
Wilfred Avatar asked Mar 23 '26 19:03

Wilfred


1 Answers

Fix the issue finally. It includes my code's problem and XCode bugs.

I update XCode to 8.3.3 and archive the app again, instead of processing forever, it shows this error

Command failed due to signal: Segmentation fault: 11

Refer to this question and this answer, I reach a function and find out that the issue come from one statement.

viewModel.willDestroy(additionalInfo: ["text": text])

And this is what my ViewModel and its parent class look like

// ViewModelBase Class
func willDestroy(additionalInfo: Dictionary<String, Any>) {
    ...
}

// ViewModel Class 
override func willDestroy(additionalInfo: Dictionary<String, Any>? = nil) {
    ...
}

The signature of willDestroy in ViewModel does not match with its parent is the core issue of this question. After updating the signature, my app can finally be archived in XCode 8.3.3.

like image 53
Wilfred Avatar answered Mar 26 '26 07:03

Wilfred



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!