2016-09-22 40 views
16

在iOS 10升級到Xcode 8後,我得到了這個錯誤。我在最新埃爾卡皮坦和使用Ruby以下版本(我通過RVM更新,用相同2.0.0這是系統版本)和CFPropertyList:xcodebuild exportArchive:找不到適用的設備

Philipps-MacBook-Pro:mobile-sdk prakuschan$ ruby -v 
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] 


Philipps-MacBook-Pro:mobile-sdk prakuschan$ gem list CF 
*** LOCAL GEMS *** 
CFPropertyList (2.3.3) 

的xcodebuild聯編-exportArchive命令在shell腳本執行,併成功存檔後,我收到以下錯誤:

** ARCHIVE SUCCEEDED ** 
2016-09-22 10:02:16.460 xcodebuild[10375:8369748] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/9y/r64c9wld0jx2yf3glsrzhhr00000gn/T/AppName_2016-09-22_10-02-16.456.xcdistributionlogs'. 
2016-09-22 10:02:18.228 xcodebuild[10375:8369748] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fe435f9dfb0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.} 
error: exportArchive: No applicable devices found. 
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.} 
** EXPORT FAILED ** 

當尋找到xcdistributionlogs的IDEDistribution.standard.log包含在最後以下行:

2016-09-22 08:02:18 +0000 [MT] /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with a signal 6 
2016-09-22 08:02:18 +0000 [MT] ipatool JSON: (null) 

我不知道這是否是有價值的,但這是ipatool路徑:

2016-09-22 08:02:17 +0000 [MT] Running /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool 

任何幫助,高度讚賞。我已經嘗試了很多在google上發現的建議,但是還沒有找到解決方案。

+0

我有同樣的問題,因爲我們已經更新到我們的生成服務器上的Xcode 8。我在網上搜索並找不到一個awnser。所以我已經創建了一個bugreport並將其發送給蘋果,我希望他們會給我一個解決問題的方法,然後我會在這裏發佈它。 – Zeropointer

+0

@Zeropointer蘋果公司的任何迴應? –

+1

