Playground in Xcode cannot be opened - xcode

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.

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.

how to specify the path of generated debug binary file when debug go-lang in vs-code

How to specify the path of generated debug binary file when debug go-lang in vs-code?
I have tried modify launch.json file but not work.
I can debug go programs well now in vs-code, the only problem is each time i finish debug, a debug binary file was generated under my project directory, like the picture below.
I want to know can i specify the directory of generated debug binary file?
I am on mac screen shot of my problem:
This is followed by vscode-go issue 1345: "Delete binary files created by delve after closing the debug session"
delve is the debugger for Golang, or at least it's the one that the Go extension uses.
When you debug something with delve, it creates a large binary file in the current directory. If you debug a main function (dlv debug), you get 'debug'. If you debug a test function (dlv test), you get 'debug.test'.
In normal delve usage, when you're done, you quit delve. Delve then deletes this file. Apparently VSCode gracelessly terminates (SIGKILL?) delve, which means the file sticks around.
So this is studied, but not yet resolved.
Update July 2018: Ramya Rao adds in this issue:
I finally have an update!
Turns out there is a command called Detach that can be called on the delve server which will result in the required clean up of the debug binary that gets generated.
To get this fix before the next update to the Go extension (which will be either Friday or early next week), please follow the below:
Download https://github.com/Microsoft/vscode-go/blob/master/Go-latest.vsix
Run code --install-extension Go-latest.vsix
If the above fails with Error: end of central directory record signature not found, then clone this repo (vsgo) and use the Go-latest.vsix file from the cloned repo
Reload VS Code
The fix worked for me as long as the program being debugged wasn't spawning processes of its own like a web server for which I have logged an upstream issue with delve.
I'd appreciate it if folks here can give the fix a try and share any feedback.
The change you need to do to provide an output path for the generated debug binary is in the launch.json file.
Use the property output in your debug configuration.
Please don't modify the package.json file.
This debug file was generated by delve when debugging and should be deleted after debugging, this seems to be bug of go extension of vs-code, see the link here

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

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.

can't share an archive in Xcode due to missing icon\r file

I put my Xcode project within my dropbox folder and now it seems like every time i try to share my archive from within the organizer it keep giving me the following error:
error: Codesign check fails : /var/folders/7l/l93zzs6n4h14qb7rmj5r7zn00000gn/T/GtLyx05w1O/Payload/stryker.app: a sealed resource is missing or invalid
In architecture: armv6
resource added: /private/var/folders/7l/l93zzs6n4h14qb7rmj5r7zn00000gn/T/GtLyx05w1O/Payload/stryker.app/www/Icon
resource missing: /private/var/folders/7l/l93zzs6n4h14qb7rmj5r7zn00000gn/T/GtLyx05w1O/Payload/stryker.app/www/Icon
I believe this error is caused by the fact that Xcode can see the icon/r file associated with drop box.
Is there a way i can delete this file?
I was able to share my archive after I deleted the icon\r file. Please refer to the following post for more info
https://apple.stackexchange.com/questions/31867/what-is-icon-r-file-and-how-do-i-delete-them/31877#31877

Resources