7

I have two project which I build based on the same Rake script, which internally uses XCode build. Building it with xcodebuild -archivePath (ARCHIVE succeeds), then I package app with xcodebuild -exportArchive. The problem is that first project succeeds all steps, but second is failing on xcodebuild -exportArchive because xcarchive is malformed. I have compared these two archives and malformation is caused by missing Info.plist inside archive. When I prepared manually such Info.plist and put it into xcarchive, then I was able to package app without problems.

Any clues why XCode build doesn't produce Info.plist inside xcarchive file?

Janmenjaya
  • 4,149
  • 1
  • 23
  • 43
Fishman
  • 1,737
  • 1
  • 25
  • 42
  • Did you ever find solution for the problem? I am seeing the same problem and after some googling I saw that for some adding those (in my previous comment) solved the problem. I think I have those correctly set but I'm still seeing the same problem. As far as I can see, my problem appeared after changing CONFIGURATION_BUILD_DIR="${BUILD_DIR}" to SYMROOT="${BUILD_DIR} on the command line in order to fix some other issues after upgrading cocoapods 0.38.2 -> 1.1.1 and Xcode 7.2 -> 8.2.1 – diidu Jan 23 '17 at 08:36
  • This is the most direct answer I've found so far: https://developer.apple.com/library/content/qa/qa1273/_index.html but it did not work for me. – diidu Jan 26 '17 at 11:18
  • After all I got it working just by removing also SYMROOT and just using the defaults. Should have noticed that much quicker. – diidu Jan 30 '17 at 06:50

5 Answers5

1

@diidu's comment to this questions was the solution to my problem, that I believe was the same as @Fishman's. Adding CONFIGURATION_BUILD_DIR (and removing use of SYMROOT) from my build scripts caused the Info.plist to be written in the archive, and then export succeeded.

greymouser
  • 3,133
  • 19
  • 22
0

I've got this bug in an iOS application projects too. This project was using a GIT submodule linked to a framework, integrated to the Xcode workspace as a subproject.

The project did build normally until the framework submodule upgrade to use XCFramework instead of a plain framework. Digging into this problem, I've finally found the problem: the BUILD_LIBRARY_FOR_DISTRIBUTION and SKIP_INSTALL framework Build Settings!

If you set

BUILD_LIBRARY_FOR_DISTRIBUTION=YES
SKIP_INSTALL=NO

to build the framework, the application archive task will generate a bad XCArchive, leaving it's Info.plist without the ApplicationProperties entry. You must make sure at least no BUILD_LIBRARY_FOR_DISTRIBUTION build properties are set to YES, and probably no SKIP_INSTALL are set to NO.

0

In my case I was including via SPM, an XCFramework that had dSym/BCSymbolmap files included.

That caused the missing Info.plist to happen on a complex project, where it did not happen on a simpler one, and only when using provisioning profiles for the App Store, not enterprise profiles. It also happened when simply running Archive in Xcode, after completion the Organizer did not open because the .xcarchive generated was missing an Info.plist file at root.

Altering the SPM acquired XCFramework (the vendor changed it and issued a new version) to only include the framework binaries and none of the debugging info had the Archive working correctly again.

This was with Xcode 12.4, there is some reason to think Xcode 12.5 (or eventually Xcode 13) might fare better though I was not able to verify in this case.

Note this occurred even after adding a fix to remove a duplicate Framework included by the Archive process in the App Plugins directory was in the manner suggested by the 12.4 release notes.

Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
0

My issue was caused by updating 3rd party library to newer version. Not sure what caused it on their side but you might try to see if you haven't updated some dependencies before this started happening.

Piotr
  • 1,743
  • 1
  • 26
  • 40
0

In my case, the problem was caused by the SYMROOT=... argument. Changing my code to use -derivedDataPath=... instead resolved the issue.

Jakob Egger
  • 11,981
  • 4
  • 38
  • 48