Xcode Archive - Generic Xcode Archive 解決辦法

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

 

經過Workspace方式加入了新的靜態庫工程,和主工程創建以來後,出現了沒法打包的狀況。讓後參照晚上其餘的解決流程走了一遍,沒有解決,總有一種無頭蒼蠅瞎碰的感受,最後搜到了下面的解決辦法,這回從根本上排除打包存在的問題。xcode

 

將 Generic Xcode Archive 發佈,app

在發佈的文件usr中找尋對應出現的頭文件或靜態庫,對於出現的頭文件,找到文件對應工程,將文件從public改成project,對於庫,則檢查對應target,skip install設置爲YES. ide

有針對性依次排錯,問題解決。ui

 

I did the following to make it work for me:this

  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!idea

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

  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.
相關文章
相關標籤/搜索