BuySellAds.com

Our DNA is written in Objective-C
Jump

LuckyWheel 1.1.2

In the reviews (which we are now getting with MyAppSales *g*) we saw some complaints which this update aims to address:

  • Customers complained of some really “bad English”. Native English speaker Michael Kayne of SendMeToSpace.co.uk volunteered to proof-read and massively correct all of this.
  • Due to a partially intentional “bug” some people who bought the full version saw advertisements on the end-of-round screen. Since they gave rather passionate feedback against that we decided to end this experiment. First via disabling ads on the AdMob dashboard, and now by removing the ad code altogether from the full 1.1.2 version.

As usual we dropped to price to $1 until Apple gives it the nod. We sent them the binary yesterday.

MyAppSales 1.0.9

This new version, on which I’ve literally been working every free minute in the past week, completes the featureset to make reviews useful for people of all languages because it introduces automatic background translations to a language of your choice. And finally you now find full support for automatic downloading Monthly Free and Monthly Financial reports.

Reviews_TranslationChanges:

  • ADDED: Background processing of review texts with optional language translation.
  • ADDED: New setting to choose target language or no translation.
  • ADDED: If you change target language you get the option of deleting previous translations and redo them for the new language.
  • ADDED: Downloading of Monthly Free reports which complement the financial reports showing downloads of free apps.
  • Language changedADDED: Downloading of Monthly Financial reports
  • FIXED: Flag would not show if there was no sale in last 7 days.
  • FIXED: Many other small bugs related to reviews, translations or financial reports.
  • CHANGED: Apple uses 50 pixel country flags now, changed code to get flags of new stores from new URL
  • CHANGED: Revamped duplicate checking code to be more robust.

There is a known issue with the new downloading pipeline which is actually Apple’s problem. It seems that under some circumstances (too much load?) their ITC website does not properly pass on credential cookies to ITTS which is where the daily and weekly reports are hosted. So every once in a while you might get a red message stating that an unrecognized response was received. This is due to the fact that ITTS is sending an HTML page stating that the session has expired when it actually just has started. The present workaround is to simply hit the refresh button on the reports page, the second time it generally works.

As usual you can get these updates via SVN, it’s tagged as well as the current contents of trunk. And of course I am still happy to receive your donations if you think I am doing a good job maintaining and improving MyAppSales.

Deep-Copying Dictionaries

Cocoa Touch has this concept of basic functionality being immutable and then there is a bigger brother of most classes that adds mutability. One effect of this pradadigm is that often you reuse a single NSString throughout your code because you pass around a pointer to it, retaining it wherever you are interested in it’s continued existence in memory.

Only very rarely you would see the use of the [receiver copy] approach which is like an init but creates a copy of the object. As I said this rarely makes sense because if the original is non-mutable in the first place why do I need to clone it? If it is used in another place and then there it is released and some other static value retained it does not have any adverse effect on other places where it is used, provided that proper retaining occurs.

But this feature is there because there might really BE some esotheric cases. There is even the “copy” attribute for properties which sets up your setters to copy the incoming objects, as opposed to the “retain” attribute which simply retains it.

Read more

Where does this annoying tone come from?

At drobnik.com we are not only publishing our own apps or doing contracting/consulting. Sometimes we get approached by people with an interesting idea or concept for an app who are looking to partner with us. The simplest form of partnership is a publishing deal like we struck with Laurens from ipodandiphoneguide.com. Laurens developed the app “Frequency Annoyer” and sought a partner to publish it for him.

AnnoyerReasons to do so may vary to enter into such an agreement, most developers try to “go it alone”. But Laurens recognized that our experience and help would allow him to reap way higher benefits as he would have been able to by himself. Faster to market, easier navigating around the cliffs that Apple’s review team presents, copy protection, intuitive reporting and lots of other reasons why drobnik.com is the publishing partner of choice. In short: drobnik.com knows how to get you published pronto.

Annoyer IconFrequency Annoyer allows the user to emit high frequency sounds up to the maximum the iphone is able to. There are many uses for this, besides testing your hearing or repelling insects. The reason why most people bug this app is to annoy other people who have a sensitive enough hearing. Did you ever find your self asking “Where does this annoying high pitched tone come from?” This is the app that puts the capability for such pranks right into your pocket.

Getting it ready for to pass Apple’s review was no easy task, let me tell you. Theoretically the iPhone speakers should be able to go up to 20.000 Hertz, but in reality there are hardware differences between iPhone, iPhone 3G and iPhone 3GS which made Laurens’ work really hard. To put it in simple terms: iPhone speakers: Crap. iPhone 3G speakers: fine. iPhone 3G speakers: very fine, twice as loud as 3G.

Rigorous testing was necessary to make sure that only frequencies where enabled that could be sounded without problems. In some cases the physics of sound made it necessary to reduce the volume of the sound to prevent overloading of the speaker and nastly crackling noises. Anything else might would have gotten the “might lead to customer confusion” response from Apple.

Several weeks of acceptance testing on 4 different devices finally paid off when Apple approved the app on the first go. Since then it became an overnight success outperforming all our other apps on the store, even reaching sales rank #5 in the Entertainment category for Netherlands.

