Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setObject not working #7

Closed
cyril94440 opened this issue Jul 13, 2015 · 8 comments
Closed

setObject not working #7

cyril94440 opened this issue Jul 13, 2015 · 8 comments

Comments

@cyril94440
Copy link

Hi,

I am not able to save an object.

The log shows : PINDiskCache.m (303) ERROR: The operation couldn’t be completed. (Cocoa error 4.)

@garrettmoon
Copy link
Collaborator

@cyril94440 that's an error reported by the system when writing the object to disk. Can you give more information? A small sample program showing the issue? What version of PINCache are you using, or even better, what is the last commit?

@cyril94440
Copy link
Author

Hi,
I'll try to provide more information but for now, I didn't change anything in my code directly linked to PINCache. I am using the last version using cocoa pods

On 14 Jul 2015, at 16:22, Garrett Moon [email protected] wrote:

@cyril94440 that's an error reported by the system when writing the object to disk. Can you give more information? A small sample program showing the issue? What version of PINCache are you using, or even better, what is the last commit?


Reply to this email directly or view it on GitHub.

@cyril94440
Copy link
Author

I am using the Parse-NSCoding repo.
Can it be due to a bad NSCoding implementation ?

@garrettmoon
Copy link
Collaborator

@cyril94440 The error is an error occurring when setting the file modification date. It's returned by the system.

If I were debugging this, I'd put a breakpoint at the top of setFileModificationDate in PINDiskCache and see what is getting passed into setAttributes. If it's not immediately obvious what the issue is, can you paste what date and fileURL are in the case where it errors?

@cyril94440
Copy link
Author

Nothing strange :/

2015-07-16 16:25:21 +0000

file:///var/mobile/Containers/Data/Application/5189A230-65E2-4DDD-927F-27817C3711AA/Library/Caches/com.pinterest.PINDiskCache.PINCacheShared/alreadyMatchUsers

@garrettmoon
Copy link
Collaborator

Hmm, are you using the cache from an extension or watch extension? Do you have multiple cache's with the same name?

@cyril94440
Copy link
Author

I am using group for sharing files with the watch extension.
However I am not even using an apple watch. So the code is running only for the iOS app part.
I am using the sharedCache only.
Maybe there is something happening with the group files...?

On 16 Jul 2015, at 22:29, Garrett Moon [email protected] wrote:

Hmm, are you using the cache from an extension or watch extension? Do you have multiple cache's with the same name?


Reply to this email directly or view it on GitHub.

@garrettmoon
Copy link
Collaborator

@cyril94440 PINCache does not yet support running in multiple processes at once (i.e. phone app and watch app) yet see #2

It could indeed be the OS 'protecting' access to group files. I'm not sure :(

I'd happily accept a pull request to implement the feature requested in the above github issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants