• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Create a VM ($25 Credit)
  • Buy a Domain
  • 1 Month free Back Blaze Backup
  • Other Deals
    • Domain Email
    • Nixstats Server Monitoring
    • ewww.io Auto WordPress Image Resizing and Acceleration
  • About
  • Links

IoT, Code, Security, Server Stuff etc

Views are my own and not my employer's.

Personal Development Blog...

Coding for fun since 1996, Learn by doing and sharing.

Buy a domain name, then create your own server (get $25 free credit)

View all of my posts.

  • Cloud
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • How to buy a new domain and SSL cert from NameCheap, a Server from Digital Ocean and configure it.
    • Setting up a Vultr VM and configuring it
    • All Cloud Articles
  • Dev
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • How to setup pooled MySQL connections in Node JS that don’t disconnect
    • NodeJS code to handle App logins via API (using MySQL connection pools (1000 connections) and query parameters)
    • Infographic: So you have an idea for an app
    • All Development Articles
  • MySQL
    • Using the free Adminer GUI for MySQL on your website
    • All MySQL Articles
  • Perf
    • PHP 7 code to send object oriented sanitised input data via bound parameters to a MYSQL database
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • Measuring VM performance (CPU, Disk, Latency, Concurrent Users etc) on Ubuntu and comparing Vultr, Digital Ocean and UpCloud – Part 1 of 4
    • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
    • Setting up a website to use Cloudflare on a VM hosted on Vultr and Namecheap
    • All Performance Articles
  • Sec
    • Using the Qualys FreeScan Scanner to test your website for online vulnerabilities
    • Using OWASP ZAP GUI to scan your Applications for security issues
    • Setting up the Debian Kali Linux distro to perform penetration testing of your systems
    • Enabling TLS 1.3 SSL on a NGINX Website (Ubuntu 16.04 server) that is using Cloudflare
    • PHP implementation to check a password exposure level with Troy Hunt’s pwnedpasswords API
    • Setting strong SSL cryptographic protocols and ciphers on Ubuntu and NGINX
    • Securing Google G Suite email by setting up SPF, DKIM and DMARC with Cloudflare
    • All Security Articles
  • Server
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • All Server Articles
  • Ubuntu
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • Useful Linux Terminal Commands
    • All Ubuntu Articles
  • VM
    • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
    • All VM Articles
  • WordPress
    • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
    • Installing and managing WordPress with WP-CLI from the command line on Ubuntu
    • How to backup WordPress on a host that has CPanel
    • Moving WordPress to a new self managed server away from CPanel
    • Moving a CPanel domain with email to a self managed VPS and Gmail
    • All WordPress Articles
  • All

Corona Labs

How to build your first cross platform mobile app with corona

November 6, 2015 by Simon Fearby

cross_platform_app-2

Ok, you have an Apple or Android device and want to develop mobile/tablet apps. The first thing you will need is an Apple computer, Apple Developer Subscriptions to develop Apple apps and a Google developer subscription for Android along with some software.  You can develop on Windows but it requires emulating the Mac OSX and it is not recommended. I started developing on a $699 Mac Mini computer running the Apple OSX Operating system.

This guide covers Apple app development steps now, I will be adding Android and Windows Phone building steps soon..

Before you begin I will assume..

  • you have an Apple computer (running the latest system version of Apple’s operating system).
  • you have a paid Apple Developer subscription ($150 AUD a year).
  • you have installed XCode, Sublime Text 3 (free trial is ok) and Corona Labs SDK.
  • you have installed the Corona Editor Sublime package (info).

1. Apple Developer Setup

1.01 Login to the Apple Developer Portal.

apple_app_dev_001

1.02 Use your paid apple developer subscription to login.

apple_app_dev_002

1.03 Developer Subscription Options

The Apple developer portal is quite busy at first sight.

  • SDK’s will list all the downloads you have available as a developer.
  • Certificates, Identifiers & Profiles is where you prepare certificates that are required to make apps.
  • iTunes Connect is where you track your app sales and submit apps to the app store.
  • other options hold no surprises.

apple_app_dev_003

