Mobile Application Development

Chapter 2
Development Languages, SDKs and Toolchains

Bachelors Program in IT
Mobile Application Development   •   Bachelor

Development Languages, SDKs and Toolchains

Introduction

Mobile application development is not simply the writing of source code. A working application emerges from the coordinated use of a programming language, a software development kit (SDK), an integrated development environment (IDE), platform libraries, build tools, emulators or physical devices, debuggers, testing tools, documentation, and version-control systems. Together these components form a toolchain.

The Android and iOS ecosystems illustrate two influential approaches. Android development commonly uses Kotlin, Java, Android Studio, the Android SDK, Gradle, and Jetpack libraries. iOS development commonly uses Swift, Xcode, the iOS SDK, Swift Package Manager, and Apple’s testing and signing tools. Both ecosystems increasingly support declarative user-interface frameworks: Jetpack Compose for Android and SwiftUI for Apple platforms.

A professional developer must understand not only how to operate these tools, but also how they relate. This chapter therefore examines languages, SDKs, project structures, dependencies, build systems, emulators, debugging, version control, and platform documentation as an integrated engineering environment.

Learning Objectives

By the end of this chapter, students should be able to:

  1. Explain the roles of programming languages, SDKs, IDEs, build systems, and toolchains.
  2. Compare Kotlin and Java for Android development and Swift for Apple development.
  3. Describe the principles of declarative UI and compare Jetpack Compose with SwiftUI.
  4. Interpret the structure of a contemporary mobile project.
  5. Manage dependencies and distinguish direct, transitive, and platform dependencies.
  6. Use emulators, physical devices, debuggers, logs, and profilers appropriately.
  7. Explain version-control and build-reproducibility practices.
  8. Locate, assess, and apply official platform documentation.

1. Languages, Platforms, and Runtime Environments

A programming language provides syntax and semantics for expressing computation. A mobile platform provides the runtime environment, APIs, security model, lifecycle rules, packaging format, and distribution process in which that computation operates.

Android applications execute primarily on the Android Runtime (ART). Kotlin and Java source code are compiled into JVM-compatible bytecode and then transformed into an Android application package. iOS applications generally use Swift or Objective-C. Swift code is compiled for Apple operating systems and interacts with frameworks such as UIKit, SwiftUI, Foundation, and Core Location.

The language and platform should not be confused. Kotlin is a language; Android is a platform. Swift is a language; iOS is a platform. An SDK connects application code to platform capabilities. For example, a camera API may provide access to device cameras, but the operating system still controls permissions, resource allocation, and privacy restrictions.

Important language characteristics

Mobile languages are evaluated using several criteria:

  • Type safety: whether the compiler detects invalid operations before execution.
  • Null-safety: whether the language helps prevent dereferencing an absent value.
  • Interoperability: whether code can use existing libraries written in another language.
  • Memory management: whether memory is manually managed or automatically reclaimed.
  • Concurrency support: whether asynchronous and parallel work can be expressed safely.
  • Tool support: the quality of compilers, IDE integration, testing frameworks, and profilers.

Kotlin provides concise syntax, null-safety features, extension functions, data classes, and coroutines. Java remains important because of its extensive ecosystem, existing Android codebases, and interoperability with Kotlin. Swift provides value types, optionals, protocol-oriented features, automatic reference counting, structured concurrency, and close integration with Apple frameworks.

Kotlin and Java in Android development

Kotlin and Java can coexist in the same Android project. Kotlin interoperates with Java classes, while Java can call most Kotlin declarations subject to interoperability rules. Kotlin’s nullable and non-nullable types make the possibility of absence explicit. For example, a value declared as String should not be null, while String? may be null and requires safe handling.

Kotlin’s concise syntax can reduce boilerplate, but concise code is not automatically clearer code. Excessive chaining, implicit behavior, or poorly named extension functions can reduce maintainability. Java may be preferable when maintaining legacy code, using a Java-only library, or working in a team with established Java expertise.

Swift

