Xcode Archive - Generic Xcode Archive 解决办法

http://stackoverflow.com/questions/10715211/cannot-generate-ios-app-archive-in-xcode-4-3

 

通过Workspace方式加入了新的静态库工程,和主工程建立以来后,出现了无法打包的情况。让后参照晚上其他的解决流程走了一遍,没有解决,总有一种无头苍蝇瞎碰的感觉,最后搜到了下面的解决办法,这回从根本上排除打包存在的问题。

 

将 Generic Xcode Archive 发布,

在发布的文件usr中找寻对应出现的头文件或静态库,对于出现的头文件,找到文件对应工程,将文件从public改为project,对于库,则检查对应target,skip install设置为YES. 

有针对性依次排错,问题解决。

 

I did the following to make it work for me:

  1. I had a three20 static library, I used cocoapods to include the files within the main project
  2. followed the skip install for all other sub projects/static libraries and switched the copy headers from public to project as stated above
  3. most importantly: in each library your project uses go to build phases -> Copy Files and ensured that destination is changed from Absolute path to products directory. Note: see the hint below to narrow your search to find the library causing this error.

and that was it!

hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:

  1. Select the archive and click the Distribute button.
  2. Select the 'Save Built Products' option.
  3. Hit Next and Save.
  4. Browse the created directory in Finder.
  5. The 'libraries' subdirectory will identify the libraries that you need to set the Skip Install to Yes.
  6. in some cases usr/local/include will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory (or even the files you forgot to set the skip install to yes flag). but that directory (ie usr/local/include) varies depending on your sublibrary directory structure. In many cases.. you will see all the files listed under Copy Files in step 3 above listed here. If you find them here, then you have a definite answer for the cause of your problem.
posted @ 2013-10-15 12:37  Jun Wang  阅读(1327)  评论(0编辑  收藏  举报