Update your apps regularly

Most mobile apps on the app stores include third party plugins and libraries that help the app perform certain features. For example, in order to display ads in a Flutter app, you include a third party plugin called google_mobile_ads. This plugin is developed and maintained by a team at Google. All well-maintained plugins are updated from time to time. Each update may include new features and/or, more importantly, security updates.

Keeping your apps in the app stores updated regularly is a very important habit to acquire. And, just to be clear, I’m not talking about publishing updates with new features to the apps (although, this is not a bad thing either!). However, even if you do not have a new feature to publish, it is likely that one or more of the plugins that your app uses, have been updated. If that is the case, then you should include the updated plugin in your app, and publish the updated app to the app store.

Benefits of an App Update

This will accomplish more than one desirable result. First, your app will remain updated with all the security fixes. Keeping your app secure does not involve your code only, but any code that your app uses, including plugins. Second, both Apple and Google have been clamping down on apps that have not been updated for a long time and appear to be abandoned. These apps are ultimately removed from the app stores. And third, users who look at the date when the app was last updated, will more likely going to be installing your app if they see that it has been updated recently.

At W3 Applications, I try to publish an update to every app at least once a month. Even if there are no new features to publish, it is very likely that at least one plugin has been updated in a one month period. That is why I try to update my apps regularly.

Risks in an App Update

An update to any part of a software inherently includes some risks. The biggest risk is that the update might break the app, and make it unusable. This is the worst outcome possible. However, even if the update doesn’t break the whole app, it make break a feature, or a part of the app that some users find useful.

To mitigate this risk, there are certain steps you can take. First, read the release notes of the third party plugin. In some cases, the notes may identify some “Breaking Changes”. If that is the case, then you have to make sure that the breaking change does not affect your app. And, if it does, then you have to change your code to avoid any issues.

Unfortunately, not all release notes identify breaking changes, even if they exist. In cases like this, the best way to avoid issues is to test the update as thoroughly as possible, before publishing to the app store. Ideally, you would want to involve a small subset of your users in the testing process. But, if this option is not available or feasible, then the second best option is to test the update yourself. Test all the features of the app, not only the parts that have been updated. This is because some parts of the app may involve other parts, even if they are not directly related.

Conclusion

Update your apps regularly to keep them secure, and make them more attractive to install. Also, you may end up avoiding having your app removed from the app store for lack of updates.

Upgrading to Flutter 2.10

The Flutter team at Google has recently released version 2.10 of the popular cross-platform development framework. I wrote about Flutter and the advantages of using it over other frameworks in this post. If you have existing Flutter apps, and you want to upgrade them to the latest version, you may run into issues that you haven’t encountered before (at least that’s what happened with me!). In this blog post, I want to write about a build error that you may encounter after upgrading to the latest version.

The Upgrade

First of all, to actually do the upgrade, you can perform these steps:

  • Make sure you are on the stable channel. To do that, run this command flutter channel in a terminal window to see which channel you’re currently on. If you are not on stable, you can run this command to switch to the stable channel flutter channel stable. Please note that the stable channel is the recommended one because (as the name indicates!) you will get the most stable version of Flutter.
  • Run this command to upgrade to the latest version flutter upgrade.

The Error

After you upgrade, you may get this error when you try to run your app:

Error: Member not found: 'packageRoot'

If you do get this error, then here are a couple of steps you can perform to fix it.

The Fix

I’m going to list the steps that I had to take to fix the error. However, it is very likely that the last step is the only step that you need.

  • Make sure that all of your packages in pubspec.yaml are up to date.
  • In a terminal window, run flutter clean and then flutter pub get. If you still get a build error at this point, try the next step.
  • Run flutter pub upgrade. This will update all your packages, along with their dependancies to the latest version. This step fixed it for me, and I was able to run my app without a build error.

I hope you found this helpful. And, if you have any questions, please don’t hesitate to post them in the comments here, or send me an email through my contact page. Happy coding!

This is what you need to learn to become a mobile developer

Mobile app developers are paid very well in the software development industry. According to ZipRecruiter, the average salary of a mobile app developer is more than $100K per year, or $50 per hour. In this post, I will list some of the technologies that you need to learn to become a mobile app developer.

The first thing that we need to decide, is what platform we want to develop apps for. Of course, iPhones and Android phones are the most popular phone operating systems in the world, and any time you see a person carrying a phone, it will most likely be running one of the two. So, you can choose to develop apps for iOS, Android or both.

iOS

Even though iOS does not have the most global market share in terms of number of phones, it is the most profitable app store for developers.

There are multiple options available for developing mobile applications for iOS. However, the official language that is Apple recommends is Swift. This programming language was first released in 2014 as a replacement for Objective-C. It includes a lot of modern programming language features, such as null safety and more.

You can still create iOS apps using Objective-C, and there is still a large number of applications developed by Objective-C live in the App Store. However, if you are going to start learning how to create iOS apps, I highly recommend learning Swift, because it’s the official language that’s recommended by Apple.

Android

