Saturday, May 31, 2014

iOS 5.1 in Xcode 5.1 in Mavericks

I appropriated our neglected company iPad, because I had to test my app and this was the only iPad I was able to get my hands on. Unfortunately, it was the 1st generation. I updated it to the latest iOS available, but it wasn’t recent enough – 5.1.1 (current version is 7.1.1).

In Xcode it’s possible to set Deployment target for the app as low as iOS 6.0, but that’s it. Therefore the iPad wasn’t even in the selection of devices for testing. I read in Mavericks it’s not possible to build for iOS 5.x, which I found out it’s not exactly true.

The trick is quite simple. Do not rely just on the list of target iOS version, simply TYPE IN the required version, you can go as low as 5.1.1. Since then you can build apps in your latest OS X and latest Xcode for the very first iPad as well.

I had troubles to run my apps on the iPad though, it kept saying it can’t find the storyboard. In Targets > Build Phases > Copy Bundles Resources I indeed had both storyboards red.

The solution is to click on the storyboard in Navigator (left column in Xcode), then in the File inspector (right column in Xcode), find Localization section and check both Base and English. Also make sure Target Membership (just below) is checked. Repeat for the second storyboard and “Supporting files/InfoPlist.strings” file. Storyboards in Copy Bundles Resources turned black.

Somebody suggested to get rid of the Base lang (Project > Info > Localizations), which in my case resulted to losing all the storyboards, so be careful!

Saturday, May 24, 2014

Mind switch

Switching from PHP to Java is awesome and painful at the same time. Awesome, because I can see the cleaner code, painful, because a lot of things, that PHP (and C#) allows and I got used to it, is now harder to do and process in my head.

But it also works the other way around. Now I can see some practices in PHP are not as great (or safe) as I thought. I already learned to keep warn level up to E_NOTICE and kill’em all. That means initialize variables. It’s more code, but it’s also more predictable.

This time I turned back to PHP and I can see why the object model used to be so exaggerated – because in compiled langs doesn’t matter how many includes there are. In PHP each include takes time (I/O) and therefore you should use merged/joined/minified version in production, or even better - use OPcache.

If you try to keep the project the same across different platforms, you always should stick with the rule of Java, where each public class has it’s own source code file.

Friday, May 9, 2014

Quiky for Android

After I submitted Quiky for iPhone/iPod Touch for App Review, I started working on Android version.

I already have Android Studio installed and I started from scratch. My first attempt to make WikiList as drawer failed, so I decided to have the same layout as iPhone app, which makes more sense.

Because my only available Android phone is old GSmart Rola with Android 2.2, I decided to go wide and chose API 8. In the future I can always make separate Android 4 version. It’s gonna be Holo Light, to comply the iPhone app’s design.

I created four activities – WikiList, PageList, PageView and PageEdit, all with RelativeLayout and with Fragments. Then I dragged few controls into them, ListView into WikiList and PageList, WebView into PageView and two EditTexts into PageEdit. Originally I had some buttons there, but I moved them to menu later.

I decided to make first release as soon as possible, even with some bugs here and there, as a motivation. I know Google just scans APKs for malware and publication to Play takes only few hours.

So after it sort of worked, I put android:debuggable="false" into AndroidManifest.xml (it says it shouldn’t be hardcoded, but screw it, should be easier) and made signed APK. I don’t get why there’s no checkbox for debuggable option during creation – I’d assume people make signed APK mostly for the Play. Never mind, version 1.0 was ready and submitted.

I downloaded it and it was OK, but only for the first time. When I tried to launch the app once again, it said “Application not installed on your phone”. I figured it was because I had no SD card and I had SD access permission in the Manifest. After I removed it, it worked just fine.

It took me a while before I grabbed the concept of Fragments and now almost all business logic is in PlaceholderFragment classes. I found out Google offers a “standard” set of icons, which is neat. It even allows me to get closer to the iPhone version.

The rest is just Java, which I mastered couple months ago :)

Monday, May 5, 2014

App rating in Google Play search

It was interesting to see how Google displays results for apps in Google Play. “Quiky” was unique app name throughout the whole store.

When the app was brand new and had no rating, the search for “quiky” showed the app around 10th position in the results. The rest were apps, where the word “quirky” appeared, plus apps featuring Nesquik’s bunny Quik/Quick/Quiky.

When I gave it 5 stars (it’s lame to rate own apps, I know, but this was for scientific reasons! :) the app skipped to about 3th or 4th position.

I asked my brother for another 5 stars (no loser alert, still scientific! :) and since then it stays at the first position.

Friday, May 2, 2014

Quiky Logo

I have to admit, I like creating logos. So when I decided Quiky will be independent app, I knew I’m going to make a nice logo.

My first though was a W of some kind – as “Wiki” (even the name starts with Q, but I already have this for [2013/03#q-logo QetriX]). I tried several fonts and learned I like all four lines of the same length. Also I decided to have each line in different color.


Colors were quite obvious – red, yellow, green and blue. In this order, because of a rainbow. Shades were derived from QetriX logo’s blue, using only hexa numbers 3, 6, 9 and C. And because it was quite faint, especially as a favicon, I added a gray outline.

Last trim was to angle ends of the first and last line (originally it was horizontal), resembling four leaning books (with some unevenness on intersections :-)