iOS 8 – my expectations & wishes

iOS8_expected_550
Source: http://rococovintage.blogspot.de/2010/04/fishes-in-trees-or-what-is-left.html and http://realitypod.com/2014/02/annie-leibovitz-disney-films/

Since WWDC will start tomorrow, I will just trow in my guesses or wishes or expectations on iOS 8. Since I did this already last time iOS 7 was in the process of being shaped, I will continue on this procedure. But I change something, I will make a table to more easily check off the stuff that was implemented / realized.

Features & Fixes expected
Feature/Issue/Wish Done/Fixed?
Simplified Contextual Settings
Have all the settings related to your app in ONE contextual ViewController which is the same style & look & feel everywhere. This thing may feel more like the NotificationCenter. But having Settings distributed and hidden in a thousand places is just frustrating. Plus the Settings app is now an overloaded bloated monster controller.
Nope.
Siri API
Siri is a hell of a nice technology piece. Being able to give commands with spoken language sometimes is a real benefit. To integrate Siri commands, Apple needs to provide a kind of API where an app can announce certain spoken commands it will react to. Think e.g. the Photo App to make a photo by just listening to your voice. It has to announce the magic command and then we just switch on iPhone’s LISTEN & ACT functionality (like in STNG the communicator).
Nope.
Day & Night Mode
Apple should add the possibility to apps to support a day & night mode. Apps then will be able to adapt the UI to environmental lighting conditions. Basically this will mean make more use of UIAppearance but it also involves some solid detection of stable lighting conditions. Also it would be great to have the condition of Extrabright/Sunlight mode, where contrast gets enhanced in a certain way automagically. This is an urgent need especially now after we got a whole lot of more white areas on the screen with iOS 7. This is much too bright in the evening and you have to dim the screen to not hurt your eyes if you open up e.g. tweetbot in the dark. Alternatively give us developers access to the lightsensor values to adjust the UI.
They added this to OS X first (black & white). Surprise, surprise.
Kinda, OS X first.
Lively App State Icons
Apple is doing this with Calendar App and Clock App already. So it is tested functionality already. To make it work for the masses we need to make it work in the review process. So added different state icons to the review would be such a great thing. Apps running in the background could define to display certain app icons to communicate the inner state without the need to open the app. I want that since day one of the iPhone and iPhone OS 2.0!
Nope.
Marking & editing text with the finger
It’s awful, it could be much better. There do exist picture perfect concepts of how to fix this. CAN WE PLEASE HAVE THIS CONCEPT BECOME A REALITY SOON? Apple Engineers please see also this tweet.
Nope.
Important System Settings in NotificationCenter
I dislike ControlCenter, kill it please. It interferes with the scrolling process way too often. Just put all this stuff in NotificationCenter please. There is a perfect picture of how this should look like here.
Nope.
iCloud Transparency
Please be transparent, WHAT actually goes into the cloud. And please leave iCloud off by default. I do not want stuff to be copied to the cloud unwanted. This is important to me. If I want iCloud to be on, I would like to see WHAT and how MUCH of it actually goes there. Please enforce transparency on this for your own apps and those of all developers.
Nope.
Encrypted E-Mails (Default-ON)
Some way to easily encrypt all my E-mails and attachments would be a really great idea. But actually Apple now is more involved in rolling back security in Mail.
Nope.
The power cable & charging process
Every device needs power. Nearly every day. Why the hell do iPhones, iPods and iPads switch themselves ON when they were put on or are cut off from the power cord? What’s the reason behind this? Fix it! Leave it off please. Thanks!
Nope.
The-one-Icon-too-much Situation
Everytime I reorder my Apps on the Homescreen, it gives me a headache to move these dumb little things in a way they not accidentially destroy the complete order of ALL following panels. If I place a new Icon/App on my FULL homescreen the last icon gets pushed to the next screen, which leads to the following panel pushing its last icon to the next, and to the next and to the next… +bingo+ we have a cascading effect here, but that is not what I want. Please push this Icon in some “Parking Slot”, from which I can move it to its new position easily. Please, fix that soon!
Nope.
RAM Degradation aka Memoryleaks
Many people do not restart their phone for months. But during this time OS daemons and other stuff leak memory continuously. This leads to significantly less available memory for apps and their execution. Please force free leaked memory with some procedure which is friendly for customers. You could e.g. restart certain system daemons during NO-USE-TIMES (e.g. the night, when customers are asleep). Fix it!
Nope.
Battery
If you guys have the choice of making this thing thinner again or giving it more LI-Batterypacks, please go for the more electrical power approach, please!
I count this as a YES, because you can now see which app uses how much battery.
Kinda.
Multi-User and/or Guest Environment
It is not so much an issue with the iPhone than with the iPad. The iPad invites to be passed around for gaming, photos and so on. At least it would be great if I could have a GUEST-mode where no Push-Notifications show up, none of my Apps is used by the guest with my documents/accounts/favorited links and so on. Even some YOU CANNOT leave this app without my permission/password-mode/switch would be helpful.
Nope.
YAARS (Yet another aspect-ratio screen)
Yes, I like variety, I like happy customers, but I do not have unlimited resources to support app development or maintenance. Supporting any new aspect-ratio is costly and adds to the overall amount of work needed to build an app. Just try to be conservative here, please and do not introduce new aspect ratios.
Yep.
Support for second screen e-Ink-Displays
This wish goes hand in hand with my wish for a simple yet touchsensitive e-Ink device. I still miss a device from apple to read my eBooks on AND (and this „AND“ is important) where I can make annotations to text in RED color. There does already exist e-Ink in 3 colors. That is all that is necessary. Make iBooks a completely stand-alone-device AND make it capable of using AirPlay as second screen output medium. This second screen is why I want e-Ink-UIAppearance Support. So I can build viewcontrollers to output stuff on e-Ink displays/second screens. This would also overcome the limited visibility of screen content in bright sunlight.
Nope.

