I'm fighting with the following error NSCocoaErrorDomain 513 reported by a very small number of users (~ 0.01%):Unable to create directory at path /var/mobile/Containers/Data/Application/EBE2C5D8-5AEC-4D62-9393-B19CAD598FE5/Documents/documents/FF2F88FB-2C07-4FA3-988E-58AD5C21F659/9A02F8A0-74EB-4ED6-81B6-4F40653856D3. Error: Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file “9A02F8A0-74EB-4ED6-81B6-4F40653856D3” in the folder “FF2F88FB-2C07-4FA3-988E-58AD5C21F659”. UserInfo={ NSFilePath=/var/mobile/Containers/Data/Application/EBE2C5D8-5AEC-4D62-9393-B19CAD598FE5/Documents/documents/FF2F88FB-2C07-4FA3-988E-58AD5C21F659/9A02F8A0-74EB-4ED6-81B6-4F40653856D3, NSUnderlyingError=0x15e09de00 { Error Domain=NSPOSIXErrorDomain Code=13 Permission denied } }This error means that the directory cannot be created because of a permission error. That's where I'm lost as the only reason I can see would be if I'm creating a file outside of my app's sandbox.The code generating
Search results for
NSCocoaErrorDomain
1,063 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm fighting with the following error NSCocoaErrorDomain 513 reported by a very small number of users (~ 0.01%):Do the users who have this problem always have the problem? Or can they do something to avoid it (restart the device, delete and reinstall your app, and so on)?Do the users who have this problem have anything in common? All in the same country? Or using the same language? Or locale? All using a particular type of device? Or using a jailbroken device?Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hi everyone.I develop application and I have strange crash when I try to use photo library. I receive crash and this log message when try to present modally UIImagePickerController:2016-09-26 18:45:11.876042 AAA[936:62863] [error] error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///var/mobile/Media/PhotoData/Photos.sqlite?readonly_shm=1 options:{ NSPersistentStoreFileProtectionKey = NSFileProtectionCompleteUntilFirstUserAuthentication; NSReadOnlyPersistentStoreOption = 1; NSSQLitePersistWALOption = 1; NSSQLitePragmasOption = { journal_mode = WAL; };} ... returned error Error Domain=NSCocoaErrorDomain Code=256 The file couldn’t be opened. UserInfo={reason=Failed to access file: 1} with userInfo dictionary { reason = Failed to access file: 1;}2016-09-26 18:45:11.876327 AAA[936:62863] [Migration] Unexpected error opening persistent store <private>, cannot attempt migration <private>)2016-09-26 18:45:11.876605 AAA[936:62863] [Migration] Failed to open store <private&
It may be a vague question, but I'm puzzled with this symtpom.I have an app with a Today extension.The Today extension in the released version installed from App Store somehow does not start up.(It fails to start up with console message: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 connection to service named xxx UserInfo={NSDebugDescription=connection to service named xxx})However, when connected with Instruments (which means, when launched from Instruments), it starts up successfully.The exact same built, that startsup when connected with Instruments, fails to start up without Instruments.Could anyone explain what causes this diffrence?(The extension starts up immediately when run directly from Xcode as a debug built (no 'ate bad food' issue). It uses about 9MB memory. Built with Swift 3.)
I'm using Xcode 8.0 (8A218a) and iOS 10.0.2 to display thumbnails in a UICollectionView via on demand resources. My problem is: The thumbnails appear when using the simulator, but an error occurs when I try to use an iPad 4. The error is a NSBundleOnDemandResourceInvalidTagError. The error debug desctiption is: Error Domain=NSCocoaErrorDomain Code=4994 The requested application data doesn’t exist.The thumbnails are located in an asset catalog. Placing the image resource there caused an additional folder to be created in the finder. That folder has a .imageset extension. I don't see that folder name anywhere in the application or in any inspector. Althought I'm puzzled why the app works on the simulator and not on a device, the problem might be related to the path for the resources. The resources are located in the Download Only On Demand section.For testing, I've removed all but one thumbnail, but the error still occurs. I've followed the Nonexistent Resources section of the On-Demand Resources Guide
After I integrated a notification extension using Xcode 8 and iOS10, I have the following error and I can't find a solution for this yet.Basically I send a push notification with mutable-content, but the extensions is not loaded, I see the following error when the OS tries to use the extension. Apple is not providing any description about what is failing really.Any help would be great, from someone having this feature working already.Dec 31 21:00:00 iPhone SpringBoard(libextension.dylib)[51] <Notice>: calling plugIn beginUsing: Dec 31 21:00:57 iPhone pkd[86] <Notice>: assigning plug-in com.test.app.NotificationWithAttachmentExtension(1.0) to plugin sandbox Dec 31 21:03:57 iPhone pkd[86] <Notice>: enabling pid=51 for plug-in com.test.app.NotificationWithAttachmentExtension(1.0) 38BB5FF1-2597-42E0-B950-169DBFA80573 /private/var/containers/Bundle/Application/A8C47706-C0EC-4FB1-ABA7-0118372F6900/testapp.app/PlugIns/NotificationWithAttachmentExtension.appex Dec 31 21:00:53 iPhone SpringBoard(Plug
Hi everybody, I'm making a little app that make a login on a mysql database, using a php page.when the application return from the php page I take this error:Error Domain=NSCocoaErrorDomain Code=3840 JSON text did not start with array or object and option to allow fragments not set. UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}On the php page, I write some logs and it seems that there is no problem on php page.I'm using xcode 8 and swift 3.this is the code of the application: / let url = NSURL(string: / let request = NSMutableURLRequest(url: url as URL) let username = txtusername.text! let password = txtpassword.text! / request.httpMethod = POST / let body = username=(username)&password=(password) request.httpBody = body.data(using: .utf8) / URLSession.shared.dataTask(with: request as URLRequest, completionHandler: { (data:Data?, response:URLResponse?, error:Error?) in if error == nil { / DispatchQueue.main.async(execute: { do {
I have the following JSON String:{success:1,data:{address:Ny Kærvej 20, 9100 Aalborg, Denmark,email:adm1@fjerkraeservice.dk,username:DFSADM,phonenumber:61366932,status:0,id:2011}}It was retrieved using loadDataTask via a NSURLSession as a block of data.The following code is used to parse it after: var json: [String: AnyObject]! do { self.appDelegate.printJSONResponse(data, message: (#function)) json = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions()) as? [String: AnyObject] } catch {// alwyas fails to here when non ascii unicode present print(error) } // Work around if (json == nil) { do { if let serverStr = String.init(data: data, encoding: NSASCIIStringEncoding) { let asciiData = serverStr.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: true) json = try NSJSONSerialization.JSONObjectWithData(asciiData!, options: NSJSONReadingOptions()) as? [String: AnyObject] } } catch { print(error) } }The line json = try NSJSONSerialization.JSONObjectWithData(data, options: NS
Process: Xcode [1316]Path: /Users/USER/Downloads/Xcode.app/Contents/MacOS/XcodeIdentifier: com.apple.dt.XcodeVersion: 8.0 (11246)Build Info: IDEFrameworks-11246000000000000~3Code Type: X86-64 (Native)Parent Process: ??? [1]Responsible: Xcode [1316]User ID: 501Date/Time: 2016-10-20 14:52:43.202 +0800OS Version: Mac OS X 10.11.6 (15G31)Report Version: 11Anonymous UUID: E921A8AF-B1D2-0BE8-6A07-E7441EB437ECTime Awake Since Boot: 71000 secondsSystem Integrity Protection: disabledCrashed Thread: 0 Dispatch queue: com.apple.main-threadException Type: EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000, 0x0000000000000000Exception Note: EXC_CORPSE_NOTIFYApplication Specific Information:ProductBuildVersion: 8A218aUNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for key 'strategyClass' of extension 'KSImageNamed.CompletionStrategy.ImageNamed' in plug-in 'com.ksuther.KSImageNamed'UserInfo: { NSUnderlyingError = Error Domain=DVTPlugInErrorDomain Code=2 Loading a plug-in failed. UserInfo={DVTP
What is wrong with NSData(contentsOf:,options:) on the device?On the Simulator, i can read the url and get the JSON content, but when i run on the actual Apple Watch, i get the following error:Error 3: Error Domain=NSCocoaErrorDomain Code=256 Could not open file “******”. UserInfo={NSURL=http://******}Here is my code:let url = NSURL(string: http://some.website) var mainArray: Array<Dictionary<String, AnyObject>> = [] do{ let data: Data = try Data(contentsOf: url!) let dictionary: Any? = try JSONSerialization.jsonObject(with: data as Data, options: JSONSerialization.ReadingOptions()) if let dictionary = dictionary as? Dictionary<String, AnyObject> { mainArray = dictionary[data] as! Array<Dictionary<String, AnyObject>> mainArray = mainArray.reversed() } else { print(Error 1: not a valid JSON) } } catch { print(Error 2: (error)) }I tried with URLSession and it works on the device, but it's sooooooo much slower.
1) Main app and extension register for app groups.2) Main app gets a url from NSOpenPanel, makes a security scoped bookmark and saves is in NSUserdefaults with group container as the suite name.3) Run the extension, grab the bookmark data from user defaults and resolve it. The data is not nil, but fails to resolve:Error Domain=NSCocoaErrorDomain Code=259 The file couldn’t be opened because it isn’t in the correct format.
I'm having problems with the [gameName].entitlements for push notifications on iOS 10In iOS 10 you have to press a 'fix me' button in the Push Notifications area under Capabilities. This creates a [gameName].entitlements file which contains the line:aps-environment = development.This file is in my .ipa bundle and should fix a problem with registering for push notifications in iOS10.However, when my app runs I still get this error:fail to register with error Error Domain=NSCocoaErrorDomain Code=3000 no valid 'aps-environment' entitlement string found for application UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}Any ideas?Cheers,Steve
I try to write PHAssetResource to a local file. I got below error.Error: Unable to locate resource <PHInternalAssetResource: 0x1740f8480> type=photo size={4288, 2848} fileSize=1896240 uti=public.jpeg filename=IMG_0001.JPG assetLocalIdentifier=8D1CB279-E377-44E0-BE7B-E37961AC33FC/L0/001It happens for PHAssets that are not on local device. I set isNetworkAccessAllowed of PHAssetResourceRequestOptions to true and check progress. It reports that downloading stop on 0.5 and thorw above error.The iCloud Photo Library is turned on and Optimize iPhone Storage is checked in iOS settings.How to fix this issue? Any suggestion?Code: PHAssetResourceRequestOptions *options = [[PHAssetResourceRequestOptions alloc] init]; options.networkAccessAllowed = YES; [options setProgressHandler:^(double progress) { NSLog(@progress %f, progress); }]; [[PHAssetResourceManager defaultManager] writeDataForAssetResource:exportAssetRes toFile:fileURL options:options completionHandler:^(NSError * _Nullable error) { isDone = YES; if (er
When attempting to add a persistent storei.e. persistentStoreCoordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: self.storeUrl, options: options)We're seeing some errors show up in our crash reporting tool, but not sure how to reproduce it.Error Domain=NSCocoaErrorDomain Code=522 (null) UserInfo={NSSQLiteErrorDomain=522, NSUnderlyingException=I/O error for database at /private/var/mobile/Containers/Shared/AppGroup/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/myAppDb.sqlite. SQLite error code:522, 'not an error'}: file /Users/path/to/my/swift/class/that/attempted/to/add/the/persistent/store.swift, line 37I've read that this could have something to do with Write Ahead Logging, sure. It seems odd that the swift file / line where I make the .addPersistentStore call shows the full local files system path (of my development macine). It makes me think this is something happening only on beta or development builds, but since I can't reproduce it, it's hard to say for certain.It's al
Hi all,I've just started coding Swift, looking to get into some app development - I've got a local application which I'm wanting to test some notifications in (just all in-house, so code inside the app generating it).A few hours ago I deployed a version to my iPhone that had a first set up of it, and it worked OK. Now whenever I run to the iPhone (just connecting through Xcode) it says:Domain=NSCocoaErrorDomain Code=3000 no valid 'aps-environment' entitlement string found for application UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}I understand not being able to do this, if I were distributing the app or something - but the fact that it doesn't work on the simulator for xcode, and it also now isn't working for me when I deploy from xcode to my iPhone? Is this on purpose?I'm really not ready to commit $149AUD to the developer program - it's quite a huge investment, but I'd really like to at least be able to test some core aspects all locally...Ag