About 87% of the mobile phones in the world are running Android. This makes it an attractive option for making your apps available for as many users as possible.

Just like iOS, there are multiple options for developing Android mobile applications. The first official language that Google recommended was Java. But, as of 2019, Google now prefers Kotlin for Android app development. So, even though you can still develop apps using Java, if you are just starting with Android development, I would highly recommend starting with Kotlin.

Both (iOS and Android)

If you want to be able to create mobile apps for both iOS and Android phones, there are options for that as well. This type of development is call cross-platform. This is where you write the code one time and have it run on iOS and Android without making any changes to the code (or very little).

The option that I recommend for this type of development is Flutter. I have already wrote about Flutter in this blog post. In short, it is a platform developed by Google, and uses Dart as the programming language. It allows you to write code once and run it (natively) on iOS and Android.

Another popular option for cross-platform app development is React Native. Using React Native, you can write the app using JavaScript, which will be translated at run-time into native code. This is a very popular option, but apps developed in React Native will not run as fast as those developed with Flutter.

Conclusion

You have a lot of options for creating mobile apps for iOS, Android or both. The first thing you need to decide is, which platform you want to create apps for. Once you do that, you can look at the different options you have to learn to become a mobile app developer. If you have any questions about any of the options for developing mobile applications, feel free to leave a comment here or send me an email using the contact form.

What is a native mobile app?

Mobile applications have been steadily increasing in popularity ever since Apple opened up its App Store to third-party developers in 2008. Before that time, Apple was the only developer of iPhone apps. So, the selection was not very diverse, to say the least. On the Android side, HTC released the first Android phone in 2008, so Android phones were still not popular. In either case, iPhone or Android, mobile apps at that time were all “native” apps. So, what is a native mobile app anyway?

Different Operating Systems

iPhone apps run on an operating system currently known as iOS, and Android apps run on the Android operating system. For these apps to run on their respective operating system correctly, just like any other computer software, the programming language compiler (or translator) has to convert the code to a language that the operating system understands. The official programming languages that Apple wants developers to use are Swift, and Objective C before that. On the Android side, Google’s official recommendation is to use a programming language called Kotlin, and Java before that. These programming languages are compiled to a “native” language that the operating system can understand without having a middle layer to act as a translator. This means that the applications will potentially run very fast.

Alternatives to native apps

So, application speed is a major advantage to developing mobile apps in a native language. However, there’s one downside to this approach. Namely, if you want to have your application run on both iOS and Android devices, you have to write the application’s code twice. One time in Swift or Objective C to run it on iOS, and another time in Kotlin or Java to run in on Android. For larger companies, this means hiring two people (or potentially two teams) to develop the same app. And for smaller companies, this means looking for a developer who has experience in developing applications for iOS and Android. Finding the right resources is only part of the problem. The other part is time. It will potentially take the company double the time to develop the same app for two operating systems.

To fix this problem, some companies started to develop their own programming languages and platforms to build mobile apps that run on both iOS and Android at the same time. The developer community calls them “cross-platform” frameworks. A very popular example is React native. Facebook created React native to allow its developers to write code in a language called JavaScript, and use that same code to run the app on both iOS and Android.

The problem with traditional cross-platform software

React native is able to achieve this cross-platform feature by having a translator, or a “bridge”, that translates the JavaScript code to native code when the application is running on the device. For example, for a button to be displayed properly when the app is running, the translator will take the JavaScript code and convert it to an iOS button on an iPhone. When running on an Android device, it will convert the same code to an Android button. This introduces a new problem. Apps written in React native will potentially run slower than apps written in a native programming language. Because, when using a native programming language, there’s no need to translate anything during run-time. This disadvantage is not specific to React native only. Any application that needs a translator at run time will suffer from this slow down.

The best of both worlds

To achieve the best of both worlds, Google developed a cross-platform framework called Flutter. Flutter uses a programming language called Dart. Developers use Flutter to develops apps that run on iOS, Android and the web. In fact, you can even use Flutter to develop desktop apps that run natively on macOS, Linux and Windows. And all of that is achieved using a single code-base. In other words, you can write the app code using Dart once, and have it run on all these platforms. And the best part is that there’s no need for a translator, or a bridge, at run-time to convert the code.

Many companies have started to use Flutter when developing mobile applications. Google officially announced the first stable release of Flutter in 2018. However, here at W3 Applications, we have been using Flutter to develop mobile apps since before the official release. Our first Flutter app was published a few months before the first stable release.

What is a native mobile app?

So, to answer the question: what is a native mobile app? It is an app that does not need to be translated during run-time.

Conclusion

For us, having a programming framework like Flutter at our disposal means a couple of things. First, we can develop beautiful, fast and customizable mobile apps that run natively on iOS and Android at half the time it would take otherwise. And, what this ultimately means, is being able to lower the cost of development. So, if we lower the cost of development, we are able to stay competitive in the market and provide more cost-effective solutions to our clients.

If you have any questions about native mobile apps, or mobile apps in general, please send us an email or use our contact form. Thank you.