Sarp Erdag's Blog

Aug 08

Writing easy to change code

Although I couldn’t attend WWDC this summer, I have been spending quite some time watching some of the sessions over iTunes nowadays.

So far my favorite has been Ken Kocienda’s talk about “Writing easy to change code”. It gives some great tips even if you are not an iOS developer. Here are my notes:

If you want to watch the whole session, here is the link.

Aug 07

3 app releases in 1 weekend

This weekend has been quite exciting for me and my colleagues at Apperto. 3 apps we have been developing for the last couple of months have hit the virtual shelves of Apple’s App Stores.


The first one is a Mac app I was doing for the European Tech Blog: The Next Web. I worked together with the chief editor of the blog, Zee M. Kane and a designer friend Ryan Downie from the UK. The result was a slick widget that works attached to your desktop status bar. It lets you to easily get notified by the news from the Next Web’s website according to different categories you specify. People are asking for a few more features related to user experience and we will be working on them soon. You can get the app for free from the Mac App Store. 


The second one, FaceLight as we named, is a very simple app that lets you search for status updates, videos and links on the Facebook open graph. You can watch videos or visit shared links thru the app and re-share them using your Facebook account. It is rather a quick, helpful app to find stuff that you once discovered on Facebook but forgot where it was some time later.

FaceLight is very open to further development since it has the basis to become a potential Facebook client in the future. We will see how it does on the App store and then add some more features to it through time.

Even if you are not a Facebook addict, be sure to grab it and leave some comments :)


Finally, our last app was an iPad frame app, that scrolls motivational quotes from world famous leaders, authors, business-men and such. We created a chalkboard theme for it to make it look like the quotations were written over a real chalkboard and named the app Chalk Quotes


So, would love to hear your comments on our work. Nice weekend everyone!

Aug 01

Stripping ppc support from your Mac apps

For the last 2 days, I have been going crazy with getting a recent Mac app I developed accepted by Apple. 

For those who have tried submitting apps to the new Mac App Store, you know Apple has a bunch of rules for you to obey. One of them is that the list of valid architectures supported by your app should not include “ppc”.

The important thing to note here is that although you only specify x86_64 and i386 and not ppc in your build settings, your app might just be automatically rejected in iTunes Connect. The reason is that you also need to strip and external frameworks of ppc support you are using in your app.

For me, the extra stuff I used was Growl notifications. As of their SDK 1.2.2, Growl has support for ppc and ppc7400 and since I directly used Growl.Framework in my app, my app was also getting ppc stuff inside. 

After sifting through a couple of questions on StackOverflow, Apple developer forums, and Google Groups for Growl, I found the solution in stripping any dependencies from the binaries, using two simple command line tools called lipo and ditto.

Here is how to use them:

ditto -rsrc —arch i386 —arch x86_64 Growl-WithInstaller Growl-WithInstaller_noppc

lipo -info Growl-WithInstaller_noppc


And, your binaries are stripped off ppc support! Now your app will not be rejected by Apple because of invalid architecture support reasons. 

Jul 29

The bigger, the slower.

I really become sad when I see that the more a company grows, the slower and less productive it gets. There is lots of talk and there is so little action because of bureaucracy, over planning and over staffing. And they lose incredible amounts of time and money because they are spending time on things that never really matter. 

Poor, cumbersome companies drowning in their own corporate policies :(

Jul 14

iMessage vs WhatsApp - Who will be the winner?

Apple’s new mobile operating system iOS will be bringing many exciting new features with its 5th version. iMessage is one of them.

There are two reasons why I think iMessage will have trouble gaining market share among other messaging apps when iOS5 is released.

1) iMessage is built inside the existing messaging app. I know Apple did color coding and stuff but people just may not understand the distinction between iMessages being sent via the 3G/wifi network and the regular SMS/MMS ones via the cellular network. Everyone just tends to use a seperate app for every single task these days. The chat app is a chat app and sms app is an sms app in the user’s eye.

2) iMessage will be “Apple only”. So many people will have trouble chatting with friends who have Androids, BBs or other smartphone brands.

It looks like I am gonna stick with WhatsApp just like I still use Skype instead of FaceTime.

What are your thoughts? Do you think iMessage will beat other messaging apps?

Jun 20

Ciao Apperto!

The formations for my new software development business is almost complete. I have chosen a hybrid way of working further on GrupGuru.com and related services while creating iOS apps in the short term. 

The work “aperto” comes from Italian and means “open”. Spelling it with two “p”s, I think Apperto has been quite a good name for an app development service business :) Especially, geeky Italians love it. 

Be sure to check the site out, I’d love to hear some feedback. In addition, if you are looking for a small team to outsource your app development work or if you think you have a solid idea in mind that might have chance in the App Store, just contact us at info@apperto.com and we shall talk more, in detail.

May 22

Dealing with leaks and growing real memory issues in Cocoa apps

One of the most scary parts of iOS and Mac OS development has been the issue of managing memory, allocs, retain counts, releases and all that stuff. 

Being a developer who has started building apps for the Mac after learning Objective-C and its fundamentals with the iOS SDK, cocoa’s automatic memory management and garbage collection always made me feel weird and insecure about the stability of the apps I build.

To feel more confident with my code while building Mac OS apps, I personally prefer to remove support for garbage collection in my app and handle all memory allocations and releases manually. 

To do this, in Xcode, just open up the inspector on your project’s target (CMD + I), go to the build tab, and set the value of “Objective-C Garbage Collection” setting to “Unsupported” 

GCC_ENABLE_OBJC_GC = unsupported

Other than that, not to have headaches about leaks and app crashes related to bad memory usages, I recommend you to read and learn about the fundamentals of memory management in Objective-C. Here are a few good blog posts that may help.

InterfaceLab - Memory Management for Lazy People

Matt Patanaude - Memory Management in Cocoa

Apple Developer Docs - Memory Management

Apple Developer Docs - Introduction to Garbage Collection

Finally,

May not the leaks be with you :) 

May 18

Hello World

I had tried opening up a few blogs before. The hardest thing is to keep up writing and sharing frequently. I hope this time it will last longer than my previous attempts :)