The new unfinished user guide, provided as a PDF, is a good place to start. I followed Section 3 to set up the project.
I did made some errors; for instance I didn’t choose the Universal option when creating the project. And worse, I copied some invisible strange characters from the PDF into the source, and it ruined all.
But after a couple of days, and an hour a day, an empty project according to Section 3. was running.
Doing the first tests in Section 4. was also easy. So I decided to jump to Exploring Core Data Binding, which is what really interested me.
I did what the user guide told me, and again got an empty app. The guide didn’t mention to change the AppDelegate files, and after studying these I had a path to follow.
Since the PDF is not half completed, I looked at the samples provided. I got some ideas in the upgraded 2.0 samples, but these samples was written for earlier XCode versions.
What helped me, was the new ParseCom App. It was written in a new XCode version. So I used it’s AppDelegate files to rewrite my own project. And after some bug-fixing, it finally ran. And ran very nice indeed!
I make a receipt for you want to try it out here:
- Setup your project as explained in Section 3. in the PDF provided
- Do as told in the Section 4. “Exploring Core Data Binding”. Remember to check for Core Data.
- Change the AppDelegate.h to the following:
@interface AppDelegate : UIResponder`
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
- (NSURL *)applicationDocumentsDirectory;
- And the top of the AppDelegate.m as follows:
@synthesize window = _window;
@synthesize viewController = _viewController;
@synthesize managedObjectContext = __managedObjectContext;
@synthesize managedObjectModel = __managedObjectModel;
@synthesize persistentStoreCoordinator = __persistentStoreCoordinator;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithStyle:UITableViewStyleGrouped];
rootViewController = [[UINavigationController alloc]initWithRootViewController:self.viewController];`
self.window.rootViewController = rootViewController;
Run it on the iPhone simulator and you should have a great template to do ERP database programming on our lovely Apple mobile devices!