Archive for August, 2012

Apple wins major victory over Samsung

Saturday, August 25th, 2012

After a year of litigation, Apple has won a major victory against Samsung for violating patents and copying design elements of the iPhone and iPad. Samsung has been ordered to pay out over $1 billion US to Apple in damages.

It has been a very interesting case to follow, with several key members of Apple taking the stand and giving background information on prototype devices and design ideas that had not been revealed to the public before.

I must admit to being glad to hear that Apple won. I remember the first time my wife and I walked into Dick Smith Electronics and had a look at a Samsung Galaxy S – we both looked at the home screen and basic design and said "this looks like an iPhone". Sure, we liked the device, but we did think it was a bit rude. During the trial internal documents and emails from Samsung were released that proved this similarity in design was no accident. In the words of one of the jurers:

The e-mails that went back and forth from Samsung execs about the Apple features that they should incorporate into their devices was pretty damning to me. And also, on the last day, they showed the pictures of the phones that Samsung made before the iPhone came out and ones that they made after the iPhone came out.

See the similarity for yourself…

20120825-214016.jpg
Of course, the judgement will now be appealed by Samsung. And Apple is sure to follow up and request that several Samsung devices be pulled from shelves. So who knows what the final outcome will be, but there are some clear messages conveyed by the jury's decision. In the words of the jury foreman, Velvin Hogan…

"We didn't want to give carte blanche to a company, by any name, to infringe someone else's intellectual property".

The impact will be felt on the coming months by both Samsung and other manufacturers of Android-based devices who will want to steer clear of any similar design and patent issues.

Appcelerator Titanium :: Upgrading tiapp.xml to the newer format, and define custom Info.plist values

Friday, August 3rd, 2012

If you are using Appcelerator Titanium there was an interesting entry I noted in the version 2.1.0 changelog:

Support for custom Info.plist values in tiapp.xml. Many of the existing iOS-specific tiapp.xml values are deprecated in favor of the new values

There are two items of interest here:

  1. Many existing tiapp.xml values are now deprecated.
  2. I can now set custom key/value pairs in the tiapp.xml file and they will be inserted into the projects Info.plist automatically when the project is built. I no longer need to manually maintain a custom Info.plist file in my project to set key/values that Titanium did not officially support. Yay!

The problem is that there is no example of exactly what these entries should look like in a final working tiapp.xml file. A new project created in Titanium Studio still creates the tiapp.xml file using the older / deprecated format. Even the latest KitchenSink sample project, that has just majorly reworked for the 2.1.1 release, is still using the deprecated format.

Here is an example of a now deprecated style tiapp.xml file, which most developers are still using:

<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <id>com.appcelerator.helloWorld</id>
    <name>helloWorld</name>
    <version>1.0</version>
    <publisher>not specified</publisher>
    <url>not specified</url>
    <description>not specified</description>
    <copyright>not specified</copyright>
    <icon>appicon.png</icon>
    <persistent-wifi>false</persistent-wifi>
    <prerendered-icon>false</prerendered-icon>
    <statusbar-style>default</statusbar-style>
    <statusbar-hidden>false</statusbar-hidden>
    <fullscreen>false</fullscreen>
    <navbar-hidden>false</navbar-hidden>
    <analytics>true</analytics>
    <guid></guid>
    <iphone>
        <orientations device="iphone">
            <orientation>Ti.UI.PORTRAIT</orientation>
        </orientations>
        <orientations device="ipad">
            <orientation>Ti.UI.PORTRAIT</orientation>
            <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
        </orientations>
    </iphone>
    <android xmlns:android="http://schemas.android.com/apk/res/android">
    </android>
    <modules>
    </modules>
</ti:app>

Note the following issues here:

  • The persistent-wifi section is deprecated in 2.1
  • The prerendered-icon section is deprecated in 2.1
  • The statusbar-style section is deprecated in 2.1
  • The statusbar-hidden section is deprecated in 2.1
  • The iphone section with the orientation settings is deprecated in 2.1

So what should this look like? And how do we set custom key/value entries to be included in the Info.plist?

Here is a working tiapp.xml file using the newer format:

<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <deployment-targets>
        <target device="mobileweb">false</target>
        <target device="iphone">true</target>
        <target device="ipad">true</target>
        <target device="android">true</target>
        <target device="blackberry">false</target>
    </deployment-targets>
    <sdk-version>2.1.1.GA</sdk-version>
    <id>com.imattsolutions.equipd</id>
    <name>Equipd Beta</name>
    <version>1.3.0</version>
    <publisher>iMatt Solutions</publisher>
    <url>http://www.imattsolutions.com</url>
    <description>Mobile App for Ministry and Bible Study</description>
    <copyright>2012 iMatt Solutions</copyright>
    <icon>Icon.png</icon>
    <fullscreen>false</fullscreen>
    <navbar-hidden>false</navbar-hidden>
    <analytics>false</analytics>
    <guid>0fcd52a3-02b0-4b6a-aed6-we234522sf</guid>
    <android xmlns:android="http://schemas.android.com/apk/res/android"/>
    <modules>
        <module platform="iphone" version="0.1.22">zipfile</module>
    </modules>
    <ios>
        <plist>
            <dict>
                <key>UIRequiresPersistentWiFi</key>
                    <false/>
                <key>UIPrerenderedIcon</key>
                    <true/>
                <key>UIStatusBarHidden</key>
                    <false/>
                <key>UIStatusBarStyle</key>
                    <string>UIStatusBarStyleBlackTranslucent</string>
                <key>UISupportedInterfaceOrientations</key>
                    <array>
                        <string>UIInterfaceOrientationPortrait</string>
                        <string>UIInterfaceOrientationPortraitUpsideDown</string>
                        <string>UIInterfaceOrientationLandscapeLeft</string>
                        <string>UIInterfaceOrientationLandscapeRight</string>
                    </array>
                <key>UIBackgroundModes</key>
                    <array>
                        <string>audio</string>
                    </array>
            </dict>
        </plist>
    </ios>
</ti:app>

Notice that all of the deprecated settings are now migrated to the new ios > plist > dict section, including an example of a custom key UIBackgroundModes that will be included in the generated Info.plist.

For a detailed description of all Info.plist keys, see the iOS Info.plist Key Reference on the iOS Developer Center.

You can read more about the specifics of the tiapp.xml file here.

I hope this helps developers convert their projects over to the new format – it certainly makes more sense long term to use this approach to setting custom key/value pairs in the Info.plist file that drives our projects.