Swift uses optionals to represent values that may be absent. Optional binding and guard statements encourage explicit handling of absence. Swift also distinguishes structures and classes, supports protocols, and provides modern concurrency constructs such as async and await.

Swift’s close relationship with Apple’s SDKs is a major advantage. Its limitation is that the language and toolchain are strongly tied to Apple platforms and Xcode, whereas Kotlin is used across a wider range of environments.

2. SDKs, APIs, and Platform Documentation

An SDK is a collection of compilers, libraries, headers or interfaces, command-line tools, documentation, templates, debugging support, and packaging utilities for a platform. An SDK is more comprehensive than an API. An API is an interface through which software requests services; an SDK contains APIs plus the tools needed to develop and distribute software.

An SDK normally includes:

  • platform libraries;
  • build and packaging tools;
  • device or emulator communication tools;
  • debugging and profiling facilities;
  • templates and sample projects;
  • reference documentation;
  • platform-version metadata.

The target SDK identifies the platform version against whose APIs an application is compiled or optimized. The minimum supported version identifies the oldest platform version on which the application is intended to run. These values have different purposes. A project may compile against a recent API while retaining compatibility with older devices through conditional code, compatibility libraries, or feature checks.

Platform APIs are versioned because operating systems evolve. Developers must check whether an API is available on the device, whether permission is required, whether behavior changed in a later version, and whether the feature is restricted in background execution.

Reading documentation professionally

Official documentation should be treated as a primary technical source. A reliable reading process is:

  1. Identify the platform and version relevant to the project.
  2. Read the API’s purpose, parameters, return values, and exceptions or failure conditions.
  3. Check availability annotations and deprecation notices.
  4. Examine permission, lifecycle, threading, and security requirements.
  5. Review official examples, but test assumptions in the project.
  6. Confirm behavior with tests on representative devices.

Search results, forum posts, and generated code may be useful secondary sources, but they should not replace official reference material. AI coding assistants can accelerate exploration, yet their output may use obsolete APIs, omit permissions, introduce insecure patterns, or misunderstand lifecycle behavior. Generated code requires compilation, testing, review, and licensing checks.

3. IDEs and the Development Workflow

An IDE integrates source editing, code completion, navigation, refactoring, compilation, testing, debugging, device deployment, and version-control operations. Android Studio is the principal IDE for Android development, while Xcode is the principal IDE for Apple-platform development.

A typical workflow is:

  1. Create or clone a project.
  2. Configure SDK and toolchain versions.
  3. Resolve dependencies.
  4. Edit source and resource files.
  5. Compile and package the application.
  6. Deploy to an emulator or physical device.
  7. Inspect logs and debug failures.
  8. Run automated tests.
  9. Commit verified changes to version control.
  10. Produce a reproducible build for distribution or continuous integration.

An IDE is not a substitute for understanding the underlying commands. When an IDE reports a failure, a developer should be able to inspect compiler output, dependency resolution, device connection, signing configuration, and build-task logs. Command-line familiarity also improves automation and continuous integration.

4. Declarative User Interfaces

Traditional imperative UI programming describes how to create, modify, and remove interface objects step by step. Declarative UI describes what the interface should look like for a given application state. The framework then determines the necessary updates.

In simplified form, a declarative interface can be viewed as a function of state:

UI = f(State)

Here, UI is the rendered interface, State is the current application state, and f is the declarative description. This is a conceptual model rather than a performance equation. It assumes that the framework manages reconciliation between the previous and current descriptions.

Jetpack Compose and SwiftUI both use declarative techniques. A developer defines composable functions or SwiftUI views, associates them with state, and allows the framework to update the screen when state changes.

Advantages

  • UI code is often shorter and closer to the intended design.
  • State changes can be represented explicitly.
  • Reusable components are easier to define.
  • Preview and rapid iteration are supported by modern tools.
  • The same state-driven model can support different screen sizes.

Limitations

