18

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:

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

Community
  • 1
  • 1
bsarrazin
  • 3,990
  • 2
  • 18
  • 31
  • Are you using CocoaPods? – Libor Zapletal Sep 11 '15 at 12:57
  • Yes, I should have mentioned this, we are using 0.38.2 – bsarrazin Sep 11 '15 at 12:58
  • I have similar problem with creating iOS archive but version 0.38.2 should be ok. But still you could look into [issue](https://github.com/CocoaPods/CocoaPods/issues/4021), mainly `Products directory includes usr/local/include` because it shouldn't. – Libor Zapletal Sep 11 '15 at 13:03
  • @LiborZapletal thanks for the tip, I will look into that issue. – bsarrazin Sep 11 '15 at 13:14
  • 1
    I just tried using Cocoapods 0.39 beta 4 and it seems to have fixed my issue. – bsarrazin Sep 11 '15 at 13:15
  • Glad I could help :) – Libor Zapletal Sep 11 '15 at 13:17
  • @LiborZapletal I'll wait a little bit and test this with the rest of my team but I'll ping you so you can write an answer and I can accept it so you can claim the ever so important fake internet points. – bsarrazin Sep 11 '15 at 13:23
  • Im in the same boat but just upgrading cocoapods didn't work for me, was there anything else you did that might have had a side effect @bensarz? – Andrew Plummer Sep 15 '15 at 02:08
  • @AndrewPlummer I mainly played around with skip install, recreating my certs and prov profiles, deleted derived data, I recreated the schemes, I think that's it. – bsarrazin Sep 15 '15 at 10:41
  • Thanks @bensarz I got mine working by changing my cocoapods version to: Cocoapods 0.39 beta 3, version beta 4 did not work for me. – Andrew Plummer Sep 16 '15 at 06:30
  • @AndrewPlummer I tried again yesterday and cocoapods beta 4 fixes it for me but that's not to say that this problem is caused by only one problem. – bsarrazin Sep 17 '15 at 17:42
  • I still have the problem with 0.38.2 as well as the 0.39 beta 4. beta 3 doesn't even allow me to make a `pod update`. I am pretty much lost and have no idea how to fix my project :( – Georg Sep 17 '15 at 20:19

5 Answers5

15

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.

Christian Navelot
  • 1,174
  • 9
  • 9
4

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!

bsarrazin
  • 3,990
  • 2
  • 18
  • 31
3

In my case clearing the "Installation Directory" build setting in all static libraries fixed the issue. It was set to "/usr/local/lib" before.

When using "Save Built Product" as export method the Products folder got these sub directories. That's what pointed me in this direction.

I'm using cocoapods 0.38.2.

Jzon
  • 89
  • 5
0

The other answers mentioned here were temporary fixes, but each required manual effort, either after every archive or after every pod install.

The new, better solution, is to update cocoapods to the latest version and remove your 'Copy Pod Resources' build phase from each app extension.

See https://github.com/CocoaPods/CocoaPods/issues/4021 for more information.

Todd Anderson
  • 1,138
  • 9
  • 21
  • Thanks for contributing. I will retest this this week and close this question once and for all if all works out as expected! Cheers! – bsarrazin Sep 22 '15 at 11:31
  • Actually the latest version (0.39.x) was the problem for me. As the link you posted points out, this is an issue with the latest betas. I completely uninstalled them and rebuilt everything with 0.38.2, which worked. But thanks for posting the link :) – Meriw Sep 24 '15 at 20:17
  • I never use the cocoapods betas and was running into this issue with both .38 and .39, so maybe there was something else going on too. – Todd Anderson Sep 24 '15 at 20:54
0

I had a similar issue with XCode7.1.1 and an app project with WatchKit Extension. I fixed the issue by the following step

  • Open Build Settings of my app target and set NO to "Skip Install".

  • Open Build Settings of my WatchKit Extension target and set YES to "Skip Install"

  • Open Build Settings of my WatchKit App target and set YES to "Skip Install"

Then I could make iOS archive.