We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I came across the following scenario:
I have a cache file that I would like to flush on every app update. With the current implementation MTMigration it currently looks like:
[MTMigration applicationUpdateBlock:^{ flushCache(); }]; if (isCacheAvailable) { // (1) loadCache(); } else { writeCache(); }
However, unless a synchronization method is introduced, there is no guarantee that the cache file will be flushed before (1).
(1)
Adding a hasAppBeenUpdated property would allow the synchronous execution of code in an easier way:
hasAppBeenUpdated
if (isCacheAvailable && [MTMigration hasAppBeenUpdated] == NO) { loadCache(); } else { writeCache(); }
Let me know what you think, @pwightman
The text was updated successfully, but these errors were encountered:
Why not move the if and else blocks inside the applicationUpdateBlock's completion block?
if
else
applicationUpdateBlock
Sorry, something went wrong.
No branches or pull requests
I came across the following scenario:
I have a cache file that I would like to flush on every app update. With the current implementation MTMigration it currently looks like:
However, unless a synchronization method is introduced, there is no guarantee that the cache file will be flushed before
(1)
.Adding a
hasAppBeenUpdated
property would allow the synchronous execution of code in an easier way:Let me know what you think, @pwightman
The text was updated successfully, but these errors were encountered: