Hello, long time no see! Yes, I haven’t been here for a while (a few big changes in my personal life – less time) but I’m back with this article. Not long ago, I had the pleasure of being a…
private(set) modifier
Sometimes there is a need to use or test some property outside the enclosing declaration (internal get). At the same time, you don’t want this property to be modified outside – because, by applying good practices and for safety reasons,…
How to generate secure random data?
In our development career, we may encounter tasks in which, for example, we will have to use various types of encryption algorithms. We will see then that one of the acceptance criteria can be the creation of an encryption key,…
Be careful about getting elements from an array
You have to remember that in Swift, if you try to access an index that is out of bounds, you will get a runtime error (EXC_BAD_INSTRUCTION) and the application will crash. Currently, Swift Array type doesn’t have a safe method…
A few words about automatically generated screenshots
One of the most common elements of mobile applications are data forms. We use them to log in to our account, or to enter other important data about us, sometimes very sensitive and confidential. One such is the form for…
How to detect that an emulator is being used to run the app?
Attacks on mobile applications (e.g. payment apps) often start with the use of an emulator for the mobile operating system in which the target application will be run and analyzed. In order for an attacker to e.g. attach a debugger,…
Can encoding a String to Data with utf8 fail?
Surely none of us programming in Swift likes force-unwrapping optional values too much (we prefer a ‘guard’ – although excessive use is also not quite the right approach). Quick reminder for beginners: optionals represent data that may or may not…
Is the application installed from a trusted source?
This post begins the series of mobile application security. Information on this subject is sometimes difficult to find, does not fully cover the topic, or is incomprehensible or leaves further questions. Based on my experience, I will try to share…