packwise-skills 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +23 -0
- package/CLAUDE.md +25 -0
- package/README.md +295 -0
- package/audit.md +224 -0
- package/bin/packwise.js +155 -0
- package/package.json +31 -0
- package/skill.md +719 -0
- package/sub-skills/ai/local-llm.md +183 -0
- package/sub-skills/ai/python-ml.md +164 -0
- package/sub-skills/backend/go-server.md +184 -0
- package/sub-skills/backend/java-spring.md +241 -0
- package/sub-skills/backend/node-server.md +164 -0
- package/sub-skills/backend/php-laravel.md +175 -0
- package/sub-skills/backend/python-server.md +164 -0
- package/sub-skills/backend/rust-backend.md +118 -0
- package/sub-skills/cli/python-cli.md +236 -0
- package/sub-skills/cli/sdk-library.md +497 -0
- package/sub-skills/cloud/ci-cd-pipelines.md +350 -0
- package/sub-skills/cloud/docker.md +191 -0
- package/sub-skills/cloud/kubernetes.md +277 -0
- package/sub-skills/cloud/payment-integration.md +307 -0
- package/sub-skills/cross-platform/multiplatform.md +252 -0
- package/sub-skills/desktop/electron.md +783 -0
- package/sub-skills/desktop/game-dev.md +443 -0
- package/sub-skills/desktop/native-app.md +123 -0
- package/sub-skills/desktop/scenarios.md +443 -0
- package/sub-skills/desktop/smart-platforms.md +324 -0
- package/sub-skills/desktop/tauri.md +428 -0
- package/sub-skills/desktop/vr-ar.md +252 -0
- package/sub-skills/desktop/web-to-desktop.md +153 -0
- package/sub-skills/embedded/car-infotainment.md +129 -0
- package/sub-skills/embedded/esp32.md +184 -0
- package/sub-skills/embedded/ros.md +150 -0
- package/sub-skills/embedded/stm32.md +160 -0
- package/sub-skills/mobile/android.md +322 -0
- package/sub-skills/mobile/capacitor.md +232 -0
- package/sub-skills/mobile/flutter-mobile.md +138 -0
- package/sub-skills/mobile/harmonyos.md +150 -0
- package/sub-skills/mobile/ios.md +245 -0
- package/sub-skills/mobile/react-native.md +443 -0
- package/sub-skills/mobile/wearables.md +230 -0
- package/sub-skills/plugins/browser-extension.md +308 -0
- package/sub-skills/plugins/jetbrains-plugin.md +226 -0
- package/sub-skills/plugins/vscode-extension.md +204 -0
- package/sub-skills/security/security-tools.md +174 -0
- package/sub-skills/web/monorepo.md +274 -0
- package/sub-skills/web/pwa.md +220 -0
- package/sub-skills/web/serverless-edge.md +295 -0
- package/sub-skills/web/spa.md +266 -0
- package/sub-skills/web/ssr.md +228 -0
- package/sub-skills/web/wasm.md +243 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Flutter Mobile Build Sub-Skill
|
|
2
|
+
|
|
3
|
+
Build cross-platform mobile applications with Flutter (Android + iOS + Web + Desktop from single codebase).
|
|
4
|
+
|
|
5
|
+
**Current version**: Flutter 3.44.x / Dart 3.12.x (2025-2026)
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Single codebase for Android + iOS (+ Web + Desktop)
|
|
10
|
+
- Custom UI with high-performance rendering (Impeller engine)
|
|
11
|
+
- Team willing to learn Dart
|
|
12
|
+
- Apps requiring smooth animations and custom designs
|
|
13
|
+
|
|
14
|
+
## Build
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Android
|
|
18
|
+
flutter build apk --release # APK (direct install)
|
|
19
|
+
flutter build appbundle --release # AAB (Google Play required)
|
|
20
|
+
flutter build apk --release --split-per-abi # Separate APK per architecture (smaller)
|
|
21
|
+
|
|
22
|
+
# iOS (requires macOS)
|
|
23
|
+
flutter build ios --release
|
|
24
|
+
flutter build ipa --release # IPA for App Store / TestFlight
|
|
25
|
+
|
|
26
|
+
# Web
|
|
27
|
+
flutter build web --release
|
|
28
|
+
|
|
29
|
+
# Desktop
|
|
30
|
+
flutter build windows --release
|
|
31
|
+
flutter build macos --release
|
|
32
|
+
flutter build linux --release
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Signing
|
|
36
|
+
|
|
37
|
+
### Android
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# key.properties (project root, DO NOT commit)
|
|
41
|
+
storePassword=your-store-password
|
|
42
|
+
keyPassword=your-key-password
|
|
43
|
+
keyAlias=your-key-alias
|
|
44
|
+
storeFile=../key/my-release-key.jks
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```groovy
|
|
48
|
+
// android/app/build.gradle.kts
|
|
49
|
+
def keystoreProperties = new Properties()
|
|
50
|
+
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
51
|
+
if (keystorePropertiesFile.exists()) {
|
|
52
|
+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
android {
|
|
56
|
+
signingConfigs {
|
|
57
|
+
release {
|
|
58
|
+
keyAlias keystoreProperties['keyAlias']
|
|
59
|
+
keyPassword keystoreProperties['keyPassword']
|
|
60
|
+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
61
|
+
storePassword keystoreProperties['storePassword']
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
buildTypes {
|
|
65
|
+
release {
|
|
66
|
+
signingConfig signingConfigs.release
|
|
67
|
+
minifyEnabled true
|
|
68
|
+
shrinkResources true
|
|
69
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### iOS
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Open Xcode workspace
|
|
79
|
+
open ios/Runner.xcworkspace
|
|
80
|
+
|
|
81
|
+
# In Xcode:
|
|
82
|
+
# 1. Signing & Capabilities → Team → Select your team
|
|
83
|
+
# 2. Bundle Identifier → Set unique ID
|
|
84
|
+
# 3. Product → Archive → Distribute → App Store Connect
|
|
85
|
+
|
|
86
|
+
# Command line (requires fastlane)
|
|
87
|
+
cd ios && fastlane beta # TestFlight
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Flavor / Build Variants
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Define flavors in android/app/build.gradle.kts
|
|
94
|
+
# Then build specific flavor:
|
|
95
|
+
flutter build apk --release --flavor production
|
|
96
|
+
flutter build appbundle --release --flavor production
|
|
97
|
+
flutter build ios --release --flavor staging
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```dart
|
|
101
|
+
// lib/flavors.dart
|
|
102
|
+
enum Flavor { dev, staging, production }
|
|
103
|
+
|
|
104
|
+
class F {
|
|
105
|
+
static Flavor? appFlavor;
|
|
106
|
+
static String get apiBaseUrl => switch (appFlavor) {
|
|
107
|
+
Flavor.dev => 'http://localhost:3000',
|
|
108
|
+
Flavor.staging => 'https://staging.example.com',
|
|
109
|
+
Flavor.production => 'https://api.example.com',
|
|
110
|
+
_ => 'http://localhost:3000',
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Impeller Rendering Engine (Default since Flutter 3.16)
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Impeller is default on iOS, macOS, Android (Vulkan)
|
|
119
|
+
# Verify: check logs for "Using Impeller rendering backend"
|
|
120
|
+
|
|
121
|
+
# Disable Impeller (if issues):
|
|
122
|
+
flutter run --no-enable-impeller
|
|
123
|
+
# AndroidManifest.xml: <meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Common Pitfalls
|
|
127
|
+
|
|
128
|
+
| Issue | Fix |
|
|
129
|
+
|-------|-----|
|
|
130
|
+
| Android signing error | Check `key.properties` path; ensure keystore exists |
|
|
131
|
+
| iOS build failure | Requires Mac + Xcode 15+; run `cd ios && pod install` |
|
|
132
|
+
| Blurry icons | Provide all required icon sizes (use `flutter_launcher_icons` package) |
|
|
133
|
+
| Platform differences | Use `Platform.isIOS` / `Platform.isAndroid` for conditional code |
|
|
134
|
+
| App size too large | Use `--split-per-abi`; enable `shrinkResources`; remove unused plugins |
|
|
135
|
+
| Impeller rendering glitches | Disable Impeller for specific platform; file Flutter issue |
|
|
136
|
+
| `flutter build` hangs | Run `flutter clean && flutter pub get` |
|
|
137
|
+
| CocoaPods error | `cd ios && pod deinstall && pod install`; check Ruby version |
|
|
138
|
+
| Web build: CORS issues | Use `flutter run -d chrome --web-browser-flag=--disable-web-security` (dev only) |
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# HarmonyOS Build Sub-Skill
|
|
2
|
+
|
|
3
|
+
Build and publish Huawei HarmonyOS / OpenHarmony applications.
|
|
4
|
+
|
|
5
|
+
**Current version**: HarmonyOS NEXT 5.0 / DevEco Studio 5.x (2025-2026)
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Huawei ecosystem apps (phones, tablets, watches, smart screens, cars)
|
|
10
|
+
- HarmonyOS NEXT (no longer Android-compatible, uses ArkTS/ArkUI)
|
|
11
|
+
- OpenHarmony (open-source base for other OEMs)
|
|
12
|
+
- Smart home / IoT integration with HiLink
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
- DevEco Studio 5.x (Huawei official IDE, based on IntelliJ)
|
|
17
|
+
- Huawei developer account (free): developer.huawei.com
|
|
18
|
+
- HarmonyOS NEXT SDK (API 12+)
|
|
19
|
+
- Huawei device or emulator
|
|
20
|
+
|
|
21
|
+
## Key Architecture
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
HarmonyOS NEXT (API 12+)
|
|
25
|
+
├── ArkTS (TypeScript-like language) ← Primary language
|
|
26
|
+
├── ArkUI (declarative UI framework) ← UI framework
|
|
27
|
+
├── ArkCompiler ← AOT compilation
|
|
28
|
+
├── AbilityKit ← App lifecycle
|
|
29
|
+
├── ArkData ← Data management
|
|
30
|
+
└── HarmonyOS Design System ← UI components
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Important**: HarmonyOS NEXT is **NOT** Android-compatible. Existing Android APKs will NOT run. Apps must be rebuilt with ArkTS/ArkUI.
|
|
34
|
+
|
|
35
|
+
## Project Structure
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
entry/
|
|
39
|
+
├── src/main/
|
|
40
|
+
│ ├── ets/ ← ArkTS source code
|
|
41
|
+
│ │ ├── entryability/
|
|
42
|
+
│ │ │ └── EntryAbility.ets ← App entry point
|
|
43
|
+
│ │ ├── pages/
|
|
44
|
+
│ │ │ └── Index.ets ← Main page
|
|
45
|
+
│ │ └── common/
|
|
46
|
+
│ ├── resources/ ← Resources (images, strings)
|
|
47
|
+
│ └── module.json5 ← Module configuration
|
|
48
|
+
├── oh-package.json5 ← Package configuration
|
|
49
|
+
└── build-profile.json5 ← Build configuration
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Build
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# DevEco Studio: Build → Build Hap(s)/APP(s)
|
|
56
|
+
# Command line:
|
|
57
|
+
hvigorw assembleHap --mode module -p module=entry
|
|
58
|
+
|
|
59
|
+
# Build APP (multi-module bundle)
|
|
60
|
+
hvigorw assembleApp --mode project
|
|
61
|
+
|
|
62
|
+
# Output:
|
|
63
|
+
# entry/build/default/outputs/default/entry-default-signed.hap
|
|
64
|
+
# build/default/outputs/default/MyApp-default-signed.app
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Signing
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# 1. Generate signing key in DevEco Studio:
|
|
71
|
+
# File → Project Structure → Signing Configs → Add
|
|
72
|
+
# 2. Or generate manually:
|
|
73
|
+
keytool -genkeypair -alias myAppKey -keyalg RSA -keysize 2048 \
|
|
74
|
+
-keystore myApp.p12 -storetype PKCS12 -validity 36500
|
|
75
|
+
|
|
76
|
+
# 3. Configure in build-profile.json5
|
|
77
|
+
{
|
|
78
|
+
"signingConfigs": [{
|
|
79
|
+
"name": "default",
|
|
80
|
+
"material": {
|
|
81
|
+
"storeFile": "myApp.p12",
|
|
82
|
+
"storePassword": "***",
|
|
83
|
+
"keyAlias": "myAppKey",
|
|
84
|
+
"keyPassword": "***",
|
|
85
|
+
"signAlg": "SHA256withECDSA"
|
|
86
|
+
}
|
|
87
|
+
}]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Publishing
|
|
92
|
+
|
|
93
|
+
| Step | Description |
|
|
94
|
+
|------|-------------|
|
|
95
|
+
| 1. Register developer | developer.huawei.com (free) |
|
|
96
|
+
| 2. Create application | AppGallery Connect → My Apps |
|
|
97
|
+
| 3. Configure app info | Name, description, category, privacy policy |
|
|
98
|
+
| 4. Sign APP | DevEco Studio generates signing |
|
|
99
|
+
| 5. Build HAP/APP | DevEco Studio or hvigorw |
|
|
100
|
+
| 6. Upload to AGC | AppGallery Connect console |
|
|
101
|
+
| 7. Submit review | Typically 1–3 days |
|
|
102
|
+
|
|
103
|
+
## HarmonyOS NEXT vs HarmonyOS 3.x/4.x
|
|
104
|
+
|
|
105
|
+
| Feature | HarmonyOS NEXT (5.0) | HarmonyOS 3.x/4.x |
|
|
106
|
+
|---------|---------------------|-------------------|
|
|
107
|
+
| Android compatibility | No (pure ArkTS) | Yes (APK support) |
|
|
108
|
+
| Language | ArkTS only | Java/ArkTS |
|
|
109
|
+
| UI Framework | ArkUI | Java UI + ArkUI |
|
|
110
|
+
| Min API | 12 | 7–9 |
|
|
111
|
+
| Distribution | HAP/APP | HAP/APP + APK |
|
|
112
|
+
|
|
113
|
+
## ArkTS Quick Start
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
// pages/Index.ets
|
|
117
|
+
@Entry
|
|
118
|
+
@Component
|
|
119
|
+
struct Index {
|
|
120
|
+
@State message: string = 'Hello HarmonyOS'
|
|
121
|
+
|
|
122
|
+
build() {
|
|
123
|
+
Column() {
|
|
124
|
+
Text(this.message)
|
|
125
|
+
.fontSize(30)
|
|
126
|
+
.fontWeight(FontWeight.Bold)
|
|
127
|
+
Button('Click Me')
|
|
128
|
+
.onClick(() => {
|
|
129
|
+
this.message = 'Hello World!'
|
|
130
|
+
})
|
|
131
|
+
.margin({ top: 20 })
|
|
132
|
+
}
|
|
133
|
+
.width('100%')
|
|
134
|
+
.height('100%')
|
|
135
|
+
.justifyContent(FlexAlign.Center)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Common Pitfalls
|
|
141
|
+
|
|
142
|
+
| Issue | Fix |
|
|
143
|
+
|-------|-----|
|
|
144
|
+
| APK not working on NEXT | HarmonyOS NEXT requires ArkTS rewrite; no Android compatibility |
|
|
145
|
+
| Signing failure | Configure signing in DevEco Studio; check certificate validity |
|
|
146
|
+
| API incompatibility | Check HarmonyOS API version in module.json5 |
|
|
147
|
+
| Emulator slow | Use Remote Device (real Huawei devices in cloud) |
|
|
148
|
+
| Build error: hvigorw not found | Set DevEco Studio SDK path; run from project root |
|
|
149
|
+
| App rejected by store | Ensure privacy policy URL; comply with Huawei review guidelines |
|
|
150
|
+
| Third-party library unavailable | Check OpenHarmony registry (ohpm.openharmony.cn) |
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# iOS / iPadOS Build Sub-Skill
|
|
2
|
+
|
|
3
|
+
Build and publish Swift/ObjC native iOS and iPadOS applications. **Must build on macOS.**
|
|
4
|
+
|
|
5
|
+
**Current version**: iOS 18 / iPadOS 18 / Xcode 16 / Swift 6.0 (2025-2026)
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Native iOS/iPadOS applications (SwiftUI or UIKit)
|
|
10
|
+
- Apps requiring deep Apple ecosystem integration (HealthKit, CoreML, ARKit)
|
|
11
|
+
- Apps published to the App Store
|
|
12
|
+
- iPad-optimized applications (split view, pencil support, Stage Manager)
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
- macOS 14+ with Xcode 16 (free from App Store)
|
|
17
|
+
- Apple Developer Program ($99/year, required for App Store distribution)
|
|
18
|
+
- Apple Developer Certificate + Provisioning Profile
|
|
19
|
+
- Physical iOS device for testing (recommended; Simulator available)
|
|
20
|
+
|
|
21
|
+
## Build
|
|
22
|
+
|
|
23
|
+
### Command Line Build
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Archive (production build)
|
|
27
|
+
xcodebuild -workspace MyApp.xcworkspace \
|
|
28
|
+
-scheme MyApp \
|
|
29
|
+
-configuration Release \
|
|
30
|
+
-archivePath build/MyApp.xcarchive \
|
|
31
|
+
-destination "generic/platform=iOS" \
|
|
32
|
+
archive
|
|
33
|
+
|
|
34
|
+
# Export IPA
|
|
35
|
+
xcodebuild -exportArchive \
|
|
36
|
+
-archivePath build/MyApp.xcarchive \
|
|
37
|
+
-exportOptionsPlist ExportOptions.plist \
|
|
38
|
+
-exportPath build/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```xml
|
|
42
|
+
<!-- ExportOptions.plist -->
|
|
43
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
44
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
45
|
+
<plist version="1.0">
|
|
46
|
+
<dict>
|
|
47
|
+
<key>method</key>
|
|
48
|
+
<string>app-store</string>
|
|
49
|
+
<key>teamID</key>
|
|
50
|
+
<string>YOUR_TEAM_ID</string>
|
|
51
|
+
<key>uploadBitcode</key>
|
|
52
|
+
<false/>
|
|
53
|
+
<key>uploadSymbols</key>
|
|
54
|
+
<true/>
|
|
55
|
+
</dict>
|
|
56
|
+
</plist>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Build Targets
|
|
60
|
+
|
|
61
|
+
| Target | Command | Output |
|
|
62
|
+
|--------|---------|--------|
|
|
63
|
+
| Simulator | `xcodebuild -sdk iphonesimulator` | .app (for testing) |
|
|
64
|
+
| Device | `xcodebuild -sdk iphoneos` | .app (unsigned) |
|
|
65
|
+
| Archive | `xcodebuild archive` | .xcarchive |
|
|
66
|
+
| IPA | `xcodebuild -exportArchive` | .ipa (for distribution) |
|
|
67
|
+
| TestFlight | Upload .ipa via Xcode Organizer or `altool` | On App Store Connect |
|
|
68
|
+
| App Store | Submit via App Store Connect | Public release |
|
|
69
|
+
|
|
70
|
+
## Signing & Provisioning
|
|
71
|
+
|
|
72
|
+
### Automatic Signing (Xcode-managed, recommended for small teams)
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Xcode → Target → Signing & Capabilities:
|
|
76
|
+
✅ Automatically manage signing
|
|
77
|
+
Team: [Select your team]
|
|
78
|
+
Bundle Identifier: com.yourcompany.yourapp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Manual Signing (CI/CD, enterprise)
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Install certificate
|
|
85
|
+
security import certificate.p12 -P password -k ~/Library/Keychains/login.keychain-db
|
|
86
|
+
|
|
87
|
+
# Install provisioning profile
|
|
88
|
+
cp profile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
|
|
89
|
+
|
|
90
|
+
# Verify
|
|
91
|
+
security find-identity -v -p codesigning
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### fastlane (Automated Signing + Build + Upload)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Install
|
|
98
|
+
gem install fastlane
|
|
99
|
+
|
|
100
|
+
# Initialize
|
|
101
|
+
cd ios && fastlane init
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```ruby
|
|
105
|
+
# ios/fastlane/Fastfile
|
|
106
|
+
default_platform(:ios)
|
|
107
|
+
|
|
108
|
+
platform :ios do
|
|
109
|
+
desc "Push to TestFlight"
|
|
110
|
+
lane :beta do
|
|
111
|
+
increment_build_number(xcodeproj: "MyApp.xcodeproj")
|
|
112
|
+
build_app(
|
|
113
|
+
workspace: "MyApp.xcworkspace",
|
|
114
|
+
scheme: "MyApp",
|
|
115
|
+
export_method: "app-store"
|
|
116
|
+
)
|
|
117
|
+
upload_to_testflight
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
desc "Push to App Store"
|
|
121
|
+
lane :release do
|
|
122
|
+
build_app(
|
|
123
|
+
workspace: "MyApp.xcworkspace",
|
|
124
|
+
scheme: "MyApp",
|
|
125
|
+
export_method: "app-store"
|
|
126
|
+
)
|
|
127
|
+
upload_to_app_store(force: true)
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Run
|
|
134
|
+
cd ios && fastlane beta # Upload to TestFlight
|
|
135
|
+
cd ios && fastlane release # Upload to App Store
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## App Store Upload
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Method 1: Xcode Organizer (GUI)
|
|
142
|
+
# Product → Archive → Distribute App → App Store Connect → Upload
|
|
143
|
+
|
|
144
|
+
# Method 2: altool (CLI)
|
|
145
|
+
xcrun altool --upload-app \
|
|
146
|
+
-f build/MyApp.ipa \
|
|
147
|
+
--type ios \
|
|
148
|
+
--apiKey YOUR_API_KEY \
|
|
149
|
+
--apiIssuer YOUR_ISSUER_ID
|
|
150
|
+
|
|
151
|
+
# Method 3: Transporter app (Apple's upload tool from App Store)
|
|
152
|
+
|
|
153
|
+
# Method 4: fastlane (automated)
|
|
154
|
+
fastlane deliver --ipa build/MyApp.ipa
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Publishing Checklist
|
|
158
|
+
|
|
159
|
+
| Step | Description |
|
|
160
|
+
|------|-------------|
|
|
161
|
+
| 1. Apple Developer Program | $99/year at developer.apple.com |
|
|
162
|
+
| 2. Create App ID | Apple Developer Portal → Identifiers |
|
|
163
|
+
| 3. Create Provisioning Profile | Development + Distribution |
|
|
164
|
+
| 4. Build Archive | Xcode → Product → Archive |
|
|
165
|
+
| 5. Upload to App Store Connect | Xcode Organizer or Transporter |
|
|
166
|
+
| 6. Fill app info | Description, screenshots (6.7", 6.5", 5.5"), keywords, privacy policy URL |
|
|
167
|
+
| 7. Set pricing | Free or paid; tier selection |
|
|
168
|
+
| 8. Submit review | Typically 24–48 hours; can be expedited |
|
|
169
|
+
| 9. Release | Automatic after approval, or manual release |
|
|
170
|
+
|
|
171
|
+
## iPadOS Adaptation
|
|
172
|
+
|
|
173
|
+
```swift
|
|
174
|
+
// Info.plist — Universal app (iPhone + iPad)
|
|
175
|
+
<key>UIDeviceFamily</key>
|
|
176
|
+
<array>
|
|
177
|
+
<integer>1</integer> <!-- iPhone -->
|
|
178
|
+
<integer>2</integer> <!-- iPad -->
|
|
179
|
+
</array>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### iPadOS-Specific Considerations
|
|
183
|
+
|
|
184
|
+
| Feature | Implementation |
|
|
185
|
+
|---------|---------------|
|
|
186
|
+
| Split View / Slide Over | Auto Layout with size classes; handle `traitCollectionDidChange` |
|
|
187
|
+
| Stage Manager (M1+ iPad) | Support multiple window sizes; `UIWindowScene` API |
|
|
188
|
+
| Apple Pencil | `UIPencilInteraction` for double-tap; `UIHoverGestureRecognizer` for hover |
|
|
189
|
+
| Keyboard & Trackpad | `UIKeyCommand` for keyboard shortcuts; pointer interaction |
|
|
190
|
+
| External Display | `UIScreen.screens` for multi-display; `UIWindowScene` per display |
|
|
191
|
+
| Drag & Drop | `UIDragInteraction` / `UIDropInteraction` |
|
|
192
|
+
| Multitasking | Design for any width (compact/regular); test in Simulator |
|
|
193
|
+
|
|
194
|
+
## TestFlight (Beta Distribution)
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
1. Upload build via Xcode or fastlane
|
|
198
|
+
2. App Store Connect → TestFlight → Builds
|
|
199
|
+
3. Internal testing: up to 100 testers (instant, no review)
|
|
200
|
+
4. External testing: up to 10,000 testers (requires Beta App Review, ~24h)
|
|
201
|
+
5. Public link: share TestFlight link for anyone to join
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## CI/CD — GitHub Actions
|
|
205
|
+
|
|
206
|
+
```yaml
|
|
207
|
+
name: iOS Build
|
|
208
|
+
on:
|
|
209
|
+
push:
|
|
210
|
+
tags: ['v*']
|
|
211
|
+
jobs:
|
|
212
|
+
build:
|
|
213
|
+
runs-on: macos-latest
|
|
214
|
+
steps:
|
|
215
|
+
- uses: actions/checkout@v4
|
|
216
|
+
- uses: ruby/setup-ruby@v1
|
|
217
|
+
with:
|
|
218
|
+
ruby-version: '3.3'
|
|
219
|
+
- run: gem install fastlane
|
|
220
|
+
- uses: apple-actions/import-codesign-certs@v3
|
|
221
|
+
with:
|
|
222
|
+
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
|
|
223
|
+
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}
|
|
224
|
+
- run: cd ios && fastlane beta
|
|
225
|
+
env:
|
|
226
|
+
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.API_KEY_ID }}
|
|
227
|
+
APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.API_ISSUER_ID }}
|
|
228
|
+
APP_STORE_CONNECT_API_KEY: ${{ secrets.API_KEY }}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Common Pitfalls
|
|
232
|
+
|
|
233
|
+
| Issue | Fix |
|
|
234
|
+
|-------|-----|
|
|
235
|
+
| Certificate expired | Renew via Apple Developer Portal; re-download provisioning profile |
|
|
236
|
+
| Profile mismatch | Regenerate profile; ensure Bundle ID matches exactly |
|
|
237
|
+
| App Store rejection | Read App Review Guidelines; ensure privacy policy URL is live |
|
|
238
|
+
| Test device limit | Development Profile: max 100 devices per type; Enterprise: unlimited |
|
|
239
|
+
| iPadOS layout broken | Test with all iPad sizes in Simulator; use size classes |
|
|
240
|
+
| "Missing push notification entitlement" | Add Push Notification capability in Xcode; or remove if not needed |
|
|
241
|
+
| "Unsupported Architecture" | Ensure only arm64 in Build Settings (no armv7) |
|
|
242
|
+
| Bitcode warning | Bitcode is deprecated since Xcode 14; disable in build settings |
|
|
243
|
+
| Swift version mismatch | Set Swift Language Version in Build Settings to match your code |
|
|
244
|
+
| Simulator builds failing | Ensure Xcode Command Line Tools installed: `xcode-select --install` |
|
|
245
|
+
| Screenshot requirements | Must include 6.7" (iPhone 15 Pro Max), 6.5" (iPhone 11), 5.5" (iPhone 8 Plus) |
|