vokal / Vokoder

A lightweight core data stack with efficient importing and exporting on the side.
MIT License
16 stars 14 forks source link

Allow use in app extensions #94

Closed chillpop closed 8 years ago

chillpop commented 8 years ago

To allow Vokoder to be used in app extensions, some small parts had to be removed. Specifically, the parts that call [UIApplication sharedApplication] and UIAlertView/UIAlertController. To achieve this, I added a new subspace that handles the nitty gritty of adding a new preprocessor definition that we can use. (Apple did not expose any way that I can tell to alert the compiler that it is compiling for an app extension.) Without this, Vokoder would fail to build when included in an app extension target.

I added a new today extension target that will be built on Travis to verify that there are no errors. (Thus the giant diff.)

@brockboland, @vokal-isaac, @bryanluby, @designatednerd code review?

chillpop commented 8 years ago

Looks like I need to add some tests for the new target to make Travis happy.

chillpop commented 8 years ago

Change of plans: build the Today Widget target along with the main sample app target.

brockboland commented 8 years ago

@chillpop are you using VOKMigrationFailureOptionWipeRecoveryAndAlert in your project?

@seanwolter @designatednerd @vokal-isaac @bryanluby quick poll: has anyone ever used VOKMigrationFailureOptionWipeRecoveryAndAlert on a project? Can we just remove it? It seems unlikely that many projects would tell the user about this error, particularly with a non-localized alert. Removing it would complicate release versioning on the 3.x branch, to be sure, but this seems like an unnecessary workaround for a feature that probably isn't used.

chillpop commented 8 years ago

I've never used it. I really like that idea.

brockboland commented 8 years ago

Looks like that option was originally added in https://github.com/vokal/VOKCoreDataManager/commit/82f8d8c13687021da411b02a39f9ee877642ea62, maybe written by @mattfoley? Commit message is unclear.

Hey @mattfoley: do you still use this, and if so, do you still use VOKMigrationFailureOptionWipeRecoveryAndAlert?

chillpop commented 8 years ago

🕵️ @brockboland

bryanluby commented 8 years ago

@brockboland I have not used it

MattFoley commented 8 years ago

Used it for years, although on a slightly modified branch of the original CoreDataManager-iOS repository.

MattFoley commented 8 years ago

Oh sorry, never mind, I just used the wipe silently option.

MattFoley commented 8 years ago

Feel free to remove it, I'm spending all my days in React Native lately, no more Core Data stuggles.

brockboland commented 8 years ago

Groovy, thanks @MattFoley!

brockboland commented 8 years ago

LGTM