Category: Uncategorized

Xcode Code Snippets

Xcode appreciation is not universal. @wtfxcode, for example, is a Twitter account relating various issues (and/or frustrations). Also, I often see threads of discussions between developers on how JetBrain’s AppCode is so much superior.

For my part, I never felt the need to switch to a new IDE. Albeit not perfect (no software/IDE is), Xcode fits my needs well.

Having said that, this post is about a bug I encountered in Xcode.

Xcode has a built-in code snippets library in the Utilities bar. (And you can add your own snippets too. See this very useful answer on stackoverflow.com). I use it mainly for Core Data fetch requests. Drag and drop, and press tab to replace parameters for your own variables.

One time I got compiling errors over this (completed) code snippet:

NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"<#Entity name#>" inManagedObjectContext:<#context#>];
[fetchRequest setEntity:entity];
NSError *error = nil;
NSArray *fetchedObjects = [<#context#> executeFetchRequest:fetchRequest error:&error];             // compiling error at this line
if (fetchedObjects == nil) {
<#Error handling code#>                  // compiling error at this line
}
[fetchRequest release];

I stared at my code for a while, making sure that the few code I did input in there was correct, and indeed it was. I couldn’t get where the error could have come from. I tried to manually re-type the same code. The errors were gone.

Advertisements

Once it’s done…

When I first started this project of building my first iOS app to be published in the AppStore, I did it as a goal I set myself when I turned 30, almost exactly a year ago. And that’s I introduced this blog.

I can proudly say today I achieved my goal. My app, Project Countdown, is now on the AppStore. It first got published on April 4th.

I must say the feeling of pride is great and big! I am also equally terrified! I did not test my app as much as I would’ve like it to. It might be full of bugs! I may get terrible reviews on the app store. People pay for it (it’s a .99$ app). They deserve quality software.

Like I mentioned here, another reason why I wanted to finish building my app was a contest. I finished my app in time, and I can also now say I am one of ten finalists in the contest! Game on!!! Conference on mobile app is happening tomorrow. I can’t wait to attend the conference… and for the results of the contest!

This is all so exciting!!!

Also, during the contest, I’ll be tweeting using the hashtag #gappcgodin. You can follow me on Twitter at @leblanc_f.

The big reveal!

Dear readers, I almost forgot you!

Last week was crazy. I did a last sprint that was very challenging. I finally was able to upload my binary last thursday! Current status is: “Waiting for review”. Or, in my own words: “This is so stressful and I don’t have control anymore!”. I am stressed out because there is a conference on april 10th. I am registered to attend, but I am waiting an iTunes Store link for my app to register in the conference’s contest. Without that time limit, a rejection would mean working on my app again and submit it again later on… Which is not that bad…

So I promised to tell you, finally, what my app does… Here it is!

The app is Project Countdown. At school, I have many deadlines: assignments, projects, exams… I dedicate a whole calendar to those deadlines, but I don’t care to know my final is on april 28th. Because I never know what day it is. By the time I remember that we are in March, it’s already April… So I often wake up and realize I only have a week left to study, or work on the assignment, or whatever… I want to know how many days I have left before each deadline. And that’s basically what Project Countdown does. It lets you import events from your calendar (or create fresh ones) and it gives you a prioritized list of your deadlines, letting you know how many days are left before the event, and how urgent it is. Priority is based on the number of days left, also on how many hours you think you need to put in to be on time. You can also create tasks within deadline, that later can be translated back to events.

There you go! More to come soon…

From another world

The last day or so, I was in another world. Almost literally. When I came out of the house this morning to go to school, I took a deep breath and realized how focused I am on my project (meaning: I didn’t go outside for a while!).

I consider my app ready to ship. I know it’s not perfect, and many updates will come. But that last mile I did this week was so much longer than expected! Nothing was good enough, there was always a detail to improve, a bug to fix, etc. If I didn’t impose myself a deadline for this project, I would have never shipped it.

I should have done the AppStore data part a while ago: description of the app, keywords, etc. I guess screen shots are a last-minute deal anyway. Today, I wished for a colleague. For the first time ever. That final sprint was not an easy task. But enjoying doing the work alone 99% of the way, I will not complain and continue to work alone as long as I can. Well, at least to create my first AppStore app, working alone was an absolute must.

I also want to share an amazing tutorial I came across on raywenderlich.com. Yesterday, I started to look at how to submit my app for review. When raywenderlich.com comes up in google, I always take a look. I did not regret it.

I almost forgot to mention what my app does! Later… the week is not done!

 

The Last Few Miles

I am very excited! My app has taken a very interesting shape. I think I will be able to submit my binary this week! I still have to localize my app, though. I will add languages over time, that’s my intention, but French and English are a bare minimum for me.

I truly hope the App Store review process won’t take too long. Coming April 17th, there is a conference here in Montreal about mobile apps. There is a contest and I want to enter it, but I have to provide a link before April 10.

I feel like it’s finally time to reveal what my app will do!

No… not yet! Follow my blog or follow me on Twitter to find out! I will reveal it this week. (You can also just come back here…)

 

A new player worth talking about

Sooner today, Ubuntu launched is new OS for tablets.

I saw the demo, and was pretty excited! I had already seen the presentation for the phone a few weeks back and I was curious. It seemed promising. Something worth digging into. The mobile Ubuntu OS has a non-commercial vibe that’s appealing. But it’s more than that. They come across, to me, as modest. They seem to say: we did it right. We don’t need marketing fireworks. It is integrated, beautiful, fast, secure. We offer an alternative.

That last part is important to me. Tonight, I really feel Ubuntu offers an alternative. And without all the marketing bull surrounding its product, it feels clean, refreshing.

I feel invited. Appealed. Charmed.

And I responded to that invitation by creating a Ubuntu 12.10 partition on my iMac and by downloading “quickly“, the start of the IDE to create mobile native apps.

I must stay focused on my goal, of course!

Note: you can follow them on twitter: @ubuntuappdev

Learning Resources – Part II

In the first part of this series, I talked about lynda.com. I did so because I had just reactivated my account. I just completed a really well done html course given by Bill Weinman.

I will now jump into the “free world” and talk about iTunesU. With more than 350,000 files, hundreds of millions of downloads, and available in all countries where iTunes is available (except in Romania), iTunesU deserves more press. Apple is putting a lot of efforts into education, and I love it. I have started my online studying with an iPhone programming class from Stanford, and this platform remains my favorite one.

The way of delivering content has changed significantly over the years: it basically started as a glorified podcast. Filters on both ends make sure not everyone can publish, hence assuring some quality in the content (although really not consistent), but also can allow institutions to restrict access to their content. Universities can take advantage of the platform as an academic tool for their students.

As of this writing, iTunesU is available as a universal app for iOS device. You can also access content from iTunes on your desktop machine.

What’s great about the iOS app is that courses are organized either in a chronological way or by content. You can check what you’ve seen so far, so you have a good overview of your progress. The catalog is easily accessible via the library, the same way you access the music store from the iPod app. You can also download content in advance, which is a huge plus for me (it was my biggest critic of lynda.com).

In the same breath, I will also say that this “download” feature in iTunesU drives me insane. Let’s say you follow a course that’s already complete, so all the material is available for you to download. You are home, with a high-speed connection and a decent bandwidth, so you decide to download 4-5 lectures. Days go by, you listen to the first 2 lectures and you really enjoy it. Then you take the subway, open iTunesU to realize that all the content you’ve downloaded vanished into thin air. Gone. Even the lecture you are in the middle of.

You use to be able to keep the videos you had already downloaded before, but not anymore. Downloads have an expiration date.

Other than this, which may be a detail for you, if you are always in range of a high-speed connection, the service as a whole is awesome.

Right now, I am enjoying Jerry Cain’s Programming Paradigms course from Stanford. He explains the basics so well and so thoroughly, it is worth it to revisit them. Paul Hegarty’s Coding Together: Developing Apps For iPhone And iPad is also great (I followed this same course but from previous semester). M. Hegarty knows the iOS SDK inside and out, and explains them clearly. Note that these are from Stanford University: they really have the best selection in computer science (at least in my experience). The quality of the course is very good, but also the quality of the material (videos and slides), which also makes a big difference. Be careful for audio-only content: only having the voice of a recorded class that you did not attend is not that helpful. I’ve seen some in my research for this post.