Countdown WWDC 2014

Now lets wait for the show to begin…

countdown_wwdc_2014
Click to see countdown…

Predictions

I just want to add some predictions to make things even funnier here.

  1. Sparklines will rise to new poplularity in all kind of apps 100% CORRECT, look at Healthbook
  2. The bulky, 3d, skeudo navbar on Apple’s website will become flat 100% WRONG, it’s still there.
  3. Several other iDevices will get the fingerprint-sensor 100% WRONG
  4. OS X Finder will be the same piece of cr*p after full recoloring-frenzy of OS X 10.10 WE WILL SEE…
  5. Pasteboard sharing between OS X & iDevices will become standard (think „Pastebot“ stev’d) 80% CORRECT, we got AirDrop now!
  6. Settings App will get even more crowded with more fancy knobs, sliders and endless lists (internal codename: „will-o-the-whisp“) 100% CORRECT
  7. A supersecret deal with creditcard companies worldwide will activate iPay for all iDevice owners; adding iShop In-App-Shopping for anything and instant pay via iPay to ANY app in the ecosystem. 100% WRONG, this time!!!
  8. Helvetica Neue will become default System Font 100% CORRECT
  9. OS X will copy Windows frozen glass effect all over the ballpark 100% CORRECT
  10. iTunes won’t go away or be split in several apps 100% CORRECT and that is why I switched to VOX completely.
  11. Apple will chime into bigger is better and release an iPhone with even bigger screen (because sayin‘ no you know) 100% WRONG
  12. Dr. Dre will call out to Snoop Dogg, Eminem, Xzibit, 50 Cent to really get the party started… to later let Eminem perform „I need a doctor.“ to underline he himself has no real doctorate degree, and Apple Dev audience & Tim Cook will need one anyway after their performance during the keynote will be completed. *justkiddin’* 100% WRONG
  13. More to come…

Why do I blog this? I want to keep track of things. So I transferred all open issues from my former blog post „iOS 7 – what I would expect it to fix“ which are still open and added some new. Please recognize that I have given up on UI issues related to the new flat world and the non-existent buttons. I simply lost hope on this thing. But hey let’s see how well non-buttons will go on OS X if they do the full 100% recoloring of OS X in iOS style… *praying for this not to happen right now*

… btw, did you recognize my curvy design of the „8“ in the fake-„iOS 8“-banner I created? It refers to the nice woman next to the 8. It plays with the beauty of female shape. I wish Apple would allow itself to refer more to the full spectrum of human aspects in it’s design. We are no machines or robots. We love human shapes and asymmetric stuff. It feels much more natural to us.

Update: I added the music which would best fit iOS 8 if I would have released it.

Oh and by the way, I know Apple is building something that is as impressive in regard to overall design that will look much better than iOS 7 and iOS 8 together: Apple Campus 2. Though here in Europe you would say „This is just bricks & mortar“ I say this lays foundation to new ideas. I mean, I would really enjoy to be even a part time resident e.g. for 3 months or so in this kind of place. It must be great to work at a place so thoughtfully designed.

How to change app locale independently from iOS system locale