1.04 Clicking the Certificates, Identifiers & Profiles above will load this screen.

apple_app_dev_004

1.05 App submission workflow

Apple have detailed guides on how you develop apps and submit them to the stores.  If in doubt ask on the Apple developer forums.

apple_app_dev_005

1.06 Creating certificates for your development environment.

Apple have very robust security around apps and distribution.  On Windows desktops you can make a program, upload it and have very little restrictions on putting malicious code in your app. Apple, on the other hand, do not allow you to put an app on your iPhone that you develop yourself unless you go through many hoops to first link your machine to a development account, application and development account/team. Follow the steps below to setup a brand new development machine to develop and distribute apps to a number of test devices locally.

apple_app_dev_006

1.07 Open XCode and go to XCode menu, Preferences and Accounts and click the + and Add Apple ID.

apple_app_dev_007

1.08 Sign in with your Apple developer account.

apple_app_dev_008

1.09 You will notice one or more Team names (depending on your account), Select the first team account in the bottom right list and click View Details.

apple_app_dev_009

1.10 Clicking Create on each of the Signing Identities will run a series of scripts to setup encryption keys and sync them with Apple.

apple_app_dev_010

1.11 Click Create next to all of the items except Developer ID Application and Developer ID Installer is what we need to make mobile and mac desktop apps. Developer ID signing identities are required for apps that are to be published outside of the Apple Desktop Gatekeeper protections.

apple_app_dev_011

1.12 OK, what happened above?  Xcode created a bunch of certificates that are linked to your machine, apple servers and your development account.  The certificates will last for 1 year only; you will need to refresh them in 11 months time.  You can view these certificates by opening the Apple Keychain Access program.

Certificates found under the My Certificates group.

apple_app_dev_012

1.13 There are more certificates found under the Certificates group.

apple_app_dev_013

1.14 Although not mandatory I would highlight the new certificates and back them up.  Select the certificates (shift click) and go to the Keychain Access File menu then click Export Items.

apple_app_dev_014

1.15 Click Save and enter a strong password (write the password down).

apple_app_dev_015

1.16 Also backup the newly created My Certificates too.

apple_app_dev_016

1.17 Now put these files somewhere safe away from your main development machine just incase you need to reactivate the certificates on a different machine

apple_app_dev_017

1.18 Now we can log back into https://developer.apple.com and open Certificates, Identifiers and Profiles and click on All under Certificates. You will see the certificates that XCode created for you.

apple_app_dev_018

1.19 But first we need to add some real test devices (iPhone’s and iPad’s) to the list of approved devices).  Open the Devices area of your developer portal.

apple_app_dev_019

1.20 Every Apple device has a unique UDID inside it and we need to find it and add it to the list of known/approved devices we want to test apps on.  We can only add 100 devices a year so don’t go nuts adding devices of mates.

http://whatsmyudid.com/ is a great site that explains how you can find the UDID using iTunes or via the web.

To add your first test device plug it into iTunes and open the devices page and mouse click on the serial number.

apple_app_dev_020

1.21 When you see the UDID appear press CMD+C to copy the UDID to the clipboard.

apple_app_dev_021

1.22 Now go back to the Apple Developer Portal, open Certificates, Identifiers and Profiles, open Devices select iPhone (or your device type) and click the + and enter your device description and UDID.  Be descriptive “Simon’s iPhone 6 Plus” and not just “iPhone”.

apple_app_dev_023

1.23 Click Continue above then Register.

apple_app_dev_024

Add more test devices now (this will save regenerating certificates later).

1.24 Now we can create an Application ID.  Open Identifiers then click App IDs.

apple_app_dev_025

1.25 Your first App certificate should be a Wildcard App certificate.  A wildcard certificate allows you to build many different test apps using the one certificate (the downside is a wildcard app cannot receive push notifications and some other functions).  A wildcard allows you to quickly mock up a new app and build it in seconds.

Enter “App Wildcard” in the name, select Wildcard App ID radio button, and “com.yourcompany.*” (change your company name to your company name) in the Wildcard App ID.

apple_app_dev_026

1.26 No need to select any of the extra options provided.

