Mobile Development Guide
Master native and cross-platform mobile development for iOS and Android platforms.
Quick Start
iOS with Swift
import SwiftUI
struct ContentView: View {
@State private var todos: [String] = []
@State private var newTodo = ""
var body: some View {
VStack {
TextField("Add todo", text: $newTodo)
Button("Add") {
todos.append(newTodo)
newTodo = ""
}
List {
ForEach(todos, id: \.self) { todo in
Text(todo)
}
}
}
}
}
Android with Kotlin
import androidx.compose.material3.Button
import androidx.compose.material3.TextField
import androidx.compose.runtime.mutableStateOf
@Composable
fun TodoApp() {
var todos by remember { mutableStateOf(listOf<String>()) }
var newTodo by remember { mutableStateOf("") }
Column {
TextField(
value = newTodo,
newTodo = it },
label = { Text("Add todo") }
)
Button(onClick = {
todos = todos + newTodo
newTodo = ""
}) {
Text("Add")
}
LazyColumn {
items(todos) { todo ->
Text(todo)
}
}
}
}
React Native
import React, { useState } from 'react';
import { View, TextInput, TouchableOpacity, FlatList, Text } from 'react-native';
export default function TodoApp() {
const [todos, setTodos] = useState([]);
const [input, setInput] = useState('');
const addTodo = () => {
setTodos([...todos, input]);
setInput('');
};
return (
<View>
<TextInput
placeholder="Add todo"
value={input}
/>
<TouchableOpacity
<Text>Add</Text>
</TouchableOpacity>
<FlatList
data={todos}
renderItem={({ item }) => <Text>{item}</Text>}
/>
</View>
);
}
Flutter
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class TodoApp extends StatefulWidget {
const TodoApp({Key? key}) : super(key: key);
@override
State<TodoApp> createState() => _TodoAppState();
}
class _TodoAppState extends State<TodoApp> {
List<String> todos = [];
TextEditingController controller = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
TextField(controller: controller),
ElevatedButton(
onPressed: () {
setState(() => todos.add(controller.text));
controller.clear();
},
child: const Text('Add'),
),
Expanded(
child: ListView.builder(
itemCount: todos.length,
itemBuilder: (context, index) => Text(todos[index]),
),
),
],
),
);
}
}
iOS Development Path
Swift Basics
- Variables & Types: var, let, type safety
- Functions: Parameters, return types, closures
- Structs & Classes: Value vs reference types
- Error Handling: try/catch, Result type
- Concurrency: async/await, actors
UI Frameworks
iOS Architecture
- MVC: Model-View-Controller
- MVVM: Model-View-ViewModel with observable
- CLEAN: Entity, Use Case, Interface
- Coordinator Pattern: Navigation management
Key Frameworks
- Foundation: Core utilities and data types
- CoreData: Local persistence
- Networking: URLSession for API calls
- CoreLocation: Location services
- AVFoundation: Camera and media
Android Development Path
Kotlin Basics
- Variables & Functions: val, var, fun
- Classes & Objects: Data classes, sealed classes
- Extension Functions: Adding methods to types
- Coroutines: async/await equivalent
- Flow: Reactive streams
UI Frameworks
Android Architecture
- MVC: Model-View-Controller
- MVVM: ViewModel, LiveData, Data Binding
- CLEAN: Separation of concerns
- Repository Pattern: Data abstraction
Key Libraries
- Jetpack Components: Room, Lifecycle, ViewModel
- Retrofit: HTTP client
- Hilt: Dependency injection
- Firebase: Analytics, push notifications
Cross-Platform: React Native
Setup & Development
- Expo: Managed development environment
- React Native CLI: Full control
- Navigation: React Navigation
- State Management: Redux, Context API
Advantages & Tradeoffs
- Pros: Code sharing, JavaScript ecosystem
- Cons: Performance, native feel, tooling maturity
Best Practices
- Platform-specific code separation
- Native module development
- Performance optimization
- Bridge communication with native
Cross-Platform: Flutter
Setup & Development
- Dart Language: Flutter's language
- Widget Tree: UI composition
- State Management: Provider, Riverpod, Bloc
- Navigation: Named routes, deep linking
Advantages
- Performance: Compiled to native
- Hot Reload: Fast development
- Beautiful UI: Rich widget library
- Single Codebase: iOS and Android
Ecosystem
- Pub.dev: Package registry
- Popular Packages: http, provider, get
- Plugins: Native functionality access
- Firebase Integration: Easy setup
Mobile Development Essentials
Networking
- REST APIs: JSON parsing, error handling
- GraphQL: Mobile query language
- Offline Sync: Local storage, sync strategies
- SSL Pinning: Security
Local Data
- SQLite: Structured data
- Key-Value Storage: SharedPreferences, UserDefaults
- File System: Documents, cache directories
Authentication
- OAuth 2.0: Third-party login
- JWT: Token-based auth
- Biometric: Face ID, fingerprint
- Session Management: Token refresh
Testing
- Unit Tests: Business logic
- Widget/Component Tests: UI testing
- Integration Tests: Full app flows
- UI Automation: End-to-end testing
Deployment
iOS
- Apple Developer Account registration
- Create certificates and identifiers
- Build and archive app
- Submit to App Store
- Review and approval (1-3 days)
Android
- Google Play Account registration
- Create signing certificate
- Build release APK/AAB
- Upload to Google Play
- Testing and release (instant)
Publishing Best Practices
- App Store Optimization (ASO)
- Beta testing programs
- Update strategy
- Versioning and release notes
Projects
- Todo App - Basic CRUD, storage
- Weather App - API integration, UI
- Chat Application - Real-time, networking
- E-commerce App - Complex UI, payments
- Fitness Tracker - Sensors, data analysis
Resources
Learning Platforms
- Udemy: Framework-specific courses
- Pluralsight: In-depth iOS/Android paths
- Google Codelabs: Official Android tutorials
- Apple Developer: Official iOS resources
Documentation
Communities
- Stack Overflow: Question and answers
- Reddit: r/iOSProgramming, r/android, r/flutterdev
- GitHub: Open source projects
- Local Meetups: Developer communities
Roadmap.sh Reference: https://roadmap.sh/mobile
Status: ✅ Production Ready | SASMP: v1.3.0 | Bonded Agent: 05-mobile-specialist
1---2name: mobile-guide3description: Comprehensive mobile development guide for iOS, Android, React Native, and Flutter. Includes Swift, Kotlin, and cross-platform frameworks. Use when building mobile applications, iOS, Android, or cross-platform apps.4sasmp_version: "1.3.0"5bonded_agent: 05-mobile-specialist6bond_type: PRIMARY_BOND7eqhm_enabled: true8metadata:9 source: https://skillmd.com/skills/diegosouzapw/mobile-guide10---1112# Mobile Development Guide1314Master native and cross-platform mobile development for iOS and Android platforms.1516## Quick Start1718### iOS with Swift19```swift20import SwiftUI2122struct ContentView: View {23 @State private var todos: [String] = []24 @State private var newTodo = ""2526 var body: some View {27 VStack {28 TextField("Add todo", text: $newTodo)29 Button("Add") {30 todos.append(newTodo)31 newTodo = ""32 }3334 List {35 ForEach(todos, id: \.self) { todo in36 Text(todo)37 }38 }39 }40 }41}42```4344### Android with Kotlin45```kotlin46import androidx.compose.material3.Button47import androidx.compose.material3.TextField48import androidx.compose.runtime.mutableStateOf4950@Composable51fun TodoApp() {52 var todos by remember { mutableStateOf(listOf<String>()) }53 var newTodo by remember { mutableStateOf("") }5455 Column {56 TextField(57 value = newTodo,58 onValueChange = { newTodo = it },59 label = { Text("Add todo") }60 )61 Button(onClick = {62 todos = todos + newTodo63 newTodo = ""64 }) {65 Text("Add")66 }6768 LazyColumn {69 items(todos) { todo ->70 Text(todo)71 }72 }73 }74}75```7677### React Native78```javascript79import React, { useState } from 'react';80import { View, TextInput, TouchableOpacity, FlatList, Text } from 'react-native';8182export default function TodoApp() {83 const [todos, setTodos] = useState([]);84 const [input, setInput] = useState('');8586 const addTodo = () => {87 setTodos([...todos, input]);88 setInput('');89 };9091 return (92 <View>93 <TextInput94 placeholder="Add todo"95 value={input}96 onChangeText={setInput}97 />98 <TouchableOpacity onPress={addTodo}>99 <Text>Add</Text>100 </TouchableOpacity>101102 <FlatList103 data={todos}104 renderItem={({ item }) => <Text>{item}</Text>}105 />106 </View>107 );108}109```110111### Flutter112```dart113import 'package:flutter/material.dart';114115void main() {116 runApp(const MyApp());117}118119class TodoApp extends StatefulWidget {120 const TodoApp({Key? key}) : super(key: key);121122 @override123 State<TodoApp> createState() => _TodoAppState();124}125126class _TodoAppState extends State<TodoApp> {127 List<String> todos = [];128 TextEditingController controller = TextEditingController();129130 @override131 Widget build(BuildContext context) {132 return Scaffold(133 body: Column(134 children: [135 TextField(controller: controller),136 ElevatedButton(137 onPressed: () {138 setState(() => todos.add(controller.text));139 controller.clear();140 },141 child: const Text('Add'),142 ),143 Expanded(144 child: ListView.builder(145 itemCount: todos.length,146 itemBuilder: (context, index) => Text(todos[index]),147 ),148 ),149 ],150 ),151 );152 }153}154```155156## iOS Development Path157158### Swift Basics159- **Variables & Types**: var, let, type safety160- **Functions**: Parameters, return types, closures161- **Structs & Classes**: Value vs reference types162- **Error Handling**: try/catch, Result type163- **Concurrency**: async/await, actors164165### UI Frameworks166- **SwiftUI**: Modern declarative UI (recommended)167 - Views, state management, modifiers168 - Navigation, animation, gestures169 - Data binding with @State, @ObservedObject170171- **UIKit**: Older imperative framework172 - View controllers, navigation stack173 - Delegates and data sources174 - Auto Layout constraints175176### iOS Architecture177- **MVC**: Model-View-Controller178- **MVVM**: Model-View-ViewModel with observable179- **CLEAN**: Entity, Use Case, Interface180- **Coordinator Pattern**: Navigation management181182### Key Frameworks183- **Foundation**: Core utilities and data types184- **CoreData**: Local persistence185- **Networking**: URLSession for API calls186- **CoreLocation**: Location services187- **AVFoundation**: Camera and media188189## Android Development Path190191### Kotlin Basics192- **Variables & Functions**: val, var, fun193- **Classes & Objects**: Data classes, sealed classes194- **Extension Functions**: Adding methods to types195- **Coroutines**: async/await equivalent196- **Flow**: Reactive streams197198### UI Frameworks199- **Jetpack Compose**: Modern declarative UI (recommended)200 - Composables, state hoisting201 - Layouts and modifiers202 - Navigation, animation203204- **XML Layouts**: Traditional approach205 - Activity, Fragment architecture206 - View binding, data binding207208### Android Architecture209- **MVC**: Model-View-Controller210- **MVVM**: ViewModel, LiveData, Data Binding211- **CLEAN**: Separation of concerns212- **Repository Pattern**: Data abstraction213214### Key Libraries215- **Jetpack Components**: Room, Lifecycle, ViewModel216- **Retrofit**: HTTP client217- **Hilt**: Dependency injection218- **Firebase**: Analytics, push notifications219220## Cross-Platform: React Native221222### Setup & Development223- **Expo**: Managed development environment224- **React Native CLI**: Full control225- **Navigation**: React Navigation226- **State Management**: Redux, Context API227228### Advantages & Tradeoffs229- **Pros**: Code sharing, JavaScript ecosystem230- **Cons**: Performance, native feel, tooling maturity231232### Best Practices233- Platform-specific code separation234- Native module development235- Performance optimization236- Bridge communication with native237238## Cross-Platform: Flutter239240### Setup & Development241- **Dart Language**: Flutter's language242- **Widget Tree**: UI composition243- **State Management**: Provider, Riverpod, Bloc244- **Navigation**: Named routes, deep linking245246### Advantages247- **Performance**: Compiled to native248- **Hot Reload**: Fast development249- **Beautiful UI**: Rich widget library250- **Single Codebase**: iOS and Android251252### Ecosystem253- **Pub.dev**: Package registry254- **Popular Packages**: http, provider, get255- **Plugins**: Native functionality access256- **Firebase Integration**: Easy setup257258## Mobile Development Essentials259260### Networking261- **REST APIs**: JSON parsing, error handling262- **GraphQL**: Mobile query language263- **Offline Sync**: Local storage, sync strategies264- **SSL Pinning**: Security265266### Local Data267- **SQLite**: Structured data268- **Key-Value Storage**: SharedPreferences, UserDefaults269- **File System**: Documents, cache directories270271### Authentication272- **OAuth 2.0**: Third-party login273- **JWT**: Token-based auth274- **Biometric**: Face ID, fingerprint275- **Session Management**: Token refresh276277### Testing278- **Unit Tests**: Business logic279- **Widget/Component Tests**: UI testing280- **Integration Tests**: Full app flows281- **UI Automation**: End-to-end testing282283## Deployment284285### iOS2861. Apple Developer Account registration2872. Create certificates and identifiers2883. Build and archive app2894. Submit to App Store2905. Review and approval (1-3 days)291292### Android2931. Google Play Account registration2942. Create signing certificate2953. Build release APK/AAB2964. Upload to Google Play2975. Testing and release (instant)298299### Publishing Best Practices300- App Store Optimization (ASO)301- Beta testing programs302- Update strategy303- Versioning and release notes304305## Projects3063071. **Todo App** - Basic CRUD, storage3082. **Weather App** - API integration, UI3093. **Chat Application** - Real-time, networking3104. **E-commerce App** - Complex UI, payments3115. **Fitness Tracker** - Sensors, data analysis312313## Resources314315### Learning Platforms316- **Udemy**: Framework-specific courses317- **Pluralsight**: In-depth iOS/Android paths318- **Google Codelabs**: Official Android tutorials319- **Apple Developer**: Official iOS resources320321### Documentation322- [Swift.org](https://swift.org/)323- [Android Developers](https://developer.android.com/)324- [React Native](https://reactnative.dev/)325- [Flutter](https://flutter.dev/)326327### Communities328- **Stack Overflow**: Question and answers329- **Reddit**: r/iOSProgramming, r/android, r/flutterdev330- **GitHub**: Open source projects331- **Local Meetups**: Developer communities332333**Roadmap.sh Reference**: https://roadmap.sh/mobile334335---336337**Status**: ✅ Production Ready | **SASMP**: v1.3.0 | **Bonded Agent**: 05-mobile-specialist