Giter Site home page Giter Site logo

weirdpipo / watchkitapp-appgroup Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 176 KB

iOS WatchKit app example with Appgroup/Documents migration support and auto sync with Darwin notifications

License: GNU General Public License v2.0

Objective-C 100.00%

watchkitapp-appgroup's Introduction

A Watchkit fully working example with Core Data migration support

This is a follow up on my comments at "WatchKit Mistakes" thanks to the guys at [Realm.io] (http://realm.io/) for the feature!

On my post I talk a bit on our mistakes at [Lifesum] (http://lifesum.com), when we did the first lunch of our Watch App, the biggest of them was moving our database from the usual Application Documents Folder to the new Appgroup Shared Folders.

Even through we manage to cover most of the cases on the migration, some users on old devices (iPhone 4S) had problems with the delay and the app ended up not lunching at all.

I this repository I have tried to cover most of the things you need to do to setup an smooth environment between your main app and your watchkit app, the repo includes:

  • How to correctly run a database migration
  • Support for importing bundled databases
  • Using a Shared Framework between the main app and the WatchKit app
  • Syncing data through Darwin Notifications

Setup

  1. Make sure to add your own Bundle Identifier and enable your own AppGroup ID through Xcode Capabilities
  2. Modify ApplicationProperties.h/APP_GROUP_ID with your own ID
  3. Modify ApplicationProperties.h/RUNNING_ON_APPGROUP macro if you want to test migrations.

watchkitapp-appgroup's People

Watchers

Phillipe Casorla Sagot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.