我在蘋果開發論壇(https://forums.developer.apple.com/message/182955)上嘗試了一篇文章,但他們自從一週以來就沒有批准我的主題。似乎他們並不認真。 與此同時,我發現新創建的Xcode項目文件沒有問題,因此我努力將應用程序的所有設置和文件轉移到新項目中,並且工作正常。也許這可以幫助你們中的一些人解決問題。 – Philipp

回答

10

我看到了同樣的問題。尋遍後:

https://forums.developer.apple.com/thread/13446

和其他地區的Xcode 7類似的問題。我意識到這是獨一無二的。

# Check the artwork idiom. 
#return nil,"the device doesn't support the app's UIDeviceFamily" unless (deviceTraits.supportedIdioms & bundle.supportedIdioms).size > 0 

通過在偵探的ipatool命令實測值:

/var/folders/.../IDEDistribution.standard.log 

如果你捏捏ipatool腳本在Xcode 8

sudo vi /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool 

並註釋掉這一行,你能解決這個問題您可以通過以下方式搜索:

$ sudo find /private/var -name "*.xcdistributionlogs" 

相關的細節/調試步驟:https://github.com/fastlane/fastlane/issues/8737

+2

false已經嘗試過,但它不起作用。但是我發現我的導出在IDEDistribution.standard.log中失敗的原因 – Zeropointer

+0

@Zeropointer它是什麼/日誌中的內容是什麼? –

+1

@ViktorBenei這裏是我的日誌[MT] /Applications/Xcode_8.app/Contents/Developer/usr/bin/ipatool已退出1 2016-10-03 07:45:38 +0000 [MT] ipatool JSON:{ 警報=({0}; description =「Info.plist of \ MyApp。應用程序/框架/ TheFramework.framework /資源\ U201D指定了CFBundleExecutable鍵不存在的文件「; 信息= { }; 級別= ERROR; 類型= 」畸形淨荷「; } ); – Zeropointer

2

包括第三方框架,當我得到Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found."我的企業項目。我的exportOptionsPlist文件包含compileBitcode=NO條目,但項目本身仍有位碼。

我也使用了日誌/var/folders/.../IDEDistribution.standard.log,發現一個更明確的錯誤,導致我的解決方案。

更多信息:https://developer.apple.com/library/content/technotes/tn2432/_index.html

0

我的構建腳本有同樣的問題,我查了一些框架,我補充道。有一個包含plist文件的框架(名稱與Info.plist相同)。所以,我刪除Info.plist文件,生成腳本工作正常。

enter image description here

5

我們有同樣的問題"No applicable devices found"運行

xcodebuild -exportArchive -archivePath ../bin/archive/GetSocialTestApp.xcarchive -exportPath ../bin/ -exportOptionsPlist ../../scripts/exportOptions.plist 

工作液後:與xcbuild-safe.shfastlane repo包裹xcodebuild。詳細的解決方案描述here

至於出現,問題是由rvm環境變量引起的,xcbuild-safe.sh執行xcodebuild之前清除它們。

不工作的解決方案,我們嘗試:

  • 修改ipatool腳本描述here
  • 降級到2.0.0紅寶石
  • 安裝紅寶石寶石CFPropertyListsqlite3ipatool在抱怨
+0

工作對我們來說也是如此,我們希望在Fastlane自定義動作中使用這個包裝器,最終獲得'xc的路徑build-safe.sh'如下: 'requrie「gym」' 'xcbuild_safe || = File.join(Gym :: ROOT,「lib/assets/wrap_xcodebuild/xcbuild-safe.sh」)' – i4niac

+0

爲我們工作太。似乎這是一個rvm問題。 – radalin

+0

工作就像一個魅力,...沒有必要編輯ipatool –

0

與XCode 8.2.1有相同的問題

在我的情況下,問題被複制有關導出存檔要麼即席或AppStore的分佈與下列出口信息的plist

<?xml version=1.0 encoding=UTF-8?> 
<!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd> 
<plist version=1.0> 
<dict> 
     <key>teamID</key> 
     <string>TEAMID</string> 
     <key>method</key> 
     <string>ad-hoc</string> # or `app-store` 
     <key>uploadSymbols</key> 
     <true/> 
     <key>compileBitcode</key> 
     <false/> 
     <key>uploadBitcode</key> 
     <false/> 
</dict> 
</plist> 

原來所鏈接的框架之一是使用位碼編譯。這是從Xcode中導出日誌中指出: IDEDistribution.stadard.log

error: Failed to verify bitcode in YandexMapKit.framework/YandexMapKit: 
error: Bundle only contains bitcode-marker /var/folders/zb/ftpjx10s547ddmzm_ybqdm51xdv_t7/T/IDEDistributionThinningStep.NKQ/Payload/Avito.app/Frameworks/YandexMapKit.framework/YandexMapKit (armv7) 

我不得不手動重新編譯YandexMapKit項目爲iphoneos - 和iphonesimulator - 框架,並把它們合併成一個通用框架

1

這就是它!設置bitcode = no,錯誤得到修復。

0

首先,您需要檢查是否已經在您的Mac上安裝了帶有gem的sqlite3和CFPropertyList。 使用這些命令來查看結果在你的終端:

  • gem list | grep sqlite3
  • gem list | grep CFPropertyList

如果打印什麼,那麼你必須使用sudo

  • sudo gem install sqlite3
  • 安裝它們
  • sudo gem install CFPropertyList
2

將以下內容複製並添加到〜/ .bashrc(〜/ .zshrc,如果您使用ZSH)的末尾。 並退出終端並重新啓動(必須)

unset RUBYLIB 
unset RUBYOPT 
unset BUNDLE_BIN_PATH 
unset _ORIGINAL_GEM_PATH 
unset BUNDLE_GEMFILE 
unset GEM_HOME 
unset GEM_PATH 

FYI:

由於Xcode中有一個依賴於2個外部寶石:SQLite和CFPropertyList 更多信息https://github.com/fastlane/fastlane/issues/6495

我們不得不取消設置rbenv,RVM這些變量,當用戶使用捆綁 即使我們在CircleCI, 等某些環境中不使用rbenv,我們也需要顯式地取消設置GEM_HOME和GEM_PATH。 更多信息https://github.com/fastlane/fastlane/issues/627

+0

這固定在我的詹金斯sh調用。 – BadmintonCat