Comments (6)
I'm not really sure how to test the cache persistence across versions. Looks like I would need to simulate a change in the CFBundleShortVersionString, and I don't know how to do that. @nodes-ios/developer-team any suggestions on this one?
from cashier.
Look at how the cache compares versions. I think you should be able to manually change that in NSUserDefaults
, so you could make the cache think there's new version :)
from cashier.
I made the change manually in NSUserDefaults, but my test failed. So I investigated a bit more and saw that [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
is nil and [[NSBundle mainBundle] infoDictionary] is an empty dictionary.
from cashier.
That is most likely because of the tests bundle. As a quick hack, swizzling the infoDictionary getter method of NSBundle with a custom implementation would work. Then you can easily control version numbers returned from your custom infoDictionary.
from cashier.
Made PR for Cashier tests #13. NOPersistentStore ignored for the moment
from cashier.
We have added some tests for NOPersistentStore in the Swift types tests. As always, tests can always be improved. But it's safe to close this issue now.
from cashier.
Related Issues (15)
- Add README HOT 1
- Update repo description HOT 5
- Cleanup project folder structure
- Add CocoaPods support HOT 1
- Add documentation
- Add Travis integration HOT 1
- Add SPM support HOT 1
- Add usage examples HOT 1
- Add multiple platform support
- Saving a Swift double does not work HOT 4
- Setting Cashier.<someCache>().persistsAcrossVersions = true only works from the version after the one with this line in it, as accessing the cache wipes per default if version number is increased
- Rename the "Cashier OSX" scheme to "Cashier macOS"
- NOPersistentStore not working properly with Class Arrays and subscripting. HOT 2
- Add swift syntax to readme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cashier.