apple_app_dev_027

1.27 Submit the App ID.

apple_app_dev_028

1.28 You can read more on the extra services here and here.

apple_app_dev_029

1.29 Now you can create dedicated App IDs for known apps that you want to build with additional services. Choose a good name and use the “com.yourcomany.yourapp” App ID.

apple_app_dev_030

1.30 You can choose more app services for dedicated App IDs. Below are the ones I prefer as standard.

apple_app_dev_031

1.31 Confirm your App ID and submit it.

apple_app_dev_032

1.32 Now the final step of creating development certificates to allow us to put the apps on devices.

Open the Development node under Provisioning Profiles.

apple_app_dev_034

1.33 Click iOS App Development (note we are selecting development and not distribution, we will return here to create a distribution certificate when we are ready to publish to the app store)

apple_app_dev_035

1.34 Choose your desired App ID to build a provisioning profile for (wildcard or dedicated)

apple_app_dev_036

1.35 Select the Certificate (or teams) to use.

apple_app_dev_037

1.36 Select the devices you wish to be able to run the app.

apple_app_dev_038

1.37 Review and click generate.

apple_app_dev_039

1.38 There is no need to download these as Xcode can do this.

apple_app_dev_040

Create as many App IDs as you like now.

1.39 Open XCode and return the file XCode then Preferences menu then Accounts tab.  Xcode should auto refresh and sync down your App IDs.

