Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 ValidateEmbeddedBinary error Could not read data in foo-WatchKit-App.app

I am trying to do a full build on an iOS App with a WatchKit App as well.

When compiling the full project for Archive I am seeing the following

ValidateEmbeddedBinary DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app
    cd /Users/lordandrei/Projects/git/X7/lifa93
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-embeddedBinaryValidationUtility /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app -signing-cert *9F…FB* -info-plist-path /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/InstallationBuildProductsLocation/Applications/lifa93.app/Info.plist

error: warning: Could not read data in /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app

I have tried:

  • toggling between Debug and Release
  • toggling No Install and No Validate.
  • revoking and replacing all profiles (Signing, adhoc, dist)

So far nothing has made a dent.

Suggestions welcome as I am in a holding pattern trying to build.

Xcode: Version 7.0 beta 3 (7A152u)
iOS: 9.0 beta 3 (13A4293g)    
Radar: 21975256
like image 346
Dru Freeman Avatar asked Jul 21 '15 17:07

Dru Freeman


2 Answers

I had this issue when I was trying to build to my iPhone 6+ and Watch. I had just re-installed Xcode 7 Beta because I accidentally deleted one of the needed frameworks. I tried building several times and received the same "Could not read data..." error. I finally built to the simulator successfully, AND THEN built to both devices and it worked.

My issue now is that builds to Apple Watch seem to take forever to run or pass "Attaching...".

like image 86
Omar Abdelwahed Avatar answered Sep 27 '22 18:09

Omar Abdelwahed


I don't know exact reason of your problem, but I created new project that includes WatchKit App target as well. And it works fine, no problems with building process.
I am using Xcode 7 beta (7A120f).

That's why I propose 3 potential ways to resolve the issue:
1. Create new new project from scratch and migrate source and resource files from your current project to new one. I had similar problems (it wasn't related to WatchKit app) previously and this trick helped me.
2. Install latest version of Xcode. Xcode 7 beta 4 is released on 21st of July.
3. Install Xcode (7A120f). This is version that I am using, you are using different one. I don't think that it will help, but who knows.

like image 23
Vlad Papko Avatar answered Sep 27 '22 18:09

Vlad Papko