3

I'm trying to upload my app to app store connect and I am unable to validate my app. I also see that identifier and other info is not showing up. Why is this? Is it a problem? If I can change this, how? [![enter image description here][1]][1]

I have tried the things found in [here][2] that where voted 2+.

Incase its relevant: I am using a project with cocoapods

XML for info.plist:

    <?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>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>

[![enter image description here][3]][3]

  • I see that the follower cell is different from like and comment cell. Can you make sure, you code for setting the attributed string is in both the cells? i.e. NotifTableViewCell2 and NotifTableViewCell – AjinkyaSharma Jul 22 '19 at 03:23
  • 1
    @dfgdfgdfgdfg, if you can provide a sample project which successfully reproduces the same error then maybe we can help better – Sahil Manchanda Sep 02 '19 at 06:19
  • @dfgdfgdfgdfg you put a very high bounty here but I don’t know if this solved your issue. Please comment if you still need help. – alxlives Sep 03 '19 at 10:55
  • @alxlives It all seems to have worked. The app has been submitted for review. –  Sep 03 '19 at 12:31

4 Answers4

7

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

enter image description here

  • 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

enter image description here

  • 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:

enter image description here

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.

enter image description here

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

enter image description here

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.

enter image description here

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:

enter image description here

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.

alxlives
  • 5,084
  • 4
  • 28
  • 50
  • https://stackoverflow.com/questions/32524011/xcode-7-gm-created-generic-archive-instead-of-ios-app-archive/32655151#32655151 for this option. The last step says to add this xml to the section... I see the xml I added in question where do I add it? –  Sep 01 '19 at 20:53
  • Inside the first key, you need the `ApplicationProperties` key and its properties . Try copying my valid `.plist` file and replacing the << >> tags – alxlives Sep 01 '19 at 21:02
  • I tried them all exept using your xml above as I dont know how to convert it... None worked. –  Sep 02 '19 at 05:24
  • Do you know your bundle identifier, certificate name and certificate id? – alxlives Sep 02 '19 at 14:34
  • No need to paste here, just to know if you have the info – alxlives Sep 02 '19 at 14:49
  • Hey I think it worked! All I need to finish is to input the cert name and id. is the cert name: my name (That's whats under cert name in apple dev)? and the id is where? –  Sep 02 '19 at 16:56
  • I cant find any iPhone distribution but I do have a iPhone Developer: ... Is that it? –  Sep 02 '19 at 18:10
  • From reading here; https://stackoverflow.com/questions/5974813/difference-between-development-and-distribution-certificate It seems I would have to get a distribution one??? Is that true? –  Sep 02 '19 at 18:23
  • Yes, you can't distribute apps with development certificates. A development certificate is just to test, and it has a limited number of registered devices. You need to enroll the [Apple Developer program](https://developer.apple.com/programs/enroll/) ($99 / year) and then use the distribution certificate to send the app through ad-hoc / test flight / app store. – alxlives Sep 02 '19 at 18:29
  • Hey, so I do have the developer account (A paid company one) and yet I dont have in keychain the cert, and I can't find it on my apple account either.... Should I add it using the plus button? –  Sep 02 '19 at 18:34
  • Yes, please. In xCode, add it with the plus button and choose “Distribution certificate” – alxlives Sep 02 '19 at 18:37
  • So I created it: I see that its called; Apple Distribution is this correct? –  Sep 02 '19 at 18:52
  • Yes, try adding it to the .plist – alxlives Sep 02 '19 at 19:35
  • Ok I did. My only last concern is seen in my update to the q above: is that ok that it says that? –  Sep 02 '19 at 19:40
  • Hey so I am almost done. I think i solved the above problem but I see that my archive does not list team. Does it need to? –  Sep 02 '19 at 20:47
  • I dont think apple distribution is the same as ios distribution. I get an error when validating –  Sep 02 '19 at 21:45
  • Hey so it worked. I know have 1 other question: I uploaded 1 build and got an email saying there were some issues but that it would still be proccessed. I solved most of the important issues. Now how do I upload again. Do I just create another archive and change in the info.plist the version? –  Sep 03 '19 at 01:37
  • Yes, exactly. Maybe now with the right certificates the build will work automatically. If not, just change the plist again. Glad it worked for you. – alxlives Sep 03 '19 at 10:52
  • Now we can delete all other answers in all topics about this theme :P – Nike Kov May 17 '20 at 16:11
0

I tried all what @alxlives said, but it didn't help. Finally i solved my problem with:

  • Rebooting mac
  • Updating embedded in my project xxx.framework file
  • Updating cocoapods to 1.9.1 from 1.8.4 and reinstalling pods
Nike Kov
  • 12,630
  • 8
  • 75
  • 122
  • How exactly did you reinstall the pods and what are you refering to with "Updating embedded in my project xxx.framework file" ? – Andrei F Nov 18 '20 at 13:45
  • @AndreiF `pod deintegrate && pod install` + carthage updates. – Nike Kov Nov 20 '20 at 07:30
  • Ok thanks. I tried everything, including cocoa cache delete, no luck. The only thing that worked is changing the Info.plist inside the archive manually, and restart Xcode before upload, but that is just an abomination - https://stackoverflow.com/questions/64896305/xcode-creates-generic-archive-of-ios-app-because-of-malformed-incomplete-info-pl - If you guys have other ideas... – Andrei F Nov 20 '20 at 09:31
0

For me this happened with Xcode 12.5.1 with multiple targets with extensions in the project. I had to untick archive for other target with extension. Then start archive again to get the direct distribution to Apple. Goto Edit Scheme... and untick. This was not required previously though.

enter image description here

Tharindu Madushanka
  • 3,241
  • 7
  • 31
  • 33
0

This is a niche answer, but there appear to be problems with Xcode 13.4.1 & 13.4.2 that cause the archive to be generic and the 'Validate app' button disabled.

Build errors were noted on the Shopify Github for 13.4.1 and I noted the problem for building a Qt app using 13.4.2

Upgrading to Xcode 14.2 resolved the issue for me.

Paul Masri-Stone
  • 2,843
  • 3
  • 29
  • 51