Rutger van Iperen
(0 comments, 3 posts)
This user hasn't shared any profile information
Posts by Rutger van Iperen
Like many iOS developers I did my sharing of trying out AutoLayout after it was introduced last year. And like many of these developers I ran into a fair share of trouble. It was not until Cessare Rochi clarified things in his session ‘AutoLayout, oh boy’ at mdevcon that I finally started finding my way around AutoLayout a bit.
First of, the consensus seems to be: do not use Interface Builder! IB gives you all kinds of challenges surrounding AutoLayout. Everyone has their own reasons for this but in short, when you use AutoLayout in code/manually, you are actually in control. So then how do we do this?
Every time security of apps comes up in any conversation it turns out a lot of people are unaware of this being an issue at all. Simple things like the screenshot iOS takes every time your app gets backgrounded are not the common knowledge I expected it to be by now. In this blog post I wanted to share a few things I learned during a course by Ken van Wyk.
First of all, a must have is Macroplants iExporer. This will let you browse any connected iDevice, including some of the data that gets stored within the apps on the device. Using this tool to have a look at the apps your have built will show you what data is easily accessible for anyone who can hookup the device to their computer. (Spoiler: Even locked and password protected devices can be browsed through iExplorer). Download it here and use it to your advantage.
A lot of these security ‘issues’ have everything to do with knowing the platform you are building for. Take for example the backgrounding issue mentioned earlier. As it turns out, iOS will take a screenshot of your app every time it is sent to the background. This screenshot is later used to make your iPhone look a bit quicker when you open your app again, while the More >
Recently I’ve been working on an application that has to store a significant amount of data on a device. When storing data on the iPhone there are a few options. You can use straight up text or xml files that are then read when the app runs, you can use the Core Data framework that comes with iOS, or you can use an SQLite database that is then deployed with the app.
My choice was very straightforward since we needed to store relatively complex data and would like the possibility of building a similar app for other platforms (Android and Windows Phone 7 also support SQLite databases).
Creating the Database
There are all kinds of tools with which to create your SQLite database, and you will easily find a handful through a Google search. We will stick with the command line SQLite3 utility that comes with your Mac. To start building your database, open a terminal window and start the sqlite3 utility. Pass it one argument – the name of the database file you want to create or edit. The ‘Terminal’ application can be found in your ‘Applications/Utilities’ folder.