بناء تطبيقات الموبايل مع AI
النشر على متاجر التطبيقات
5 دقيقة للقراءة
Goal: Take your app from development to production on both iOS and Android app stores.
Understanding the Deployment Pipeline
Development → EAS Build → Testing → Store Submission → Review → Release
Build Profiles
Expo Application Services (EAS) uses build profiles:
| Profile | Use Case | Distribution |
|---|---|---|
| development | Testing with dev tools | Internal |
| preview | Beta testing | TestFlight/Internal |
| production | Store release | App Store/Play Store |
EAS Setup
Initialize EAS
# Install EAS CLI
npm install -g eas-cli
# Login to Expo account
eas login
# Initialize EAS in your project
eas build:configure
Configure eas.json
{
"cli": {
"version": ">= 12.0.0",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
},
"android": {
"buildType": "apk"
}
},
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
},
"android": {
"buildType": "apk"
},
"channel": "preview"
},
"production": {
"ios": {
"resourceClass": "m-medium"
},
"android": {
"buildType": "app-bundle"
},
"channel": "production",
"autoIncrement": true
}
},
"submit": {
"production": {
"ios": {
"appleId": "your@email.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD1234"
},
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "internal"
}
}
}
}
App Store Preparation
AI Prompt: App Store Assets
Generate app store assets for my app:
## App Details
- App Name: [Your App Name]
- Category: [Productivity/Social/etc.]
- Target Audience: [Description]
## Needs
1. App Store screenshots (6.7" and 5.5" iPhone sizes)
2. Google Play screenshots (phone and tablet)
3. App Store description (4000 chars max)
4. Short description (80 chars for Play Store)
5. Keywords (100 chars for App Store)
6. Feature graphic (1024x500 for Play Store)
## App Features
- [Feature 1]
- [Feature 2]
- [Feature 3]
Create compelling copy and suggest screenshot compositions.
App Configuration
Update your app.json for store submission:
{
"expo": {
"name": "My Awesome App",
"slug": "my-awesome-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#6366f1"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.yourcompany.myawesomeapp",
"buildNumber": "1",
"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to take photos.",
"NSLocationWhenInUseUsageDescription": "This app uses your location to show nearby places.",
"NSPhotoLibraryUsageDescription": "This app saves photos to your library."
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#6366f1"
},
"package": "com.yourcompany.myawesomeapp",
"versionCode": 1,
"permissions": [
"CAMERA",
"ACCESS_FINE_LOCATION",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE"
]
},
"plugins": [
"expo-router",
"expo-secure-store",
[
"expo-camera",
{
"cameraPermission": "Allow $(PRODUCT_NAME) to access your camera."
}
],
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow $(PRODUCT_NAME) to use your location."
}
]
]
}
}
iOS Deployment
Prerequisites
- Apple Developer Account ($99/year)
- App Store Connect app created
- Provisioning profiles configured
Build for iOS
# Build for App Store
eas build --platform ios --profile production
# Or build for TestFlight testing
eas build --platform ios --profile preview
Submit to App Store
# Automatic submission
eas submit --platform ios --latest
# Or submit a specific build
eas submit --platform ios --id [BUILD_ID]
App Store Connect Setup
- Create App in App Store Connect
- Fill App Information:
- Privacy Policy URL (required)
- Support URL
- Marketing URL (optional)
- Set Age Rating - Complete questionnaire
- Add Screenshots - All required device sizes
- Write Description - Feature-rich, keyword-optimized
- Set Pricing - Free or paid tiers
Common iOS Rejection Reasons
| Reason | Solution |
|---|---|
| Incomplete metadata | Fill all required fields |
| Bugs and crashes | Test thoroughly before submission |
| Placeholder content | Remove all "Lorem ipsum" |
| Login issues | Provide demo credentials |
| Missing privacy policy | Add privacy policy URL |
| Guideline 4.2 (minimum functionality) | Ensure app provides value |
Android Deployment
Prerequisites
- Google Play Developer Account ($25 one-time)
- Google Play Console app created
- Service Account for automated uploads
Create Service Account
1. Go to Google Cloud Console
2. Create a new project or select existing
3. Enable Google Play Android Developer API
4. Create Service Account with Editor role
5. Download JSON key file
6. In Play Console, grant access to service account
7. Save key as ./google-service-account.json
Build for Android
# Build AAB for Play Store
eas build --platform android --profile production
# Or build APK for testing
eas build --platform android --profile preview
Submit to Google Play
# Automatic submission
eas submit --platform android --latest
# Specify track (internal, alpha, beta, production)
eas submit --platform android --latest --track internal
Play Console Setup
- Create App in Google Play Console
- Complete Store Listing:
- Short description (80 chars)
- Full description (4000 chars)
- Screenshots (phone, 7" tablet, 10" tablet)
- Feature graphic (1024x500)
- App icon (512x512)
- Content Rating - Complete IARC questionnaire
- Target Audience - Select age groups
- Data Safety - Declare data collection practices
- App Access - Provide test credentials if needed
Release Tracks
Internal (up to 100 testers)
↓
Closed Testing (invite-only)
↓
Open Testing (anyone can join)
↓
Production (public release)
Over-the-Air Updates
EAS Update enables instant updates without store review:
# Configure update channel
eas update:configure
# Publish update to preview channel
eas update --branch preview --message "Bug fixes"
# Publish to production
eas update --branch production --message "Performance improvements"
Update Configuration
// app.config.ts
export default {
expo: {
// ... other config
updates: {
url: 'https://u.expo.dev/[PROJECT_ID]',
fallbackToCacheTimeout: 0,
},
runtimeVersion: {
policy: 'appVersion',
},
},
};
Limitations of OTA Updates
Can update:
- JavaScript code
- Assets (images, fonts)
- Styles
Cannot update (requires new build):
- Native code changes
- New native modules
- app.json/app.config changes
- SDK version upgrades
CI/CD with GitHub Actions
# .github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build iOS
run: eas build --platform ios --profile production --non-interactive
- name: Build Android
run: eas build --platform android --profile production --non-interactive
Automatic Submissions
# .github/workflows/eas-submit.yml
name: EAS Submit
on:
workflow_dispatch:
inputs:
platform:
description: 'Platform to submit'
required: true
type: choice
options:
- ios
- android
- all
jobs:
submit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Submit iOS
if: ${{ inputs.platform == 'ios' || inputs.platform == 'all' }}
run: eas submit --platform ios --latest --non-interactive
- name: Submit Android
if: ${{ inputs.platform == 'android' || inputs.platform == 'all' }}
run: eas submit --platform android --latest --non-interactive
Pre-Launch Checklist
Technical
- Test on real devices (not just simulators)
- Test on oldest supported OS versions
- Verify all API endpoints work
- Check error handling and offline behavior
- Test deep links and push notifications
- Performance testing (startup time, memory)
Store Compliance
- Privacy policy published and linked
- Terms of service (if applicable)
- Age rating completed
- Data safety declarations accurate
- All permissions explained
- Demo credentials ready (if login required)
Assets
- App icon (1024x1024 for iOS, 512x512 for Android)
- Screenshots for all required sizes
- Feature graphic (Android)
- Promotional video (optional)
Content
- App description optimized with keywords
- Release notes written
- Support email configured
- Social media links ready
Key Takeaways
- EAS Build handles native compilation in the cloud
- Build profiles separate development, testing, and production
- OTA updates skip store review for JavaScript changes
- App Store guidelines require careful attention to metadata
- CI/CD automation streamlines the release process
النشر على متاجر التطبيقات
الهدف: نقل تطبيقك من التطوير إلى الإنتاج على متجري iOS وAndroid.
فهم خط أنابيب النشر
التطوير → EAS Build → الاختبار → تقديم المتجر → المراجعة → الإصدار
ملفات تعريف البناء
خدمات تطبيقات Expo (EAS) تستخدم ملفات تعريف البناء:
| الملف التعريفي | حالة الاستخدام | التوزيع |
|---|---|---|
| development | الاختبار مع أدوات التطوير | داخلي |
| preview | اختبار بيتا | TestFlight/داخلي |
| production | إصدار المتجر | App Store/Play Store |
إعداد EAS
تهيئة EAS
# تثبيت EAS CLI
npm install -g eas-cli
# تسجيل الدخول لحساب Expo
eas login
# تهيئة EAS في مشروعك
eas build:configure
تكوين eas.json
{
"cli": {
"version": ">= 12.0.0",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
},
"android": {
"buildType": "apk"
}
},
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
},
"android": {
"buildType": "apk"
},
"channel": "preview"
},
"production": {
"ios": {
"resourceClass": "m-medium"
},
"android": {
"buildType": "app-bundle"
},
"channel": "production",
"autoIncrement": true
}
},
"submit": {
"production": {
"ios": {
"appleId": "your@email.com",
"ascAppId": "1234567890",
"appleTeamId": "ABCD1234"
},
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "internal"
}
}
}
}
تحضير متجر التطبيقات
برومبت AI: أصول متجر التطبيقات
أنشئ أصول متجر التطبيقات لتطبيقي:
## تفاصيل التطبيق
- اسم التطبيق: [اسم تطبيقك]
- الفئة: [الإنتاجية/اجتماعي/إلخ]
- الجمهور المستهدف: [الوصف]
## الاحتياجات
1. لقطات شاشة App Store (أحجام iPhone 6.7" و5.5")
2. لقطات شاشة Google Play (هاتف وتابلت)
3. وصف App Store (4000 حرف كحد أقصى)
4. وصف قصير (80 حرفاً لـ Play Store)
5. كلمات مفتاحية (100 حرف لـ App Store)
6. صورة الميزات (1024x500 لـ Play Store)
## ميزات التطبيق
- [الميزة 1]
- [الميزة 2]
- [الميزة 3]
أنشئ نصاً مقنعاً واقترح تركيبات لقطات الشاشة.
تكوين التطبيق
حدّث app.json لتقديم المتجر:
{
"expo": {
"name": "تطبيقي الرائع",
"slug": "my-awesome-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#6366f1"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.yourcompany.myawesomeapp",
"buildNumber": "1",
"infoPlist": {
"NSCameraUsageDescription": "يستخدم هذا التطبيق الكاميرا لالتقاط الصور.",
"NSLocationWhenInUseUsageDescription": "يستخدم هذا التطبيق موقعك لعرض الأماكن القريبة.",
"NSPhotoLibraryUsageDescription": "يحفظ هذا التطبيق الصور في مكتبتك."
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#6366f1"
},
"package": "com.yourcompany.myawesomeapp",
"versionCode": 1,
"permissions": [
"CAMERA",
"ACCESS_FINE_LOCATION",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE"
]
},
"plugins": [
"expo-router",
"expo-secure-store",
[
"expo-camera",
{
"cameraPermission": "السماح لـ $(PRODUCT_NAME) بالوصول للكاميرا."
}
],
[
"expo-location",
{
"locationAlwaysAndWhenInUseUsagePermission": "السماح لـ $(PRODUCT_NAME) باستخدام موقعك."
}
]
]
}
}
نشر iOS
المتطلبات المسبقة
- حساب Apple Developer (99$/سنة)
- تطبيق مُنشأ في App Store Connect
- ملفات التوفير مُكوّنة
البناء لـ iOS
# البناء لـ App Store
eas build --platform ios --profile production
# أو البناء لاختبار TestFlight
eas build --platform ios --profile preview
التقديم لـ App Store
# التقديم التلقائي
eas submit --platform ios --latest
# أو تقديم بناء محدد
eas submit --platform ios --id [BUILD_ID]
إعداد App Store Connect
- إنشاء تطبيق في App Store Connect
- ملء معلومات التطبيق:
- رابط سياسة الخصوصية (مطلوب)
- رابط الدعم
- رابط التسويق (اختياري)
- تعيين التصنيف العمري - إكمال الاستبيان
- إضافة لقطات الشاشة - جميع أحجام الأجهزة المطلوبة
- كتابة الوصف - غني بالميزات ومُحسّن للكلمات المفتاحية
- تعيين التسعير - مجاني أو مستويات مدفوعة
أسباب الرفض الشائعة في iOS
| السبب | الحل |
|---|---|
| بيانات وصفية غير مكتملة | ملء جميع الحقول المطلوبة |
| أخطاء وانهيارات | اختبار شامل قبل التقديم |
| محتوى placeholder | إزالة كل "Lorem ipsum" |
| مشاكل تسجيل الدخول | توفير بيانات اعتماد تجريبية |
| سياسة خصوصية مفقودة | إضافة رابط سياسة الخصوصية |
| الإرشادية 4.2 (الحد الأدنى من الوظائف) | ضمان أن التطبيق يوفر قيمة |
نشر Android
المتطلبات المسبقة
- حساب Google Play Developer (25$ لمرة واحدة)
- تطبيق مُنشأ في Google Play Console
- حساب خدمة للرفع التلقائي
إنشاء حساب الخدمة
1. اذهب إلى Google Cloud Console
2. أنشئ مشروعاً جديداً أو اختر موجوداً
3. فعّل Google Play Android Developer API
4. أنشئ حساب خدمة بدور Editor
5. حمّل ملف JSON المفتاح
6. في Play Console، امنح الوصول لحساب الخدمة
7. احفظ المفتاح كـ ./google-service-account.json
البناء لـ Android
# بناء AAB لـ Play Store
eas build --platform android --profile production
# أو بناء APK للاختبار
eas build --platform android --profile preview
التقديم لـ Google Play
# التقديم التلقائي
eas submit --platform android --latest
# تحديد المسار (internal، alpha، beta، production)
eas submit --platform android --latest --track internal
إعداد Play Console
- إنشاء تطبيق في Google Play Console
- إكمال قائمة المتجر:
- وصف قصير (80 حرفاً)
- وصف كامل (4000 حرف)
- لقطات شاشة (هاتف، تابلت 7"، تابلت 10")
- صورة الميزات (1024x500)
- أيقونة التطبيق (512x512)
- تصنيف المحتوى - إكمال استبيان IARC
- الجمهور المستهدف - اختيار الفئات العمرية
- أمان البيانات - الإعلان عن ممارسات جمع البيانات
- الوصول للتطبيق - توفير بيانات اعتماد اختبارية إذا لزم
مسارات الإصدار
داخلي (حتى 100 مختبر)
↓
اختبار مغلق (بالدعوة فقط)
↓
اختبار مفتوح (أي شخص يمكنه الانضمام)
↓
إنتاج (إصدار عام)
تحديثات Over-the-Air
EAS Update يُمكّن التحديثات الفورية بدون مراجعة المتجر:
# تكوين قناة التحديث
eas update:configure
# نشر تحديث لقناة preview
eas update --branch preview --message "إصلاحات الأخطاء"
# النشر للإنتاج
eas update --branch production --message "تحسينات الأداء"
تكوين التحديثات
// app.config.ts
export default {
expo: {
// ... تكوينات أخرى
updates: {
url: 'https://u.expo.dev/[PROJECT_ID]',
fallbackToCacheTimeout: 0,
},
runtimeVersion: {
policy: 'appVersion',
},
},
};
قيود تحديثات OTA
يمكن تحديث:
- كود JavaScript
- الأصول (صور، خطوط)
- الأنماط
لا يمكن تحديث (يتطلب بناء جديد):
- تغييرات الكود الأصلي
- وحدات أصلية جديدة
- تغييرات app.json/app.config
- ترقيات إصدار SDK
CI/CD مع GitHub Actions
# .github/workflows/eas-build.yml
name: EAS Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build iOS
run: eas build --platform ios --profile production --non-interactive
- name: Build Android
run: eas build --platform android --profile production --non-interactive
قائمة التحقق قبل الإطلاق
التقنية
- الاختبار على أجهزة حقيقية (وليس فقط المحاكيات)
- الاختبار على أقدم إصدارات نظام التشغيل المدعومة
- التحقق من عمل جميع نقاط نهاية API
- فحص معالجة الأخطاء والسلوك بدون اتصال
- اختبار الروابط العميقة وإشعارات push
- اختبار الأداء (وقت البدء، الذاكرة)
امتثال المتجر
- سياسة الخصوصية منشورة ومرتبطة
- شروط الخدمة (إذا انطبق)
- التصنيف العمري مكتمل
- إعلانات أمان البيانات دقيقة
- جميع الأذونات موضحة
- بيانات اعتماد تجريبية جاهزة (إذا كان تسجيل الدخول مطلوباً)
الأصول
- أيقونة التطبيق (1024x1024 لـ iOS، 512x512 لـ Android)
- لقطات شاشة لجميع الأحجام المطلوبة
- صورة الميزات (Android)
- فيديو ترويجي (اختياري)
المحتوى
- وصف التطبيق مُحسّن بالكلمات المفتاحية
- ملاحظات الإصدار مكتوبة
- بريد الدعم مُكوّن
- روابط وسائل التواصل الاجتماعي جاهزة
النقاط الرئيسية
- EAS Build يتعامل مع الترجمة الأصلية في السحابة
- ملفات تعريف البناء تفصل التطوير والاختبار والإنتاج
- تحديثات OTA تتجاوز مراجعة المتجر لتغييرات JavaScript
- إرشادات App Store تتطلب اهتماماً دقيقاً بالبيانات الوصفية
- أتمتة CI/CD تبسط عملية الإصدار