Flags of european languagesI just want to share a trick on how to gain control over the Locale used for your app. The following code snippet is put in the main-method which kicks of your app.

But basically you should call this code snippet in your app and then make the user quit/terminate the app afterwards to restart with the new set default language AND set these parameters here again depending on a flag you may have stored elsewhere. Because actually all those set default values are actually already used at an earlier point in time i.e. for date formatting.

int main(int argc, char *argv[])
{
    @autoreleasepool {
        
        // OVERRIDE LOCALE (BASICALLY DO THIS WHILE APP RUNS AND LET USER RESTART APP)
        BOOL shouldOverrideLocale = NO; // LET'S TRY TO OVERRIDE IT WITH en_US
        NSString *languageIdentifier = @"en";
        NSString *countryIdentifier = @"US";
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        
        if( shouldOverrideLocale ) {
            NSLog( @"OVERRIDING SYSTEM LOCALE WITH : %@_%@",languageIdentifier, countryIdentifier );
            [defaults setObject:[NSArray arrayWithObject:languageIdentifier] forKey:@"AppleLanguages"];
            [defaults setObject:[NSArray arrayWithObjects:languageIdentifier, nil] forKey:@"NSLanguages"];
            [defaults setObject:[NSString stringWithFormat:@"%@_%@", languageIdentifier, countryIdentifier] forKey:@"AppleLocale"];
            [defaults synchronize];
        }
        else {
            NSArray *keysToRemove = @[@"AppleLanguages",@"NSLanguages",@"AppleLocale"];
            NSLog( @"RESETTING TO USE SYSTEM LOCALE" );
            @try {
                for( NSString *currentKey in keysToRemove ) {
                    if( [defaults objectForKey:currentKey] ) {
                        [defaults removeObjectForKey:currentKey];
                    }
                }
            }
	        @catch (NSException *exception) {
	            // NOTHNG TO CATCH HERE
	        }
	        @finally {
				[defaults synchronize];
	        }
        }
        NSString *languageCode = [[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleLanguageCode];
        NSString *countryCode = [[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleCountryCode];
        NSLog( @"USING SYSTEM LOCALE: %@_%@", languageCode, countryCode );

        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

If you use this code, keep in mind, that strings and processes related to In-App-Purchase are still delivered in the native language of the user.

See also my Example App in the Github repo called LocaleOverrider.


preview

There may exist other ways of doing this. It may also be the better approach to handle all localization on your own an reinitializing NSBundle usage.

A more advanced insight into localization issues provides help on all the NSNumberFormatter and NSDateFormatter thingys, too. It is written by Ray Lillywhite and has the title „The Nitty Gritty of iOS Internationalization and Localization“.

Update 26.12.2018
How to change language elegantly at runtime.

Why do I blog this? I mentioned this code in UISprech podcast and I want to make it available to others. But be warned, it has side effects of providing the user e.g. with inconsistent language when he enters IAP e.g. and you need to find a way to elegantly terminate the app after you configured the new default language. (Pro-Tipp: shutting down an app that is already in the background won’t be noticed as a crash.)

django – some first impressions

If you would like to learn this stuff the professional way, you may try…
Python

Get into Python

Get started learning Python with our Python Tutorial. This tool is intended for everyone who wants to learn Python programming language, whether your are a beginner or already a pro.

TRY IT…

django-logoSince I mastered the setup of my apache config to actually find my django project I experience some more fluent development happening.

Actually I learned already a lot about the powerful namespacing pattern for URLs which frees up a lot of capacity you usually spend on fixing broken link experiences for users and wrapping your head around url-paths.

Actually the url-handling via regex is a bit painful at first, but it turns out that this gives you extraordinary flexibility to create wonderfully simple and elegant looking urls which is a thing nowadays if you wanna be found in Google at the top ranks and provide useful permalinks e.g. for products whoich should be found easily.

Also the template engine is very flexible. I can create a kind of loopholes (called blocks) in my base templates to prepare them to get stuff injected from lower level templates which is great. You could build a very complex site in no time and have things like header, navigation, content, footer easily setup and look consistently.

Learning with the best tutorials

After I did the painful 6-part tutorial, I just did another very good tutorial on youtube (and still executing on it). And boy was I happy to actually have learned things the „right way“ before. because in the youtube based tutorial above the guy explaining stuff there totally misses on the concept of url-namespacing. But see for yourself here:



Source: Django Full Website Tutorial by hackedexistence.com

If you know some excellent tutorials, e.g. on how to setup django for SSL-based deployment and the like, let me know in the comments.

I also found some very helpful other links:

Python tricks often appreciated

During all my tinkering I also did used a lot of really useful operations using the manage.py command. E.g. today I just wiped my database to try repopulating it with stuff I dumped before. It was quite easy and which is good to have for experimenting and not loosing all your data. Just be careful you do not change the DB-scheme during these operations.


python manage.py dumpdata > temp_data.json
python manage.py flush
python manage.py loaddata temp_data.json

I also made a lot of use of following command:

python manage.py shell

This loads the whole project or in a way has all the settings needed setup for you. Some quick

>>> from <myApp>.models import <myEntity>
>>> dir(<myEntity>)

Gave me really helpful insights, what the object I have actually is capable of doing, by displaying all the methods and attributes available.

My bootstrapping file for Vagrant now was extended by a lot of useful stuff, but actually I did not destroy my VM recently so if all this works will be seen on the next setup of my VM using vagrant up.

Content I added to my bootstrap.sh file:

# SETUP FOR BOOTSTRAPPING
apt-get update

# INSTALL apache
apt-get install -y apache2

# INSTALL mod_wsgi
apt-get install libapache2-mod-wsgi

# INSTALL django
apt-get install -y python-django

# INSTALL python imaging library
apt-get install python-imaging python-imaging-tk

# INSTALL postgres & python db connector
apt-get install postgresql python-psycopg2

I also backed up my apache config files now to some place external to the VM (shared folder) so I do not loose all config stuff if I destroy the VM.

Further education

To gain some flexibility for my models I just started reading stuff like e.g. „33 projects that make developing django apps awesome“ and „Django database migration tool: south, explained“.

south_logoSouth (start Tutorial here) looks like an elegant solution for my purposes because it provides intelligent schema and data migrations.

The plain vanilla way to do migrations would be Django’s Evolution. But even they point out that South has become a De facto standard. Looks like some stuff was inspired by ActiveRecord from rails.

So some line of
sudo apt-get install python-django-south
just made it fly. I like the ubuntu way of installing software… just to revert the action using
sudo apt-get remove --purge python-django-south
several minutes later because south was not correctly installed and better should have been installed through using pip.

So doing a sudo pip install south to get the e x a c t same result. So must be some other error. Doing some googleing on that one… turns out south needs to be entered in the INSTALLED_APPS entry in the settings.py… nice that you find that on the documentation so easily. So this stackoverflow-line helped me out again:

You probably haven’t added ’south‘ into the list of INSTALLED_APPS of your settings.py file

But at least I now know the exact version of south installed. It’s 0.8.2 the one installed by apt-get was only 0.7.3, so I guess pip is the better way to fly. And now python manage.py did show:

[south]
convert_to_south
datamigration
graphmigrations
migrate
migrationcheck
schemamigration
startmigration
syncdb
test
testserver

Fine! Now that I got that installed the python manage.py syncdb changed its output to some new formatting which involves some south-magic. It now looks like:

Syncing...
Creating tables ...
Creating table south_migrationhistory
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.messages
> django.contrib.staticfiles
> django.contrib.admin
> south
> shop
> shopadmin
> tinymce

Not synced (use migrations):
-
(use ./manage.py migrate to migrate these)

I just coninued to put my models under migration control using:
python manage.py schemamigration <myapp> --initial
Worked! But everything after that failed. Even a flush on the database did not help in any way. Hmm…
Adding south to an existing project needs special handling…
python manage.py convert_to_south <myApp>
also learned that deleting the migrations directory is not that evil after all if „things go south“, haha.

Migrations on the server

At the same time I learned that there is a procedure for handling migrations perfectly on the server, its like this:

  1. Install South on server. import south from shell just to make sure you are using the same python env.
  2. Add ’south‘ to INSTALLED_APPS in settings.py
  3. Upload settings.py
  4. Restart (web)server
  5. python manage.py syncdb
  6. Upload new app/models.py and app/migrations/ dir
  7. Restart (web)server
  8. python manage.py migrate app --fake 0001
  9. python manage.py migrate app

Good to know! Since I got some changes to my models waiting, I changed them now and handed over to south:

python manage.py schemamigration myproject.myapp --auto
python manage.py migrate myproject.myapp

Worked like a charme… after fixing some modelissues (adding null=True) and providing default values for some Decimals. Great!

Oh and if you have permission problems with your webserver directory in your VM managed by Vagrant, try adding following line in the Vagrantfile:
config.vm.synced_folder "./", "/vagrant", :owner=> 'vagrant', :group=> 'www-data', :mount_options => ['dmode=775', 'fmode=775']
This adds the directory to the group of the apache-users, so apache is allowed to write into those files. Here it is www-data-group but it may be different for your VM/Webserver combination.

Localization

Today I tried to use translated strings in my templates e.g. using following statement in one template
{% trans 'Willkommen auf meiner Homepage.' %}
you need to add
{% load i18n %} at the top of each template file and below any base-template statements.
using django-admin.py makemessages -l de --all
I tried to create localizationfiles for my app. But that did not really work because I needed to create locale-dirs first in my project.
And then I got the famous error:
CommandError: Error running xgettext. Note that Django internationalization requires GNU gettext 0.15 or newer.
which I fixed using the ubuntu SW installation manager by typing
sudo apt-get install gettext
and adding it to the bootstrap.sh for my VM.

Then after entering
django-admin.py makemessages -l de --all
which created a .po-file in my project
locale/de/LC_MESSAGES/django.po
Repeating the same procedure for english language revealed another folder for en. But…
that alone was not sufficient by far. You need to do a compile on the locale files before you even have a chance of seeing translation happen.
django-admin.py compilemessages and in my case
I also needed to add the LOCALE_PATHS to actually find my locale dir in the project, i have no clue why it does not find that automatically as advertised.

Authentication and sending mails

In the meantime I implemented registration/login/logout and user profile. Following my tutorials I just took django’s default implementation of how to reset passwords for user accounts. That’s when I hit the next wall. But that was really an easy one. If you want to send mails you need a mailserver. After some googeling i went with postfix for testing:
sudo apt-get install postfix
made this work, otherwise I saw an error which pointed me directly towards the problem. I need to remember this for deployment to actually install a maiserver which is stable and configure it in the settings.py according to this and this and during development maybe this.

Actually I would prefer to just setup the following settings:

EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025

and then type
python -m smtpd -n -c DebuggingServer localhost:1025
this prints emails which are normally sent via any configured mailserver to the console to debug its content and headers. Very useful!!!

Other useful stuff I discovered during my voyage… (basically I just store all the open tabs on my browser here, because I need to reboot the machine for some hardware driver I need to install which needs a reboot of my mac.)

Wow, the new device driver fixed my issue with this gaming mouse. The default behaviour of the Cyborg R.A.T. 9 mouse is really pretty ugly. Have a look at this enormous proof of how MadCatz actually doesn’t even care about any Mac customer. Actually you should not buy anything from a company which behaves silly as this. It renders your mousepointer nearly useless. Since Cyborg did never provide any fix for the missing OS X driver and installing the old driver for OS X 10.6 renders completely crazy issues with the mouse… I went with USB Overdrive now. And wow it seems to fix the issues. I cannot manipulate the 3 different setups of the mouse, but I can pretty much freely configure any other button and all scrollwheels now. Great thanks to USB Overdrive! BTW: here is a great review of USB Overdrive.

Taking a REST

Today I started opening up my small website using some REST API. I started installing necessary stuff following instructions over here by typing:

sudo pip install djangorestframework
sudo pip install markdown
sudo pip install django-filter

Wow!!!! Blown away just another time! REST-API support in actually no time. Haha, how cool is that?

By working my way through the tutorial on how to JSONify stuff, I created my own apiviews.py (I did not want that API stuff in my regular views) and then I just setup the urls.py with som additional info. (meanwhile I found myself trying to close a browser tab by typing :q in the window, perhaps it is time for vimperator…). I used the python interactive shell to actually experiment with the stuff in the tutorial. Which is really perfect to get to know the details of how JSONParser and JSONRenderer actually work, i.e. using a stream created with StringIO.

So in the end this took me just one day to grab the concept of JSON-api-ifying my django app to get at least a stable READ-ONLY api. But now I will go on and work on the READ,CREATE,WRITE,DELETE stuff which will involve some validations of incoming JSON and objects created. We will see…

BTW: Meanwhile I just found another nice Video Tutorial on the Python/Django stuff. Looks also very clear in its explanations and also provides some much better input about the background of how django works. So definitely worth a try, though the guy smartly „skips“ (edited out of the video) several very delicate things (like installing the mySQL amd mysql-python, haha).

Update
To make my own experience on video-tutorials as comfortable as possible I just hacked myself a website for one of the tutorial series. It allows to insert any video-id from youtube and will allow free resizing of the video display. Also I preprogrammed the HackedExistence ID’s for you already. So convenience is just 1 click away.

To be continued…