Tag Archives: apps

Apple WatchKit and Me.

I've been following Ray Wenderlich (www.raywenderlich.com) and Steven Lipton (in the iOS-Developers group in LinkedIn) for some time, and recently went through some tutorials by both of them for WatchKit, Apple's addition to XCode that allows creating Apple Watch apps (no, it's not an iWatch) that piggy back off of your main app.

I tried adding WatchKit to my Dose of Humor app, but because I originally made the app before WatchKit was available, XCode doesn't like it at all, and is fraught with errors.

So, what I think I'll have to do is create a new project and include WatchKit in it, and then either copy/paste my code over from my original project in Objective-C, or rewrite it in Swift.

The last couple of tutorials I went through with WatchKit used Swift, and I think I could definitely get used to that. It's more user-friendly in terms of language and syntax, which is good for me. Anything that helps me get my concepts and ideas transposed to an app is a good thing.

I think for the Watch app I'll go for super simple. Instead of having to get the joke of the day directly on the phone, I'll enable that to be done with the app. At least that's the plan. Without having done it yet I have no idea what parts are even possible. Ideally I would want the Watch app to force the phone to download todays joke, and then play it over the watch. With some simple animation maybe that mimics what is on the phone.

That's my mission today. Get started with a new project and get it functional for what the app has/does now, then maybe take a look at WatchKit and see what magic I can make happen there.

notsoloud

 

EUREKA!!!

I’d been having trouble populating a UITableView with the entire contents parse data in my iOS application.  Come to find out that when using Parse and referencing the objectId field, that you need to use dot notation and not by referencing the field like the other ones.

So, use this:  parseData.objectId
Instead of:  parseData[@”objectId”]

Who’d have thunk it.
Same when adding to the local data store.  I download the records from Parse and iterate through them to search the local data store.  If found it should do nothing, if not found add it to the db.  Because of the dot notation on the objectId field it would never find it because it search on <nil>.  So the same records got added over and over again.  All the other fields get added using the parseData[@”dataField”] type of reference, which threw me.

Finally, once I figured out to use parseData.objectId instead, it added it correct and found it the next time I launched it so there is only a single entry for it in the local db.

(it was at this point I laid my finger between my lips and made googly noises)

Now just have to format the cells in the table view, make the appropriate actions once the cell is tapped, and I am all done.

It is still a little slow at launch as it searches all the files and tables to add locally.  I’ll have revisit that, maybe only pull down the file name or some other reference to make it speedier.  It’s not horribly slow, but I would like it to be faster.

Susans Charming Trinkets rewrite.

I’m rewriting my first app that I wrote for my wife. The app is Susan’s Charming Trinkets.
I originally wrote this app using PList files as a poor man’s database. These PList files held the location and image names to download to the app for use in the Collection View and show list.
I am reconstructing the app to utilize the Parse database to do this as I feel it both more secure than a PList on a web site, but also gives me a chance to learn more about connecting to a cloud database.
What will happen is the app will connect to the Parse database and compare what is there to what is in a local version contained within the app. It will then download anything not found locally and from this local database will be populating the collection view and show listings.
I’m pretty excited about doing this change. I am also trying to utilize best practices and compartmentalizing the different functions so I can re-use the functionality in other apps I have in mind.
Now that I’ve got it successfully reading from the cloud database in its own class, I need to take what I pull and compare it to what is in the local db, and then add them if they are not found.

Good times.. good times.
Wendell