Declarative UI does not eliminate complexity. Developers must understand state ownership, recomposition or view invalidation, identity, navigation, asynchronous work, accessibility, and performance. A poorly designed state model can cause unnecessary updates or inconsistent behavior. Imperative APIs remain important for platform services and legacy interfaces.

A sound design separates state from presentation. The interface should display state, while a view model, controller, or equivalent component coordinates events, validation, asynchronous operations, and application logic.

5. Project Structure and Build Systems

A mobile project contains source code, resources, configuration, tests, build scripts, dependency declarations, and metadata. Although exact layouts differ, a typical project includes:

Project elementPurpose
Source directoriesApplication and domain code
Resource directoriesImages, strings, colors, layouts, and localization data
Test directoriesUnit, integration, UI, and instrumented tests
Manifest or entitlement filesDeclared components, capabilities, permissions, and metadata
Build configurationSDK versions, variants, compiler options, and signing settings
Dependency declarationsExternal libraries and their versions
Generated filesBuild outputs and derived metadata; usually not committed
Documentation and configurationDeveloper instructions and automation settings

Android projects commonly use Gradle with Kotlin or Groovy build scripts. Xcode projects use build settings, targets, schemes, and package-management configuration. Both systems define inputs, transformations, and outputs.

A build system may perform the following tasks:

  • compile source code;
  • process resources;
  • generate source or metadata;
  • run tests and static analysis;
  • package binaries and assets;
  • sign the application;
  • produce an installable artifact.

Build variants permit different outputs from shared code. For example, a development build may enable logging and use a test server, whereas a release build may disable debugging and use production services. Configuration must be controlled carefully so that test credentials or debug capabilities do not enter a production artifact.

Reproducible builds

A build is more reproducible when the same source revision and declared environment produce materially equivalent outputs. Reproducibility depends on pinned or controlled tool versions, deterministic dependency resolution, stable generated inputs, and documented environment variables.

Generated directories and machine-specific settings should normally be excluded from version control. Lock files or dependency-resolution metadata should be committed where the ecosystem recommends them. Secrets should never be stored in source control; secure secret-management systems or protected CI variables should be used instead.

6. Dependencies and Dependency Management

A dependency is an external component required by an application. A direct dependency is declared by the application. A transitive dependency is required by another dependency. Platform dependencies are supplied by the operating system or SDK rather than bundled in the same way as application libraries.

Dependency management provides version selection, downloading, caching, compilation, packaging, and conflict resolution. It also introduces risk. A library may contain vulnerabilities, increase application size, impose incompatible licenses, or become unmaintained.

Good practice includes:

  • add only dependencies with a clear purpose;
  • prefer actively maintained and reputable libraries;
  • review release notes and security advisories;
  • avoid unnecessarily broad permissions;
  • control versions consistently;
  • remove unused libraries;
  • examine transitive dependencies;
  • test upgrades in isolation;
  • record licensing obligations.

A version range may make upgrades convenient but can reduce reproducibility. Strict version control improves repeatability, while planned upgrade procedures reduce technical debt. The best choice depends on organizational policy, security requirements, and release frequency.

7. Emulators, Simulators, and Physical Devices

An emulator imitates a device platform, often including a virtualized or simulated processor and hardware environment. A simulator usually reproduces operating-system APIs and device behavior without reproducing every hardware characteristic. In everyday use, the terms are sometimes used loosely, but neither is identical to a physical device.

Virtual devices are valuable because they are repeatable, scriptable, and available in multiple configurations. They support testing screen sizes, operating-system versions, localization, permissions, rotation, network conditions, and lifecycle events. However, virtual environments may not accurately reproduce camera quality, sensors, thermal throttling, battery behavior, graphics performance, Bluetooth interactions, or manufacturer-specific behavior.

A professional test strategy uses both virtual and physical devices. Test devices should represent important user groups, supported operating-system versions, screen dimensions, accessibility settings, and hardware capabilities.

8. Debugging, Logging, and Profiling