fyi: There are errors in my graphic below (all names appear the same but the list will be the same as you created them.

apple_app_dev_041

1.40 Now the fun part, go to http://coronalabs.com and signup and download the editor.

Corona comes with loads of demo projects and you can open a project and view it in the simulator and or build it straight away,

apple_app_dev_044b

1.41 I opened the Button Events demo and instantly went to Corona’s File, Build then iOS menu. Select a certificate that you want to use to build the app.  A device can have hundreds of apps on it that were built with the Wildcard certificate or one app per dedicated app certificate.

apple_app_dev_042

1.42 Corona saves an app file on the desktop (if that is where you saved to).  Open Xcode and click Window then Devices menu

apple_app_dev_043

1.43 Plug in your device and it should appear in Xcode’s list of devices.  Simply drag the app to your device to upload it to your device.

apple_app_dev_044

1.44 You can see the compiled app on the desktop and the uploaded app on the device.

apple_app_dev_045

1.55 You can see the simulated app on the desktop and the real app on the device. Congratulations.

apple_app_dev_046

2. Android device setup.

2.01 You will need to install the Apple Java Runtime to be able to build Android apps on Corona.

2.02 Optional: Install the Android Developer Studio ( also requires JDK7 ). The full blown Android Developer Studio allows you to run older versions of Android in simulators.

2.02.01 Open the Android Developer Studio app.

Android Studio

2.02.02 Click Next.

Android Studio

2.02.03 If you do not have JSK installed goto the next step to download it.

Android Studio

2.02.04 Goto Oracle and download the latest JDK7 and install it (or skip to 2.02.05)

Android Studio

2.02.05 If you just installed JDK click Previous then Next to detect the JDK location.

Android Studio

2.02.06 Select Custom and click Next

Android Studio

2.02.07 Choose your Theme and click Next

Android Studio

2.02.08 Tick the optional “Android Virtual Device – (1 GB)” and click next.

Android Studio

2.02.09 Select the recommended ram settings for the virtual device.

Android Studio

2.02.10 Wait for the components to download.

Android_010

2.02.11 take note of the virtual device name and click Finish.

Android_011

2.02.12 Android Studio software options.

Android_012

2.02.13 I searched in the Android Developer Guides and Using the Android Emulator guide to see where the Simulator was (no luck). I had to create a blank project to see where the virtual Android simulator was installed.

Android_013

2.02.14 Manually starting the Android Emulator.

  1. Open the Terminal
  2. Type “cd /Users/USERNAME/Library/Android/sdk/tools/”
  3. Type “./emulator -avd Nexus_5_API_23_x86 -netspeed full -netdelay none”

2.02.15 Listing Connected Development Devices.

You may have troubles actually getting files onto your Android 4.x or 5.x devices as some distributions of Android block USB mode.  You may need to enable running of apps from unknown sources (Settings -> Security).

  1. Open the Terminal
  2. Type “cd /Users/USERNAME/Library/Android/sdk/platform-tools”
  3. Type “./adb devices”

2.02.16 How to copy new apps to the device via Command Line (if you do not want to use vendor software to transfer files)

To be continued (Android guide is under construction).

3. Windows phone setup

Guide not available yet.

4. Where to now?

Review the Corona API documentation, hang about the forums, follow Corona on social media, watch the Corona Geeks video cast..

Install the Corona Editor into the Sublime Text Editor (guide here)

Now Code 🙂

crona-sublime

Donate and make this blog better




Ask a question or recommend an article
[contact-form-7 id=”30″ title=”Ask a Question”]

Filed Under: Apple, CoronaLabs, Development, mobile app Tagged With: Android, Apple, Corona Labs, Developer, iOS

Primary Sidebar

Poll

What would you like to see more posts about?
Results

Support this Blog

Create your own server today (support me by using these links

Create your own server on UpCloud here ($25 free credit).

Create your own server on Vultr here.

Create your own server on Digital Ocean here ($10 free credit).

Remember you can install the Runcloud server management dashboard here if you need DevOps help.

Advertisement:

Tags

2FA (9) Advice (17) Analytics (9) App (9) Apple (10) AWS (9) Backup (21) Business (8) CDN (8) Cloud (49) Cloudflare (8) Code (8) Development (26) Digital Ocean (13) DNS (11) Domain (27) Firewall (12) Git (7) Hosting (18) HTTPS (6) IoT (9) LetsEncrypt (7) Linux (20) Marketing (11) MySQL (24) NGINX (11) NodeJS (11) OS (10) PHP (13) Scalability (12) Scalable (14) Security (44) SEO (7) Server (26) Software (7) SSH (7) ssl (17) Tech Advice (9) Ubuntu (39) Uncategorized (23) UpCloud (12) VM (44) Vultr (24) Website (14) Wordpress (25)

Disclaimer

Terms And Conditions Of Use All content provided on this "www.fearby.com" blog is for informational purposes only. Views are his own and not his employers. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. Never make changes to a live site without backing it up first.

Advertisement:

Footer

Popular

  • Backing up your computer automatically with BackBlaze software (no data limit)
  • How to back up an iPhone (including photos and videos) multiple ways
  • Add two factor auth login protection to WordPress with YubiCo hardware YubiKeys and or 2FA Authenticator App
  • Setup two factor authenticator protection at login on Ubuntu or Debian
  • Using the Yubico YubiKey NEO hardware-based two-factor authentication device to improve authentication and logins to OSX and software
  • I moved my domain to UpCloud (on the other side of the world) from Vultr (Sydney) and could not be happier with the performance.
  • Monitor server performance with NixStats and receive alerts by SMS, Push, Email, Telegram etc
  • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
  • Add Google AdWords to your WordPress blog

Security

  • Check the compatibility of your WordPress theme and plugin code with PHP Compatibility Checker
  • Add two factor auth login protection to WordPress with YubiCo hardware YubiKeys and or 2FA Authenticator App
  • Setup two factor authenticator protection at login on Ubuntu or Debian
  • Using the Yubico YubiKey NEO hardware-based two-factor authentication device to improve authentication and logins to OSX and software
  • Setting up DNSSEC on a Namecheap domain hosted on UpCloud using CloudFlare
  • Set up Feature-Policy, Referrer-Policy and Content Security Policy headers in Nginx
  • Securing Google G Suite email by setting up SPF, DKIM and DMARC with Cloudflare
  • Enabling TLS 1.3 SSL on a NGINX Website (Ubuntu 16.04 server) that is using Cloudflare
  • Using the Qualys FreeScan Scanner to test your website for online vulnerabilities
  • Beyond SSL with Content Security Policy, Public Key Pinning etc
  • Upgraded to Wordfence Premium to get real-time login defence, malware scanner and two-factor authentication for WordPress logins
  • Run an Ubuntu VM system audit with Lynis
  • Securing Ubuntu in the cloud
  • No matter what server-provider you are using I strongly recommend you have a hot spare ready on a different provider

Code

  • How to code PHP on your localhost and deploy to the cloud via SFTP with PHPStorm by Jet Brains
  • Useful Java FX Code I use in a project using IntelliJ IDEA and jdk1.8.0_161.jdk
  • No matter what server-provider you are using I strongly recommend you have a hot spare ready on a different provider
  • How to setup PHP FPM on demand child workers in PHP 7.x to increase website traffic
  • Installing Android Studio 3 and creating your first Kotlin Android App
  • PHP 7 code to send object oriented sanitised input data via bound parameters to a MYSQL database
  • How to use Sublime Text editor locally to edit code files on a remote server via SSH
  • Creating your first Java FX app and using the Gluon Scene Builder in the IntelliJ IDEA IDE
  • Deploying nodejs apps in the background and monitoring them with PM2 from keymetrics.io

Tech

  • Backing up your computer automatically with BackBlaze software (no data limit)
  • How to back up an iPhone (including photos and videos) multiple ways
  • US v Huawei: The battle for 5G
  • Check the compatibility of your WordPress theme and plugin code with PHP Compatibility Checker
  • Is OSX Mojave on a 2014 MacBook Pro slower or faster than High Sierra
  • Telstra promised Fibre to the house (FTTP) when I had FTTN and this is what happened..
  • The case of the overheating Mac Book Pro and Occam’s Razor
  • Useful Linux Terminal Commands
  • Useful OSX Terminal Commands
  • Useful Linux Terminal Commands
  • What is the difference between 2D, 3D, 360 Video, AR, AR2D, AR3D, MR, VR and HR?
  • Application scalability on a budget (my journey)
  • Monitor server performance with NixStats and receive alerts by SMS, Push, Email, Telegram etc
  • Why I will never buy a new Apple Laptop until they fix the hardware cooling issues.

Wordpress

  • Replacing Google Analytics with Piwik/Matomo for a locally hosted privacy focused open source analytics solution
  • Setting web push notifications in WordPress with OneSignal
  • Telstra promised Fibre to the house (FTTP) when I had FTTN and this is what happened..
  • Check the compatibility of your WordPress theme and plugin code with PHP Compatibility Checker
  • Add two factor auth login protection to WordPress with YubiCo hardware YubiKeys and or 2FA Authenticator App
  • Monitor server performance with NixStats and receive alerts by SMS, Push, Email, Telegram etc
  • Upgraded to Wordfence Premium to get real-time login defence, malware scanner and two-factor authentication for WordPress logins
  • Wordfence Security Plugin for WordPress
  • Speeding up WordPress with the ewww.io ExactDN CDN and Image Compression Plugin
  • Installing and managing WordPress with WP-CLI from the command line on Ubuntu
  • Moving WordPress to a new self managed server away from CPanel
  • Moving WordPress to a new self managed server away from CPanel

General

  • Backing up your computer automatically with BackBlaze software (no data limit)
  • How to back up an iPhone (including photos and videos) multiple ways
  • US v Huawei: The battle for 5G
  • Using the WinSCP Client on Windows to transfer files to and from a Linux server over SFTP
  • Connecting to a server via SSH with Putty
  • Setting web push notifications in WordPress with OneSignal
  • Infographic: So you have an idea for an app
  • Restoring lost files on a Windows FAT, FAT32, NTFS or Linux EXT, Linux XFS volume with iRecover from diydatarecovery.nl
  • Building faster web apps with google tools and exceed user expectations
  • Why I will never buy a new Apple Laptop until they fix the hardware cooling issues.
  • Telstra promised Fibre to the house (FTTP) when I had FTTN and this is what happened..

Copyright © 2023 · News Pro on Genesis Framework · WordPress · Log in

Some ads on this site use cookies. You can opt-out if of local analytics tracking by scrolling to the bottom of the front page or any article and clicking "You are not opted out. Click here to opt out.". Accept Reject Read More
GDPR, Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT