Archive for the ‘Apple’ Category

Few words on cracking iPhone applications

Few days ago I was reading about Craculous being released as an open source application. Since Craculous is an iPhone application cracking tool and I have a few apps in the AppStore I have a few points to make to all those people who are considering using the tool.

I know a few developers who write apps for the AppStore. They aren’t millionaires. Some of them barely make enough money to cover their bills. Others, work second jobs because the income from the AppStore is just not enough to pay for their necessities.

Yes, there are few people who were lucky enough to make good money but, if you think for a second, how many of those have you heard about? 3, 5, 20? And how many apps are in the AppStore? The last number was around 18′000. So who do you think you are stealing from? You may as well go to the poorest part of town you live in, find a woman who is working 2 jobs to support her and two children and then rob her. That’s pretty much an real life equivalent of you cracking an app from the AppStore.

Now that you know how it feels from the other side of the AppStore let me tell you a little bit of what happens when the third party developers can’t make enough money. People like I and my friends have two choices.

First, is just to say “fuck it!” and do something else where we can make some money. The second option is to develop ad supported apps. Both of these options aren’t very good for you.

See, unlike artists (musicians, actors, producers) we developers can do other things. We can work for companies and write business apps for them. We can create subscription web apps for which you will shell out way more money then a simple app on your phone. We can work for big companies Apple, Adobe, Microsoft and create apps that are locked
so tight that you will need a blood sample to authenticate yourself as a user. It’s not the most attractive work but it does pay the bills. We can do that but then you will not get the cool apps on your phone.

Honestly, most of the indy developers would rather create apps for you. Find out what you need and help you out with the solution. All we ask is for you to help us pay our bills.

Now the second option. Adware! Sounds almost like a curse word and it really is. When someone develops adware they are no longer working for you. The are working for the people who peddle their products through the software. You will never have as good experience with adware as with software that is developed for you. You loose the control of what features are added to the program because you aren’t paying for it. This is why most adware software are pieces of garbage.

Take for example the shows you get on TV stations supported by commercials and the ones that are not. Most of the shows on commercials supported channels are designed to sell you stuff. The plot is created to build the suspense up and stop for a commercial break. They will always leave you hanging and show you the stuff they want to sell to you.

On the other hand when you watch shows from stations which do not have to rely on sponsors you will get the whole story. They don’t have to worry about placing the ads and creating the shows with ads in mind. They just want to give YOU the best experience. The best show.

Similar things you will find in software. Either you pay for the best experience there is or you are going to get junk that sells you other junk. Your choice.

The last thing I would like to bring to your attention is the word “honor.” Where is their honor? I realize that some people might have forgotten the word. Others, may be confused by the myriad of definitions.

I am talking about this one:

honor
- noun
“honesty, fairness, or integrity in one’s beliefs and actions”

Is cracking $0.99 app worth giving up your integrity?

Please comment and let me know what you think.

iPhone SDK 2.2 – CodeSign Error

My weekend work plans were simple.

  1. Update iphone sdk to 2.2
  2. Write some more functionality for my FitTimer app.

Unfortunately the second part of my plan was never started because updating the SDK took most of my Saturday and Sunday.

The official update was not very difficult but after I have installed SDK 2.2 and updated my test devices I no longer was able to install my apps. I have gotten this nasty CodeSign error:

"CodeSign error: a valid provisioning profile is required for product
type 'Application' in SDK 'Device - iPhone OS 2.2"

I have done everything from adjusting project settings to regenerating certificates and provisioning profiles. I have not gotten much traction with any of my efforts. The solution came after I have found a post claiming there is a bug in SDK2.2 that causes for the project files to get corrupted.

So I have pulled out my trusty (MacVim) editor and opened up the: ProjectName.xcodeproj/project.pbxproj file and started snooping around.

I have found that I had multiple Build Configuration sections and my

"PROVISIONING_PROFILE[sdk=iphoneos*]" =
   "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

entry had a different number then my installed provisioning profiles.