Debugging is a systematic process of locating and correcting a defect. A useful cycle is:

  1. Reproduce the failure reliably.
  2. Define the expected and observed behavior.
  3. Reduce the problem to the smallest useful case.
  4. Inspect logs, stack traces, state, and network responses.
  5. Form a hypothesis.
  6. Test the hypothesis with a controlled change.
  7. Add or update a regression test.
  8. Verify the fix in relevant environments.

A debugger permits breakpoints, stepping, variable inspection, call-stack analysis, and conditional execution. Logging records events for later examination. Logs should include meaningful context without exposing passwords, tokens, health information, or other sensitive data.

Profiling differs from ordinary debugging. A profiler measures resource behavior such as CPU utilization, memory allocation, startup time, frame rendering, network use, and energy consumption. Performance work should be measurement-driven. Optimizing code without identifying an actual bottleneck can increase complexity without improving user experience.

Common mobile defects include:

  • lifecycle-related state loss;
  • work performed on the wrong thread;
  • memory leaks caused by retained references;
  • slow network operations blocking the interface;
  • incorrect permission handling;
  • configuration-specific failures;
  • race conditions in asynchronous code;
  • excessive recomposition or view updates;
  • resource and localization errors.

9. Version Control and Collaborative Development

Version control records changes to source and configuration over time. Git is widely used for mobile projects. A repository should contain source, build configuration, tests, documentation, and required metadata, but generally not generated build directories, IDE caches, local signing keys, or secrets.

A useful commit is coherent, buildable where practical, and described by a meaningful message. Branching strategies vary, but all teams benefit from code review, automated checks, protected main branches, and small changes that can be understood and reverted.

Merge conflicts are not merely textual inconveniences. They can conceal semantic conflicts, such as two developers changing assumptions about navigation, data models, or permissions. Reviewers should therefore inspect behavior and tests, not only lines changed.

Continuous integration (CI) can automatically compile the project, run static analysis, execute tests, check dependencies, and produce artifacts. Continuous delivery adds controlled release automation. CI does not guarantee quality; it enforces repeatable checks that a team has deliberately designed.

10. Applied Case: A Campus Transit Application

The following is an illustrative case.

Background

A university team is developing a mobile application that displays campus shuttle routes, estimated arrival information, service alerts, and accessible-route details. The application must support Android and iOS, intermittent connectivity, multiple screen sizes, and users who rely on screen readers.

Problem

The first prototype places network requests directly in screen components. It works on a developer’s fast network but becomes unresponsive when connectivity is poor. The prototype also stores API keys in a configuration file committed to the repository, and the team cannot reproduce a release build after upgrading several libraries.

Analysis

The project has three architectural and operational problems. First, presentation code is responsible for networking, which makes testing and lifecycle management difficult. Second, a secret is being treated as ordinary configuration. Third, dependency and tool versions are not controlled consistently.

Approach and solution

The team introduces a repository layer responsible for retrieving transit data and a view-model layer responsible for exposing loading, success, empty, and error states. Compose and SwiftUI screens render those states declaratively. Network work is asynchronous and does not block the main interface.

The team removes the committed API key, rotates it, and places protected configuration in the CI environment. They distinguish public application identifiers from genuine secrets and recognize that a mobile application cannot safely conceal a credential that must be distributed to every device; sensitive authorization is moved to a server-side service.

The team records supported SDK versions, commits dependency-resolution metadata where appropriate, and upgrades libraries in reviewed changes. Automated tests cover route parsing, error states, accessibility labels, and offline behavior. The application is tested on emulators and representative physical devices.

Outcome

The interface remains responsive during slow requests, errors are understandable, and the application can display cached route information when appropriate. Builds are repeatable in CI, and the team can trace changes through version control. Accessibility testing identifies missing labels before release.

Learning points

The case demonstrates that language and UI decisions are inseparable from architecture, security, testing, and build governance. A modern toolchain is valuable only when the team uses it to create repeatable, observable, and maintainable software.

11. Challenges, Ethics, and Professional Practice