Annoyer Rank

– Ranking Data by Applyzer.com

The Dutch are for some reason one of the countries that buys most on the app store, at least when it comes to satisfying their hunger for interesting new entries in the Entertainment category. Twice as many Dutch purchased “Frequency Annoyer” (in absolute numbers) on the second day than people from the USA. Could it be that the US market has reached its Apex and now the sales volume in other markets finally has a chance to play catch-up?

You can now get your mobile “Frequency Annoyer” on the app store. Please comment at the end of this article of interesting uses you found or give us your prank reports.

MyAppSales 1.0.8

ReviewsIf you’re scratching your head, thinking to yourself “didn’t I just see a new version just 5 days ago?” then you are absolutely right. There really was a new version that recently. But that did not prevent me from going into overdrive and burn much midnight oil to get the next release out.

Buckle up, this is “The Review Release”!

Enable Reviews

Changes:

  • ADDED: Tapping on a row on the apps tab now shows the reviews sorted chronologically, new reviews have a red headline
  • FIXED: A bug would cause a chart to hang if the user had sales in excess of a couple of thousand dollars per day or week. Yes, there are really such iPhone Developers who make boatloads of money and they use¬†MyAppSales.
  • CHANGED: Added compiler directive to prevent trying to build the project below SDK 3.0. I figure you are all developers out there and no serious developer would still have his iPhone on an OS below 3.0.
  • CHANGED: The iTunes Connect downloading pipeline is now an NSOperation using synchronous calls. Added a ton of additional error catching code.
  • UpDownADDED: Buttons on the review screen to directly page to the previous or next report of the same type.
  • ADDED: A multi-threaded review scraping engine which is also based on NSOperation. This is amazingly fast compared to competing engines, and all running completely on a background thread. So this can run while you are checking the new daily report.
  • ADDED: Settings to allow enabling of review downloading and setting of the interval.
  • BadgeADDED: Badges on the app icons show the existence of new reviews.
  • CHANGED: your database will be upgraded to schema version 3 with new tables for the review stuff.
  • FIXED: The sync button on the review page is now properly disabled when the sync manager is active.
  • ADDED: Monthly Free reports now get downloaded as well.

Known issues:

  • Financial reports are still experimental and thus don’t get downloaded automatically. Sometimes they are labelled incorrectly and there are lots of other unsolved problems. Check the bug tracker to find out which.
  • Sums are generated every time after there are new exchange rates or new reports. This might cause short periods of lagging.

As usual, before you upgrade, please make a backup of your apps.db. The upgrade should be straightforward, but it never hurts to have a backup. ;-)

The release is tagged in /tags/release-1.0.8 and you may checkout this exact version either from the terminal or via XCode. Or you can simply “Update Entire Project” in XCode’s SCM Menu provided that you have linked your working copy with the repo.

If you have not donated yet to keep me improving MyAppSales, then please do so now to get access to this fabulous update. If you already did, you are welcome to show your continued appreciation by another small donation.

NSDictionary from NSData

When working on the review downloading for MyAppSales I found a situation where I needed to convert NSData I received from an NSURLConnection directly into the NSDictionary which it represents. Neither class really helps you there, there are only two methods to instantiate an NSDictionary from external contents:

  • dictionaryWithContentsOfFile
  • dictionaryWithContentsOfURL

Now where is the missing dictionaryWithContentsOfData? Well, it turns out that such a method exist, but it’s way down the frameworks stack burried in Core Foundation. Let’s make a useful category extension for NSData to fix this for our purposes.

Read more

MyAppSales 1.0.7

The gist of the updates to the MyAppSales codebase for version 1.0.7 where related to improving performance and lay the groundwork to be able to add new features or rewrite current ones with the least impact. For example I added a method that allows me to dynamically upgrade the DB schema from all previous versions to the current one without losing data. This way I can add new tables to existing databases.

Also I added an AccountManager class which allows me to enumerate and deal with multiple accounts. Currently only the first you set up is checked, until I can figure out a safe way to prevent duplicates or wrongfully detected report duplicates from multiple accounts. I am thinking of doing sort of finger-printing letting the app figure out which apps belong to the same account. Something smart like this is necessary because a user is at liberty to delete an ITC account and also a future import mechanism will be FTP and there you also don’t know which account those files are from.

multi_account

There where so many little changes that I simply did not want to wait any more to tell you what’s been going on there. So please be easy on me regarding unfinished features. It’s coming, be patient grasshopper!

