mysterioustrousers / MTMigration

Manages blocks of code that only need to run once on version updates in iOS apps.
BSD 2-Clause "Simplified" License
914 stars 50 forks source link

Want completion block #16

Closed key closed 10 years ago

key commented 10 years ago

Sorry for my english.

I'm using [MTMigration applicationUpdateBlock]. I want to indicate migrating progress to user. I think when fixed by additional completionBlock. Are there plans to add such a function?

pwightman commented 10 years ago

Hi!

I'm not sure how this could be added in a universally-useful way. The block is called synchronously and it has no idea what kind of code is going to run inside of it, and it will just block until whatever is running is done, and this is on purpose. Every asynchronous library handles progress and completion in its own way. If the way in which you are migrating is blocking the thread or doesn't have its own progress or completion mechanisms, then there's not much MTMigration can do about it, it's simply not possible. Does that make sense?

key commented 10 years ago

Ah, Sorry! I was misunderstanding! (async code in migration block!) Please close this issue.

pwightman commented 10 years ago

No problem, appreciate the input!