Mobile applications process personal data, location information, identifiers, photographs, contacts, and behavioral data. Developers must follow applicable privacy laws and institutional policies, obtain meaningful consent where required, collect only necessary data, and explain retention and use clearly.

Security responsibilities include secure transport, safe authentication, least-privilege permissions, dependency monitoring, input validation, secure storage, and protection against reverse engineering. No client application should be assumed to be a trusted environment. Sensitive decisions should be enforced by a server, not only by hidden client code.

Accessibility is a professional requirement rather than an optional enhancement. Interfaces should support screen readers, sufficient contrast, scalable text, keyboard or switch access where relevant, clear focus order, and alternatives to gesture-only interaction.

Platform fragmentation creates additional challenges. Devices differ in screen size, operating-system version, manufacturer behavior, processing power, and available sensors. Teams must define a support matrix and test according to risk rather than assuming that one emulator represents all users.

12. Contemporary Developments and Best Practices

Current mobile development increasingly emphasizes declarative UI, structured concurrency, modular architecture, automated quality checks, cloud-based CI, and cross-platform code sharing. Cross-platform frameworks can reduce duplicated work, but they may introduce platform-integration limitations, larger abstractions, or delayed access to new platform features. The correct choice depends on requirements, team expertise, performance needs, and long-term maintenance.

Recommended practice is to:

  • use official, supported SDKs and languages;
  • keep tools and dependencies documented;
  • separate presentation, domain, and data responsibilities;
  • model loading, success, empty, and failure states explicitly;
  • test on emulators and physical devices;
  • use debuggers and profilers instead of guesswork;
  • automate builds and tests;
  • review permissions and data collection;
  • protect secrets and rotate exposed credentials;
  • keep commits small and understandable;
  • consult current platform documentation before relying on examples.

Chapter Summary

A mobile application is produced by a toolchain comprising a programming language, SDK, IDE, libraries, build system, device environment, debugger, testing tools, documentation, and version control. Kotlin and Java are interoperable choices for Android, while Swift is central to Apple-platform development. Declarative UI frameworks such as Jetpack Compose and SwiftUI represent interfaces as functions of state, improving clarity while requiring disciplined state and lifecycle management.

Project structure and build systems organize source, resources, tests, dependencies, configurations, and release artifacts. Dependency management must address version control, security, licensing, and reproducibility. Emulators and simulators provide repeatable testing, but physical devices remain essential for hardware, performance, and manufacturer-specific behavior. Debugging is hypothesis-driven; profiling is measurement-driven. Version control and CI support collaboration, traceability, and repeatable delivery.

Professional mobile development also includes privacy, security, accessibility, documentation literacy, and ethical handling of user data. The most effective developers understand both the visible application and the engineering system that builds, tests, secures, and maintains it.

Key Terms

SDK: A collection of platform libraries, tools, documentation, and utilities used to develop software.

API: A defined interface through which software requests services or data from another component.

Toolchain: The coordinated set of languages, compilers, libraries, build tools, IDEs, debuggers, and deployment utilities used to create software.

IDE: An integrated development environment combining editing, building, testing, and debugging facilities.

Kotlin: A modern, statically typed language widely used for Android development.

Java: A statically typed language with a large ecosystem and extensive Android legacy code.

Swift: Apple’s modern programming language for iOS and related platforms.

Declarative UI: A UI approach that describes the desired interface for a given state.

State: Information that determines an application’s current behavior or presentation.

Runtime: The environment that executes compiled application code.

Dependency: An external component required by an application.

Transitive dependency: A dependency required by another declared dependency.

Build system: Software that compiles, tests, transforms, and packages an application.

Emulator: A software environment that imitates a device or platform.

Debugger: A tool for inspecting program execution and state.

Profiler: A tool that measures resource and performance behavior.

Version control: A system for recording and managing changes to project files.

Continuous integration: Automated building and checking of changes in a shared repository.

Reproducible build: A build that can be recreated consistently from controlled inputs.