So here are the steps to get it working again:

  1. SAVE YOUR WORK JUST IN CASE THIS SOLUTION DOES NOT WORK FOR YOUR PROBLEM
  2. Save your old project file.
  3. Go to ~/Library/MobileDevices/Provisioning Profiles
  4. Figure out which profile is the one relating to your project. Sometimes the profiles are saved with UUID as the file name so you may have to run grep with your project’s name to figure out which one it is.
  5. $ grep myAppName *
    Binary file xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.mobileprovision matches
    
  6. Copy the xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx number.
  7. Save your current work and close XCode
  8. Go to yourProjectDirectory/ProjectName.xcodeproj/ and using a text editor (MacVim for me) open the project.pbxproj file
  9. Find all "PROVISIONING_PROFILE[sdk=iphoneos*]" entries and replace the assignment value with the number you have copied in step 4.
  10. Save the project.pbxproj file
  11. Reopen Xcode and recompile your projects. The CodeSign error should be gone.

I hope this helps and saves you a lot of time.

Good luck and if you have some time please check out my app: FitTimer

Updated: [important]
Please read Big3’s post https://devforums.apple.com/message/15497 and file bug report with apple. Send them your saved project file so they can figure out why XCode projects are getting corrupted.

iChessClock in the Apple AppStore

Brent and I finally were able to submit our first iPhone application. It’s a simple yet elegant chess clock that can satisfy most of the chess matches out there.

Eidetic Software’s Website:
http://www.eideticsoftware.com

The iChessClock is available at the Apple AppStore

Using MacRuby to set Xcode project version from git

I have been looking into automating some of my development tasks in Cocoa/Xcode environment.  For the longest time I was using Subversion which would integrate quite well with Xcode. Recently, however, I have been exploring other version control systems.  Especially git.  Since it’s a much newer (D)VCS it does not have as much integration into systems as subversion.

I have managed to find some interesting solutions to include Git version number in Xcode project however the only actual solutions I have found are written in languages I don’t care for anymore.  Yes I can program in them but why would I want to.

So here is a quick solution written in MacRuby.

#!/usr/local/bin/macruby

git_output = `git show --abbrev-commit`
commit_version = git_output.split("\n").grep(/^commit/).first
version = commit_version.gsub(/^commit\s+(.*)\.{3}/, "\\1")
if version
  list = NSMutableDictionary.dictionaryWithContentsOfFile("Info.plist")
  list["CFBundleVersion"] = version
  list.writeToFile('Info.plist', :atomically => true)
end

In my final solution I intend to have an output in following format:

major.minor.revision (build)

where the “build” is going to correspond with the git commit version
and the other parts will reflect the marketing version numbers.


Ref: Shiny Frog Article Python solution
Ref: Cocoa is my Girlfriend Article Perl solution

Quick rename of menu items in XCode

Sometimes a little bit of automation goes a long way and other times it may be just wasted time. I have run into one of these situations recently when dealing with Xcode and trying to rename menu items from NewApplication to the Application Name.

For Example:

Quit NewApplication -> Quit TestApp

My first approach was to use Ruby open the MainMenu.xib and do a replacement. This technique may prove to be useful in the future when I have more command line tools for other tasks, but currently there is a much simpler way of dealing with renaming menu items.

1. Right click on MainMenu.nib and select “Open As” -> “Source Code File”

2. Press: “Command-F” to open find/replace dialog

3. Replace all NewApplication strings with desired application name.

That’s it

Webkit-appearance property.

I have spend some time wondering why would Apple decide to style their buttons in a non-standard way and then not respect the css style set by the designer. I just found the answer how to get rid of the Apple predefined style and allow the buttons to look like in every other browser. To do this you have to set the webkit-appearance property to none:


input { --webkit-appearance: none; }

That’s all.

CocoaHeads Arizona Google Group

It seems that Google (the search engine) has hard time associating XcodePhoenix with CocoaHeads Arizona or Cocoaheads and Phoenix and people are finding my site when searching for the group. My previous post did not mention the Google forum XcodePhoenix uses for communication so here it is:

http://groups.google.com/group/xcodephoenix

Hope to see you there.

New Mac Pro for my work.

Sometimes it is very cool to work for a small company. It comes with perks you just can’t get in a big corporation. For example, a new computer. Yes my old Dell workstation is still working well; however it is not optimized for a *nix geek. So I my boss let me get a workstation that will better fit my work habits. I got a brand new Mac Pro! I don’t think I could ever get that in a big corporation unless I was working for Apple.