Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 GM created generic archive instead of iOS app archive

Tags:

xcode

ios

I recently started using Xcode 7 GM. When I archive my project, I get a generic Xcode archive instead of an iOS archive.

I'ved tried pretty much all the following:

  • xcode is creating generic xcode archive instead of iOS App Archive
  • Cannot generate iOS App archive in xcode

I compared the contents of a previous successful archive and a different folder structure for some components:

  • Swift libraries are inside a sub folder
  • The app extension is outside of the .app package
  • The info.plist is missing keys

enter image description here

Has anyone else encountering this problem? If so, did you solve and how?

Edit

We are using Cocoapods 0.38.2

like image 310
bsarrazin Avatar asked Sep 11 '15 12:09

bsarrazin


1 Answers

I add the same problem : an old Xcode project, Xcode 7 (not the GM, the App Store version) and Cocoapods. I have been tinkering a lot, tried Cocoapds 0.39 b3 and b4 without success, changed params in Build Settings, but finally - for me - the problem was shown by mrezk in https://github.com/CocoaPods/CocoaPods/issues/4021 :

Missing ApplicationProperties in Info.plist

As I'm not used to tinker with Info.plist and these keys, I've found in the Apple Dev forums a very useful answer : https://forums.developer.apple.com/thread/17063

In summary, for info.plist newbies like me ;) :

  1. Archive your project
  2. Organizer will show a Generic Xcode Archive
  3. Right Click, Show in finder
  4. Right Click, Show Package Contents
  5. Open the Info.plist file in a XML editor
  6. As mochs indicates, add these lines in the section :

<key>ApplicationProperties</key>  
<dict>  
  <key>ApplicationPath</key>  
  <string>Applications/<<APP_NAME>>.app</string>  
  <key>CFBundleIdentifier</key>  
  <string><<BUNDLE_IDENTIFIER>></string>  
  <key>CFBundleShortVersionString</key>  
  <string><<YOUR_MARKETING_NUMBER>></string>  
  <key>CFBundleVersion</key>  
  <string><<YOUR_BUILD_NUMBER>></string>  
  <key>SigningIdentity</key>  
  <string>iPhone Distribution: <<CERTIFICATE_NAME>> (<<CERTIFICATE_ID>>)</string>  
</dict>

and replace the tags with your own values.

Save, close Xcode, double click the archive : it should open in the Organizer as a iOS Type Archive.

Thanks to mrezk and mochs for the solution.

like image 57
Christian Navelot Avatar answered Oct 09 '22 09:10

Christian Navelot