It has been some time since I posted to this site. I’ve been posting (although infrequently) to Facebook, but think I’ll come back to this and do posts here again. I can always push from here to Facebook.
I completely rewrote my “A Dose of Humor” app and it is not “Daily Dose of Humor”. The rewrite served two purposes:
- change from Objective-C to Swift. Swift is the new language (relatively new anyway) from Apple for iPhone development. Might as well keep up to date with the current language.
- secondly, the database back-end that I had used originally was done in Parse. Parse was a fantastic tool to quickly configure and use a cloud database. Parse was purchased by Facebook, and not too long after it was purchased it was announced that it would close down.
So, with the shutting down of Parse I had to find another cloud database back-end, and I chose to write this in CloudKit, which is Apple’s native cloud database backend.
So here we are, my new app has been released into the wild, check it in iTunes on the App Store.
View on App Store
Now who remembers these things, plus who remembers IBM’s OS/2?
Still have these, might just install it on some spare parts lying around the house. I loved OS/2 when it came out, but it never truly took off.
I’ve gotten the “pin” objects to always point to the center of the doll image, and was able to make it play a sound both when a pin is grabbed and when it is dropped onto the doll.
Video attached.Screen Record_2015-08-21 12.49.32
This is a rough draft (very rough) of the Voodoo Doll app I am working on. I got the coding to always point the pins towards the doll no matter where they are on screen, and removing your finger from the screen drops the pin in place.Next steps for me are to:
1. Make visually attractive dolls and pins to use for this.
2. Enable some way to put a person’s actual face on the doll.
3. Interact with various social media outlets to enable posting of your “victim”.
I am working on a Voodoo Doll app, that will allow you to put pins into a Voodoo Doll (both feel-good and feel-bad pins) that will elicit a response from the doll.
You’ll be able to name your doll, and if all goes according to plan, you’ll be able to take a face from a picture on your iPhone to place on the doll, and then really “stick” it to them.
After you are done, you’ll be able to snapshot your finished product, be it with pins of love or pins ‘o pain, and send them along, post them to Twitter, Instagram, Facebook or just text it.
I’m pretty jazzed about this. It is taking me in directions I haven’t gone in an app yet, and should be lots of fun.
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.
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.
After being painfully sick for almost a week, I was finally able to get back into the rewrite of my wife’s app.
I had previously changed it so it would pull down images and other files from a cloud database at Parse.com. Yesterday I was able to take those files and add them to a local datastore. This happens when the app is first launched. The files are iterated through and anything not found in the local datastore is added, so as we add photos later, these will be automatically downloaded.
I was also able to change the two UICollectionView pages to read from the local datastore instead of downloading the images every time the app is loaded. This makes for a much faster and smoother experience when scrolling through the photo collections on the two tabs that have photos.
Next steps: Do the same for the show list that connects to a UITableView to show upcoming shows that my wife will be at, or events of note where she will be.
I spent some more time revisiting the Susan’s Charming Trinkets app.
Previously I was able to read from the cloud database. This weekend I was able to take that data that I received, and add it to a local data store. Furthermore, I am able to read from that datastore.
Next steps: Read from the local datastore and use the image data from there to populate the UICollectionView..
I previously had used a “Lazy” loader, but with this new approach I should be able to use standard code to populate the collection view.
I’ll try both ways and see which I like better. The disadvantage I saw to using the Lazy Loader that I had implemented was that it would do a small reload (with spinning wheel) going both forward and backward through the collection.
I realize I've been completely slacking with the development of my upcoming app. A large reason is I was just not pleased with how it was functioning.
What is WAS set up to do was connect to a cloud database, download an audio file, and play that audio file for the user. I was finding that it was too slow to obtain the sound file, too slow to download it, creating sometimes 30 second waits for the customer before the audio played (depending on WiFi or cell reception). I found this to be unacceptable. This was causing me to ignore the problem, and not continue working on this project. Then I had that AHA moment where it all became clear on what I should do.
So NOW this is how it is set up:
- I created a local Core Data store to house the sound files.
- Whenever the app is initially launched, the app does connect to the cloud database, at which time it searches the local database for the audio name. If it finds it, the file has already been downloaded and nothing happens. If it does not find it, then the file is downloaded, added to the local database and then played.
- Subsequent button pushes will play a random sound file from the local database
The search is really fast as all it downloads initially is some text and does the search for the name. Now that I've got the functionality going the way I want it to I will focus on the aesthetics of the forms. Making them look all pretty and such.
Now I have to figure out how to create and populate the local version of the database with the sound files that I want to be included upon initial download.