GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — core-data/Moody at master · iOSLittleSquad/core-data

Expand file tree

/

Moody

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

Moody

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Config
Config
 
 
CoreDataHelpers
CoreDataHelpers
 
 
DebugLocations
DebugLocations
 
 
Moody.xcodeproj
Moody.xcodeproj
 
 
Moody
Moody
 
 
MoodyModel
MoodyModel
 
 
MoodyModelTests
MoodyModelTests
 
 
MoodySync
MoodySync
 
 
MoodySyncTests
MoodySyncTests
 
 
lib/DominantColor
lib/DominantColor
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
cloudkit-schema.png
cloudkit-schema.png
 
 

README.md

Outline

The Moody Sample Project

This is sample code for the objc.io Core Data book.

Building & Running

You need Xcode 7 or later to build this project.

This project uses Cloud Kit, but by default this is turned off to make it easier to build and run the project yourself.

Structure of the Code

The project has 6 targets:

  • The main app target
  • 3 framework targets
  • 2 test targets

The app target embeds the 3 framework targets.

The frameworks are:

  • CoreDataHelpers -- utility functions, types, protocols, etc.
  • MoodyModel -- the model classes and related logic
  • MoodySync -- the sync code that synchronizes the data with CloudKit

The app target has the UI code, i.e. view controllers etc.

Using CloudKit

The sample app uses CloudKit, and you will not be able to connect to the public database, because it is linked to objc.io's developer account. But you can use your own.

If you want to enable CloudKit, you need the following:

  • Edit the Moody scheme and uncheck the MoodyRemote environment variable under Run -> Arguments.
  • You need to set up your own App ID and provisioning profile in the Member Center's Certificates, Identifiers & Profiles section.
  • The App ID needs to have Push Notifications and iCloud enabled. iCloud needs to include CloudKit support.
  • Change the Bundle Identifier of the app target in Xcode to the one of your App ID.

You'll also have to create the "Mood" record type in the CloudKit dashboard. Below is a screenshot of how this should look like:

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.