Xcode Is Creating Generic Xcode Archive Instead of iOS App Archive

xcode is creating generic xcode archive instead of iOS App Archive

In my case problem was "Skip install" set to "NO" for one of embedded static libraries.
Also useful link: https://developer.apple.com/library/mac/technotes/tn2215/_index.html

Xcode creating generic Xcode archive instead of iOS App Archive?

Why is this?

This usually happens when xCode can't create a valid archive for distribution, so it just gets created in "Other Items" in the Organizer as a "Generic Xcode Archive".

Is it a problem?

Yes, because you will not be able to submit it to Apple Store Connect. You cannot package generic archives nor submit them for review.

If I can change this, how?

First of all, we need to check the project setup:

  • In Target > Manage Schemes... check if your current target is a valid project with the Shared flag selected

Sample Image

  • In Target > Edit Scheme... check if the target is the only one with Archive enabled. Also check if the Analyze and the Archive tabs have Release selected in Build Configuration

Sample Image

  • In Product > Analyze (Shift + command + B), check if there are no errors. You can access the report in the last icon on the navigator panel:

Sample Image

I checked all the 2 vote answers on this link, and they mostly cover all the possible solutions, but I would like to double check the Apple's support page troubleshoot:

1) Your archive contains header files.

If you are using a static library, check if there is a Headers build phase. If so, delete this phase, add a Copy Files build phase to your library, and use it to export your header files.

Sample Image

2) Your archive contains static libraries or frameworks.

In this case, the libraries and frameworks need to have the flag skip install set to YES

Sample Image

Then try to archive it again.

If none of the solutions worked, there is a workaround here that consists in modifying the archive .plist file manually and adding the missing information. It can be accessed:

  • Archive your project
  • Organizer will show a Generic Xcode Archive
  • Right Click, Show in finder
  • Right Click, Show Package Contents
  • Open the Info.plist file in a XML editor

Your valid .plist file would be like this:

Just replace PASTE_YOUR_BUNDLE_IDENTIFIER_HERE with your bundle identifier,
PASTE_YOUR_CERTIFICATE_NAME_HERE with your certificate name,PASTE_YOUR_CERTIFICATE_ID_HERE with your certificate id and PASTE_YOUR_TEAM_ID_HERE with your team id.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ApplicationProperties</key>
<dict>
<key>ApplicationPath</key>
<string>Applications/FinalAppPrj.app</string>
<key>CFBundleIdentifier</key>
<string>PASTE_YOUR_BUNDLE_IDENTIFIER_HERE</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>SigningIdentity</key>
<string>iPhone Distribution: PASTE_YOUR_CERTIFICATE_NAME_HERE (PASTE_YOUR_CERTIFICATE_ID_HERE)</string>
<key>Team</key>
<string>PASTE_YOUR_TEAM_ID_HERE</string>
</dict>
<key>ArchiveVersion</key>
<integer>2</integer>
<key>CreationDate</key>
<date>2019-09-01T20:47:53Z</date>
<key>Name</key>
<string>FinalAppPrj</string>
<key>SchemeName</key>
<string>FinalAppPrj</string>
</dict>
</plist>

To check the certificate name and ID, the easiest way is to open Keychain Access.app (Mac Finder > Applications > Utilities > Keychain Access.app), find the certificate (you can filter by the text "Distribution") and see its details. Marked in green is the name, marked in red is the ID between parenthesis.

Sample Image

Then close and reopen xCode. In Window > Organizer, if the archive is under iOS Apps, then you can Validate and Distribute the app.

Edit

To add an iOS Distribution Certificate, in xCode, click on xCode > Preferences > Accounts > Select the team and click on Manage Certificates... . On the Plus button you should see iOS Distribution:

Sample Image

Add this certificate to the project, check in the keychain if is added there and point it into the .plist file.

As you are using a signing team, you also need to add the team to the .plist. I updated the .plist file with the needed entry.

Xcode 7 GM created generic archive instead of iOS app archive

OP here.
The members of my team all tried Cocoapods' beta and it fixed the problem for us. Therefore I'm going to accept my own answer.

Although it might fix the problem, I believe Christian Navelot's answer to not be scalable and certainly not manageable within a team.

Also, all of us tried using the cp beta without removing the Copy Pod Resources build phase. This means that I won't be accepting Todd Anderson's answer either.

We are not using static libraries either, we are using frameworks (aka use frameworks! inside the Podfile).

Thanks to all for contributing to this question. Looks like we all got put into the same boat by Xcode 7!
Cheers!

xcode is creating generic xcode archive instead of iOS App Archive

In my case problem was "Skip install" set to "NO" for one of embedded static libraries.
Also useful link: https://developer.apple.com/library/mac/technotes/tn2215/_index.html

XCode Generic Archive instead of iOS app Archive

After spending more than 4 hours on this I found what is happening in my case.
Basically, the problem (Xcode generic archive generation instead of app archive) was caused because of the addition of SASS to preprocess my .css file that I'm using with Pixate.

I found some minutes ago that there are new instructions to add SASS, and you can find these here Adding SASS to iOS

I had followed the instructions in the Pixate page to add SASS with Pixate but these instructions were causing the default.css file to be generated outside my app .ipa file. As I show in the attached image. Generic Archive - > Save Built Products output.



Related Topics



Leave a reply



Submit