Reader small image

You're reading from  Expert Delphi - Second Edition

Product typeBook
Published inFeb 2024
Reading LevelExpert
PublisherPackt
ISBN-139781805121107
Edition2nd Edition
Languages
Right arrow
Authors (2):
Marco Cantù
Marco Cantù
author image
Marco Cantù

Marco Cantù is an experienced Delphi expert, who started working with the product since its introduction in 1995. He is currently working as a Product Manager for RAD Studio at Embarcadero Technologies, an Idera company. Prior to that, Marco was a Delphi trainer and consultant for Wintech Italia. Over the years, Marco has written 20 books on Delphi, from the classic Mastering Delphi series to the recent Object Pascal Handbook. Marco has been a speaker at many Delphi and programming conferences worldwide, including over 10 Borland US Conferences, the Software Development Conference, Borland European conferences, EKON (Germany), DCon (UK), Conference to the Max (Holland), DelphiTage, the Italian Delphi Day, and a few editions of Delphi Developer Days. Marco is based in Italy.
Read more about Marco Cantù

Paweł Głowacki
Paweł Głowacki
author image
Paweł Głowacki

Paweł Głowacki was Embarcadero's European Technical Lead for Developer Tools. Previously, Paweł spent over 7 years working as a senior consultant and trainer for Delphi within Borland Education Services and CodeGear. Apart from working with Embarcadero customers across the region, he represented Embarcadero internationally as a conference and seminar speaker. Paweł passed away in mid-December 2017, but he is alive in the hearts of the Delphi developers community, worldwide.
Read more about Paweł Głowacki

View More author details
Right arrow

App Deployment

Building and deploying your mobile app to your devices is just the beginning. There is a lot more to a successful app. In this chapter, we are going to focus on all of the details of app deployment. We are going to discuss adding artwork, app monetization with ads, and in-app purchases. To be successful in mobile app development, you need to constantly improve your app. For this, you need to automate as many tasks as possible for reduced development and deployment times. That is why, at the end of this chapter, the book offers some suggestions in terms of version control, testing, and continuous integration.

This chapter will cover the following topics:

  • Deploying to app stores
  • Monetizing with ads and in-app purchases
  • Tips to automate the development process

The objective of this chapter is to learn how to successfully deploy and maintain mobile apps for iOS and Android.

Technical requirements

In terms of code, this chapter is a little different. There is no code in the book source code. For this chapter, the MyMoleculeHero app source code is managed separately from the book source and it’s available at: https://github.com/marcocantu/MyMoleculeHero

Deploying to app stores

You have built your app and tested it on multiple different devices with different versions of supported mobile operating systems, and now you feel that you are ready to make it available in an app store.

Before submitting your app, you need to have artwork in place and a number of screenshots from different devices that you plan to support. You might want to ask a professional graphic artist to provide them with the required app artwork, including app icons and splash screens.

Let’s go through the steps of publishing your app to different mobile app stores. As an example, we are going to use an updated version of the MyMoleculeHero demo app that Paweł had written and published. The app is a 3D chemical molecule viewer that reads data from a Protein Data Bank (PDB) file format and generates models made of spheres and cylinders, which can be watched from different points of view.

The app uses the techniques described in Chapter 6 of this...

Monetizing with ads and in-app purchases

There are different business models for mobile apps. Rather than expecting users to pay for an app before they can use it, it is fairly common to offer apps for free. In this case, you can monetize your apps by displaying ads or by offering in-app purchases.

Delphi comes with a cross-platform TInAppPurchase component that is available on the Services tab in the Tool Palette. With this component, you can sell virtual content within your app in a single way by using the Google Play in-app billing service on Android and the Apple iOS in-app purchase service on iOS. The details of using in-app purchases are different on both platforms and are very well documented on Embarcadero DocWiki.

Another possible business model is to embed advertisements in your apps. FireMonkey comes with a TBannerAd component that you can use to easily display ads in your app. This is a visual component, as you need to indicate which portion of the UI of your application...

Automate the development process

The first release of an app is hardly the last one. This brings us to this question—how can you continue to build and enhance your application? It’s important to consider the steps you can and should take to improve the process.

Delphi IDE provides many features that help you with establishing your own custom automated workflows, including version control engine, code editing, refactorings, integrated unit testing, and customizable build events. In the last part of this chapter, I want to introduce some of them.

App versioning

To be able to track errors and understand which version of your app customers are using, it’s important for every application to have a good versioning strategy. Every time you release a new build of your app, it should have a new, increased version number.

Most developers use two or three numbers to determine the version of their apps, such as 3.4 or 3.4.2. The Delphi Project Options page lets...

Summary

Your app is in an app store now and you have become a developer who is capable of writing code once and can natively compile it for all major mobile and desktop platforms from the very same source code files. Nobody can beat your productivity.

In this chapter, we have walked through the steps necessary to prepare and publish your Delphi apps to major app stores. We came to realize that being in an app store doesn’t signify the end of your app’s life. We also introduced critical techniques you have to master to maintain your app healthy over time.

This is almost the end of the book. There is one more chapter that offers some additional guidelines on what you could focus on next after you finish reading the book.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Expert Delphi - Second Edition
Published in: Feb 2024Publisher: PacktISBN-13: 9781805121107
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Marco Cantù

Marco Cantù is an experienced Delphi expert, who started working with the product since its introduction in 1995. He is currently working as a Product Manager for RAD Studio at Embarcadero Technologies, an Idera company. Prior to that, Marco was a Delphi trainer and consultant for Wintech Italia. Over the years, Marco has written 20 books on Delphi, from the classic Mastering Delphi series to the recent Object Pascal Handbook. Marco has been a speaker at many Delphi and programming conferences worldwide, including over 10 Borland US Conferences, the Software Development Conference, Borland European conferences, EKON (Germany), DCon (UK), Conference to the Max (Holland), DelphiTage, the Italian Delphi Day, and a few editions of Delphi Developer Days. Marco is based in Italy.
Read more about Marco Cantù

author image
Paweł Głowacki

Paweł Głowacki was Embarcadero's European Technical Lead for Developer Tools. Previously, Paweł spent over 7 years working as a senior consultant and trainer for Delphi within Borland Education Services and CodeGear. Apart from working with Embarcadero customers across the region, he represented Embarcadero internationally as a conference and seminar speaker. Paweł passed away in mid-December 2017, but he is alive in the hearts of the Delphi developers community, worldwide.
Read more about Paweł Głowacki