Platform documentation: Official technical information describing APIs, tools, constraints, and supported behavior.

Review Questions

Short Answer Questions

  1. Distinguish a programming language, an SDK, and a platform.
  2. State two advantages and one limitation of declarative UI.
  3. What is the difference between a direct and a transitive dependency?
  4. Why should mobile applications be tested on both virtual and physical devices?
  5. What information can a debugger provide that ordinary application logs may not?

Long Answer Questions

  1. Compare Kotlin, Java, and Swift in terms of type safety, interoperability, ecosystem, and platform integration.
  2. Explain how a mobile build system transforms source code and resources into a distributable application.
  3. Describe a professional workflow for investigating and correcting a mobile application defect.
  4. Explain how dependency management can affect security, licensing, application size, and build reproducibility.
  5. Discuss the relationship among official documentation, platform-version compatibility, permissions, and lifecycle behavior.

Analytical / Application Questions

  1. A team’s application works on an emulator but crashes on a physical device when the network is unavailable. Analyze likely causes and propose a testing and architectural response.
  2. A developer proposes committing an API key to a private repository because the repository is not publicly accessible. Evaluate this decision and recommend a safer design.
  3. An application has slow startup and inconsistent frame rates. Design a measurement-driven investigation using logs, profiling, emulators, physical devices, and version control.

Multiple Choice Questions with Answers

Question 1

Which statement best describes an SDK?

A. A visual design file containing only screen layouts

B. A collection of platform libraries, tools, documentation, and development utilities

C. A source-code repository used only for collaboration

D. A database used to store application users

Correct Answer: B. A collection of platform libraries, tools, documentation, and development utilities

Question 2

Which language is principally associated with modern Android development in this chapter?

A. Kotlin

B. Ruby

C. PHP

D. Objective-C only

Correct Answer: A. Kotlin

Question 3

In the conceptual declarative UI model UI = f(State), what does State represent?

A. The compiler version

B. The current information determining the interface

C. The application package size

D. The physical device manufacturer

Correct Answer: B. The current information determining the interface

Question 4

What is a transitive dependency?

A. A dependency directly typed into every source file

B. A dependency required by another dependency

C. A platform permission granted at runtime

D. A generated image resource

Correct Answer: B. A dependency required by another dependency

Question 5

Which activity is most appropriate for identifying excessive memory allocation?

A. Profiling

B. Renaming a branch

C. Changing a button color

D. Reading only the application title

Correct Answer: A. Profiling

Question 6

Why are physical devices necessary in addition to emulators?

A. They eliminate the need for source code

B. They reproduce all possible devices exactly

C. They reveal hardware, sensor, battery, and manufacturer-specific behavior

D. They automatically fix dependency conflicts

Correct Answer: C. They reveal hardware, sensor, battery, and manufacturer-specific behavior

Question 7

Which practice best supports reproducible builds?

A. Relying on undocumented local tool versions

B. Changing dependencies manually on each developer computer

C. Controlling tool and dependency versions and documenting the environment

D. Committing passwords into build scripts

Correct Answer: C. Controlling tool and dependency versions and documenting the environment

Question 8

What is the main purpose of a debugger breakpoint?

A. To pause execution so program state can be inspected

B. To publish the application to an app store

C. To compress image resources

D. To grant location permission

Correct Answer: A. To pause execution so program state can be inspected

Question 9

Which statement about mobile secrets is most accurate?

A. A secret is safe if its variable name is obscure

B. A credential distributed inside an application should be treated as potentially discoverable

C. A private source repository makes all embedded secrets permanently safe

D. Debug logging is an appropriate place for access tokens

Correct Answer: B. A credential distributed inside an application should be treated as potentially discoverable

Question 10

Which source is generally the strongest authority for determining whether a platform API is deprecated?

A. An anonymous comment

B. An outdated tutorial

C. Official platform documentation

D. A generated code fragment without citations

Correct Answer: C. Official platform documentation

Mobile Application Development
Chapter 2 of 15