iOS V.S. Android (Engineering Tools & Techniques)

2022, Mar 02    

In the previous article, the comparison of language characters between Android & iOS is made. In this article, let’s compare the two tech stacks from the aspect of Engineering Tools & Techniques. We will go to compare the two platforms from:

  1. Core Techniques
  2. Deliverable Standards
  3. Popular Tools

The word Engineering here refers to the process of build/test/optimise deliverables such as App/SDK and optionally provide dynamic fixes for those deliverable already running under production environment.

1. Core Techniques

1.1 Compliation Configuration

  • Android:
  • iOS:
    • The build configuration is done directly on Xcode for most of the time.
    • Alternatively, there are py/ruby frameworks allow users to modify the .xcproj via script

1.2 Characters

  • Android strong dynamic capability due to VM nature, in order to utilise syuch feature, the following technique is commonly adopted:
  • iOS demonstrate relatively weak dyanmic capabilities. There are a still options like fishhook

2. Deliverables

2.1 Structure & Format

  • Android: both the app and sdk build depends on the android gradle plugin
    • Apk & AAB for applications, where AAB contains build variants and supports future auto optmisation in play store.
    • Aar used for SDKs
  • iOS:
    • Ipa for applications
    • .framework (a legacy informal bundle format) and nowadays the .xcframework is recommended to provide support for cross iOS/Mac/Watch platforms support. Refer to this

2.2 Resource Management

  • Android: there are two resource folders
    • Res folder: all resources are put into the res folder, which will be further compiled into R.java and ARSC file, the ARSC provides the compression of all resouce datas and R provide the indexes to locate values in ARSC.
    • Assets folder: folder to hold all customized files which will not be processed during compilation process, they will be inserted directlt into the apk/aab file.
  • iOS all resources are put in to .bundle files, bundle will be put into the eventual ipa file and get loaded by the program.

2.3 Signing

  • Android: signings are needed for both SDK and App
    • Signing mechanism for Android is keeping continiously evovling, currently there are 3 versions of signing solutions available. V1 is the original jar-signer comes with drawbacks of efficiency and security loopholes, and V2/3 are based on utilisation of the ZIP protocol.
    • For Apk signing, two keys are needed: upload key and play store app signing keys
    • No signing/certs are required for developer to develop and deploy apk in dev phases.
  • iOS: signings are only needed for App.
    • Developer provision profiles are needed to deploy ipa files to iOS devices.
    • For iOS developers need to have a clear understanding on concepts like CSR, Certificate, ProvisionProfile. This article provides a perfect explanations.
      1. Create a cert via CSR to identify the developer
      2. Create an appId
      3. Create the provision profile using: - certs in step 1. - entitlements like push/pay/cloud storage - device lists.

3.1 Deploy

Regular Deploy: referring to the release and deploy packages in regular flows, to a repository or app store.

Hotpatch: referring to the release and deploy of a incremental patch to a deliverable on the fly.

  • Android:
  • iOS: no main stream commonly used Hotpatch solution in the community. (Except for hybrid apps.)

3.2 Performance Analysis

  • Android:
    • using AS profiler, it integrates all the legacy tools and support both JVM and C native profiling.
  • iOS:

3.3 Test Automation

  • Android:
    • Unit Test: JUnit as basic framework
    • Robolectric: Context stubing
    • Mockito: API/Data mocking
    • Slightly grammar sugars, previouslt I summarized another article regarding it
    • UI Automation: use Appium and it is currently most well maintained.
  • iOS:
    • Using XCTest for Unit testing
    • Using XCUITest for UI testing.
    • MockingBird: provide statically protocol based mocking.
    • For UI Automation test, use Appium too.

3.3 CI/CD

  • Both Android & iOS:
    • For pipelines use Jenkins(usually in corporations), outside company there are wide range choices such as CirleCI.
    • For continious delivery utility, fastlane supports both Android and iOS to:
      • auto increment version numbers/ zip and upload files
      • collect other app materials needed for publish such as screenshot.
TOC