Cocoa app error during autosave (errno 66) - objective-c

I have a document based app that I've been building and it seems that every now and then when the document makes a temporary save I get the following error:
AppKit called rmdir("/private/var/folders/5_/7zdcn8g160g0kbpxhr_fwv0m0000gn/T/TemporaryItems/(A Document Being Saved By MyTestApp)"), it didn't return 0, and errno was set to 66.
Now I know that I can resolve the error initially by following this post:
Save Core Data models in Xcode 4
However that seems like a temporary solution because the error keeps coming back. However the error doesn't come back all the time, just some times which makes me frustrated. I'm wondering if anyone could shed light on the source of the problem.
I'm running Mountain Lion 10.8.2 and Xcode 4.5.2.
Thanks!

I guess it isn't relevant anymore but maybe for someone else - I got the same error, and the issue was that I tried to change read only meta-data field of the UIDocument.

Related

Mysterious errors after updating to Xcode 6

I am getting mysterious console errors when building my application since I updated Xcode to 6.1 from 5. The application works fine, but I'd like to find out what is causing these errors and get rid of them.
Errors are as follows. An exception breakpoint just halts in main, so no real clues there.
2014-11-08 09:30:28.800 Finances[5848:1545133] Failed to connect
(accountSupplementaryDataValue) outlet from (FINAccountEditorWindowController) to
(NSWindow): missing setter or instance variable
2014-11-08 09:30:28.800 Finances[5848:1545133] Failed to connect (delegate) outlet
from (FINAccountEditorWindowController) to (FINAppDelegate): missing setter
or instance variable
objc[5848]: Class _NSZombie_OS_dispatch_queue_runloop is implemented in
both ?? and ??. One of the two will be used. Which one is undefined.
Any ideas?
Apparently you can ignore it? From Greg Parker’s Twitter feed: “Race in the zombie implementation, maybe? You can ignore it.”
For me when I had those problems I carefully went through them and googled them bit by bit to solve them. Though for some what I did was put the file on a flash drive and delete the file from my computer and then reboot the Xcode and with some the computer too and put the projects back on from the flash drive. If that don't work then maybe try loading them on to a computer with Xcode 5 and seeing if the errors are still there?

Xcode 5 invalid image path error

Im relatively new to programming and am just in the process of uploading my first app to the app store however i am getting the following error message which i just can't figure out / fix. I have looked everywhere online for a solution but as yet, no luck. Please can someone help? I am using Xcode 5:
Error:
ERROR ITMS-9000: "Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'AppIcon40x40'" at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
This really doesn't mean anything to me as i have tried all the usual asset catalogue stuff / looked at my p-list.
You need an App Icon.
If you created the project in Xcode 5 then there should be a catalogue called Images.xcassets where you should place the icons of the correct sizes for your app.
I have added a screenshot of my app as an example of what I am talking about:
I saw the same error. First I thought that the images where not correct (I found one with 144 dpi), but the error showed up again.
Just search for the exact name "AppIcon40x40" in the whole project using Shift+Cmd+F. I have seen it referenced in a plist file under another key. There you have to change the names to the appropriate ones.

Foundation called mkdir(...), it didn't return 0, and errno was set to 2

I'm following a tutorial in the book Creating iOS 5 Apps Develop and Design. I followed the directions as perfectly as I could but I keep getting this error.
2012-10-27 14:40:14.384 Health Beat[10608:1c0f] Foundation called
mkdir("/Users/dblock/Library/Application Support/iPhone
Simulator/6.0/Applications/5B498D88-3062-4F89-90E2-4B3155C1E325/Library/Documentation/(A
Document Being Saved By Health Beat)"), it didn't return 0, and errno
was set to 2.
I started this project and then updated to xcode 4.5.1 in the middle of it. I don't know if there is some setting that may make this not work.
Link to files:
OSX 10.8.2
Xcode 4.5.1 (4G1004)
MBP 15"
The problem is that you used the constant NSDocumentationDirectory instead of the constant NSDocumentDirectory. Probably you typed NSDoc and then accepted the autocompletion, and Xcode autocompleted the wrong constant.
To find it, choose Edit > Find > Find in Workspace, or press Command-Shift-F, and search for NSDocumentationDirectory.
An errno value of 2 corresponds to ENOENT. Are you sure all the path components before the last exist? mkdir() is not recursive.
Either reset your simulator, clean the xcode build and try running it. Or go to
/Users/dblock/Library/Application Support/iPhone Simulator/6.0/Applications and remove the folder 5B498D88-3062-4F89-90E2-4B3155C1E325 and run again. That could be the issue here.

NSUbiquitousKeyValueStore error : "com.mycompany.myappname" has no valid com.apple.developer.ubiquity-kvstore-identifier entitlment

I set the entitlements file correctly.
I'm getting the cloud url.
the error happen after im trying to save values in the keyValue store.
I can write and read from the NSUbiquitousKeyValueStore,
But after the method finished, I got the error I wrote in the title of the question.
this error happen on ipad 1,
when compiling the same project to the iphone, it works ok without error.
This usually happens when you download your app from the AppStore and update it using XCode.
Have a look at the "Recommended Testing Procedure" in Technote 2285
Are you using different targets for iPhone and iPad versions of your app? Check your entitlements file and make sure it has the correct values for organization all targets.
You might also want to do a text search in your projects folder and see if any files contain the line "com.mycompany.myappname".

Xcode + Time Machine (or Finder copy) = NSInternalInconsistencyException

After using Finder to make a copy of my project, the iPhone Simulator crashes giving me an NSInternalInconsistencyException error. I subsequently used Time Machine to restore the project before I made the copy, but am still getting the NSInternalInconsistencyException error.
This is a small homework assignment and re-creating it wouldn't be the end of the world. My big concern is that I don't understand something fundamental about how Xcode is working. Any illumination would be greatly appreciated.
Update
Apple identified the bug. The iPhone Simulator keeps the last-run version of the app onboard, and doesn't replace it with the copied/Time-Machine-Restored version that is in Run-and-Build. Deleting the app from the iPhone Simulator and performing a new Run-and-Build resolves the issue.
Sounds like a bug. Your source code files should be fine, so hopefully it's not a big deal to just create a new project and add those files so that you can get back to work. You might also want to report the issue to Apple, especially if you can make it happen again.