Does anyone know how to persist an NSOperationQueue to disk between application launches?
There's no way to do so. NSOperations are actions, parts of runnable code, that are impossible to generically persist to disk.
However, in your application you should know what operations you added to the queue. Either by using a subclass or by having some metadata around. You'd then store the metadata, the information about what should be done, in a custom way. Upon application launch the actions that previously were in the queue can now be re-created from the loaded metadata.
There is hardly anything else I can give you at the moment, but I hope that was helpful already!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With