passcode

  • pin lockADDED: Experimental support for monthly (financial) reports. Manual import only.
  • ADDED: Possibility to lock MyAppSales with a passcode (aka PIN)
  • CHANGED: Ssettings are now saved in NSUserDefaults as opposed to a plist in the app’s doc dir
  • CHANGED: Split the database code and the iTunes Connect code into discrete classes in preparation for future multiple data sources
  • CHANGED: Replaced keychain wrapper with new custom AccountManager class that allows me to enumerate over accounts in preparation for future additional data sources like multiple ITC accounts as well as applyzer, admob et al.
  • FIXED: The lower part of the cancel button behind “Empty Cache” was irresponsive
  • ADDED: Smart detection of iTunes Connect downtime due to maintenance
  • ADDED: now the iTunes Connect cookies are checked to see if a login was successfully as opposed to scraping
  • FIXED: Login failing after clearing the cache
  • CHANGED: It is no longer possible to combine multiple reports into a single text file for import. The first line of a report is used to determine the report type and dates for the whole file.

If you have a large database and use the passcode lock you might experience a second or so delay right after program start when entering the code. This is normal, and caused by summing app totals being done right after app start. I’ll have to move this to a background process eventually.

If you have multiple old text files to import it is best to feed them in original format to MyAppSales. Should you have several reports mixed into one, here’s a quick shell script that splits those into multiple files and zips them for single-file-importing:

split.sh

# Usage: ./split.sh single_text_file.txt
cat $1 | cut -f13 | grep / |sort -u > days.txt
for I in `cat days.txt`
do
        NAME=`echo $I | sed -e "s/\//-/g"`
        echo "FILE: $NAME";
        head -1 $1 > $NAME.txt
        cat test.txt | grep $I | sort -u  >> $NAME.txt
        echo $I
done
 
zip import_me.zip *-*-*.txt

I have begun to tag the releases on the svn repo. In the trunk you will always find my latest experiments. If you want to get stable code you can now get that from the tags folder.

To summarize: In this release you will find a little bit of eyecandy. But I am proud of the passcode locking feature which has only been requested last week and now it’s already implemented. (Honestly I needed it for another project, speaking of reusable code). I am excited to be approaching a state of the code where I can think of adding data from Applyzer, advertisement reports from AdMob or simple add reviews.

Please let me know what you think by either commenting here or raising a bug report feature request at http://www.drobnik.com/bugs

I’m listening!

Developing iPhone Apps on Snow Leopard

I was quite looking forward to getting a chance to improve my already quite satisfying Mac experience to the latest iteration of the operating system. Having bought my new MacBook Pro after Juni, I was elegible for an extra cheap upgrade. So I filled in my serial number and got promised a delivery about a week afterwards. But not being the patient type I figured it would not be a sin to borrow a friend’s DVD and install the new cat. Hey, I own a license, who cares which media I’m using?

Installation was as painless as can be. You pop in the DVD while your Mac is running, click a couple of times and then you wait. After 20% there is a first reboot, then you wait, all together roughly 40 minutes. At first you don’t see any new stuff, except the same welcome Animation playing in a Window instead of full screen. But then you start to see little things. Many little things, in fact enough to warrant a 23-page in- depth technical review on Ars Technica which is great bedside reading making you dream nicely about your invigorated Mac.

I was excited to install the new Xcode 3.2 from the “Optional Installs” folder on the DVD, then I downloaded and installed the latest iPhone 3.1 SDK for Snow Leopard which in contrast to Leopard is just the SDKs and now Xcode. The Leopard version contains Xcode 3.1.4, which for strange reasons does kind of run, but is “not officially supported by Apple to run on Snow Leopard”. Still, I will show you how you CAN compile against a 2.x SDK. After that I will show you Apple really wants you to do, but leaves it up to SDK diggers to tell the public.

Read more

Love to be Notified!

One of the techniques which I have found to be extremely useful are notifications in Objective-C. Using NSNotification to send broadcasts to all objects in your app is something that I did not see in any other language or framework I visited before. Here is a quick recipe to show how to use them.

Think of notifications as a method of informing all your class instances within your app at the same time. Sometimes there is a global change that does not have a single target like you would for a delegate. Without notifications you would have to keep track of all objects to be informed of the change manually, loop through them and call an update method.

To give one useful example: In MyAppSales you can set your main currency so that all amounts get converted into the currency you are used to instead of showing you Japanese Yen. Now what happens if the user chooses a different currency and you have objects like table views, table cells or your own class instances that need to change something whenever the main currency changes. Enter NSNotification and NSNotificationCenter.

Read more

MyAppSales 1.0.6

There has long been an open feature request for MyAppSales on the Mantis Bug Tracker for displaying a sum total of units sold and royalties earned. Until now I had thought that I would have to rearchitect the way I am calculating sums, but it turns out that a simple SQL statement is fast enough even with almost a year worth of data in the SQLite database.

Apps Screen New LookAnd while I was at it, I also made some additional useful additions and some visual changes.

  • CHANGED: Look of Apps page changed to be closer to AppStore app
  • ADDED: Royalties earned so far and Units sold (coming from Daily Reports)
  • ADDED: Sums are being recalculated when there are new currency exchange rates and after sync
  • ADDED: Smart Auto-Sync. When started the app only communicates with iTunes Connect if there has not been a new report downloaded today.
  • ADDED: “Empty Cache” button on Settings page removes cached app icons, chart cache and other temp files that might have gotten left over in document directory. This also causes the app names to be reloaded from iTunes.

As usual you can update your source code directly from the Subversion repo.