xcodebuild (XCode 7.1) - unexpected successful exit code from cancelled command - xcode

I'm getting the following during the bundle resources copying phase in xcodebuild (XCode 7.1):
2015-11-03 22:16:28.218 xcodebuild[28202:300463] DVTAssertions:
Warning in
/Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-9061/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:739
Details: unexpected successful exit code from cancelled command
<C0505:'CpResource Foo.json':P10> Object: <PBXTargetBuildContext:
0x7faec015a440> Method:
-createCommandInvocationRecordFromInvocation: Thread: <NSThread: 0x7faebc8cc070>{number = 10, name = (null)} Please file a bug at
http://bugreport.apple.com with this warning message and any useful
information you can provide.
I have ~170 items I'm copying, but for some reason a few of them give me this error.
EDIT - I just ran the command again and now it works, so it doesn't seem deterministic.

The issue was a duplicate folder in the Copy Bundle Resources section. It used to be two different files, but they were moved so XCode decided to change them both to the folder they got moved into. Go figure.

Had this issue a couple of months ago. Today that error made it's comback.
I have it only if I try to emulate from ionic (--livereload) on a iOS-Device. Seem like if you have Xcode running it occurs. Close Xcode. That fixes it.

Related

Throwing error while debug and run PO command in Xcode 12

When I am running application on simulator or device and try to use PO command during debug. Xcode is throwing error instead of printing value. It is happening after I have updated Xcode 12.
error: virtual filesystem overlay file
/all-product-headers.yaml' not found
error: couldn't IRGen expression. Please check the above error messages for possible root causes.
What is the solution for this ?
Any help would be appreciated.
Go to /Users/<YOUR_USER>/Library/Developer/Xcode/ and delete "DerivedData" folder.
If in the path of the missing file is the name of a framework e.g. Usabilla.build/Release-iphonesimulator/Usabilla.build/all-product-headers.yaml
Try using an older version, using version 6.4.7 of Usabilla fixed the issue for me.
If the above fixes don't work, here are some info that might help:
https://steipete.com/posts/couldnt-irgen-expression/

Application could not be uploaded on device

I have a crossplatform solution for an application. I have recently tried to add push notifications functionality for my IOS project.
But when i try to install my project on my ios i get this error.
Package Inspection Failed Error (error: 0xe8000051).
I have tried:
- Cleaning solution
- rebuild
- checking build action for my info.plist
- removing bin folder
the full trace of the install looks like this:
PreflightingApplication - PercentComplete: 30%
PackageInspectionFailed: Failed to load Info.plist from bundle at path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.xhvJhV/extracted/ODEON.iOS.app/Frameworks/PersonalizedAdConsent.framework
error MT1006: Could not install the application '/Users/anderslarsen/Documents/Projects/ODEON/ODEON/ODEON.iOS/bin/iPhone/Release/ODEON.iOS.app' on the device 'Anders - iPhone': Package Inspection Failed Error (error: 0xe8000051).
Can anyone help me with this error?
Thanks in advance!
I could not find the reason this happens and I researched a lot, 2 years after this question was done I'm still getting this error. From my personal experience, manually deleting "bin" and "obj" and then building the iOS project again would solve the issue.

Playground in Xcode cannot be opened

I cannot create playground project, after I press cmd+option+shift+N or click 'Get started with a playground' shown like below picture, nothing happened. No window pop up, no any messages.
Can anybody help me to figure out why?
Okay, finally I found the below log in Console app.
7/16/15 09:22:39.551 AM Xcode[1337]: [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-7720/IDEKit/TemplateLibrary/IDEPlaygroundCreationHelper.m:48
Details: Could not find suitable playground file template.
Object: <IDEPlaygroundCreationHelper>
Method: +createNewPlaygroundFromTemplateInWorkspaceWindowController:platformIdentifier:withContextSetupBlock:
Thread: <NSThread: 0x7fab12514460>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
It said Xcode Could not find suitable playground file template, then I realized I had modified code templates several monthes ago, so I was going to delete them
sudo rm -rf ~/Library/Developer/Xcode/Templates/File\ Templates/
Then playground works! It maybe caused by incompatible template files.

Crashlytics updated to Fabric: Unable to copy dSYM

I've updated my project from Crashlytics to Fabric. I've followed all steps in the Fabric Mac app but now my app simple won't build more than once without cleaning.
When I use Product > Clean, I can build my app once. The next time I try, building fails again.
What can I do to fix this issue?
2015-07-17 12:10:58.602 run[10802:603564]
Fabric.framework/run 1.3.16
2015-07-17 12:10:58.958 run[10802:603564]
Unable to copy dSYM at path /Users/username/Library/Developer/Xcode/DerivedData/appname-byhgrsorkjornnaplkksbbzmvfel/Build/Products/Debug-iphonesimulator
to path /Users/username/Library/Caches/com.crashlytics.mac/5b91b14e832a7b1c29441ec5ba109810/builds/86A88558-0818-40BB-9EF5-B4816707A076/appname dev.app.dSYM
Error Domain=NSCocoaErrorDomain Code=4 "The file “DWARF” doesn’t exist." UserInfo=0x10010c960
{
NSSourceFilePathErrorKey=/Users/username/Library/Developer/Xcode/DerivedData/appname-byhgrsorkjornnaplkksbbzmvfel/Build/Products/Debug-iphonesimulator/appname dev.app.dSYM/Contents/Resources/DWARF, NSUserStringVariant=(Copy),
NSDestinationFilePath=/Users/username/Library/Caches/com.crashlytics.mac/5b91b14e832a7b1c29441ec5ba109810/builds/86A88558-0818-40BB-9EF5-B4816707A076/appname dev.app.dSYM/Contents/Resources/DWARF, NSFilePath=/Users/username/Library/Developer/Xcode/DerivedData/appname-byhgrsorkjornnaplkksbbzmvfel/Build/Products/Debug-iphonesimulator/ticketveiling dev.app.dSYM/Contents/Resources/DWARF,
NSUnderlyingError=0x10010c6a0 "The operation couldn’t be completed. No such file or directory"
}
Command /bin/sh failed with exit code 1
It looks like updating Fabric/Crashlytics solved my problem!
pod update 'Crashlytics'
Installing Crashlytics 3.1.0 (was 3.0.11)
Update: I guess I spoke a bit too soon. The issue isn't completely fixed, but at least I have to clean a lot less than before.
add cleaning to your build scripts

Xcode 5 Tests Not Running

I get the following message from Xcode when I try to run my tests:
2013-11-13 09:02:57.849 MyProject[378:303] Error loading /Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest/Contents/MacOS/MyProjectTests: dlopen(/Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest/Contents/MacOS/MyProjectTests, 262): no suitable image found. Did find:
/Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest/Contents/MacOS/MyProjectTests: open() failed with errno=1
IDEBundleInjection.c: Error loading bundle '/Users/tatami/Library/Developer/Xcode/DerivedData/MyProject-gcralijdlibafgeyfwfeiynnothy/Build/Products/Debug/MyProjectTests.xctest'
This question has already been asked here: Xcode 5 throws "Library not loaded" error when adding a test target
but the solution doesn't apply to me as this is a Mac app. Any ideas?
Do you have App Sandbox under Capabilities for your target enabled? Switching that off worked for me.
This is because of sandboxing.
Same issue also happens with OCUnit (in both Xcode 4 and 5): XCTest - "Test failed"
There's instructions for testing a sandboxed app here:
http://marcschwieterman.com/blog/testing-in-the-sandbox/

Resources