Consolidate all markdown documentation into organized structure per CONSOLIDATION_DIRECTIVE. All files preserved (canonical, merged, or archived). - docs/integration/ - Integration documentation (7 files) - docs/platform/ios/ - iOS platform docs (12 files) - docs/platform/android/ - Android platform docs (9 files) - docs/testing/ - Testing documentation (15 files) - docs/design/ - Design & research (5 files) - docs/ai/ - AI/ChatGPT artifacts (7 files) - docs/archive/2025-legacy-doc/ - Historical docs (17 files) - Integration: Root INTEGRATION_GUIDE.md → docs/integration/ - Platform: Separated iOS and Android into platform/ subdirectories - Testing: Consolidated all testing docs to docs/testing/ - Legacy: Archived entire doc/ directory to archive/ - AI: Moved all ChatGPT artifacts to docs/ai/ - Added docs/00-INDEX.md - Central navigation hub - Added docs/CONSOLIDATION_SOURCE_MAP.md - Complete audit trail - Added docs/CONSOLIDATION_COMPLETE.md - Consolidation summary - Updated README.md with links to documentation index - All 139 files have destinations (see CONSOLIDATION_SOURCE_MAP.md) - Zero information loss (all files preserved) - Archive preserves original structure - Index provides clear navigation - 87 files moved/created/updated - Root-level docs consolidated - Legacy doc/ directory archived - Test app docs remain with test apps (indexed) Ref: CONSOLIDATION_DIRECTIVE Author: Matthew Raymer
4.2 KiB
4.2 KiB
iOS Test App Setup Guide
Status: 📋 SETUP REQUIRED
Objective: Create iOS test app for Phase 1 testing
Problem
The iOS test app (test-apps/ios-test-app/) does not exist yet. This guide will help you create it.
Quick Setup
Option 1: Automated Setup (Recommended)
Run the setup script:
./scripts/setup-ios-test-app.sh
This will:
- Create basic directory structure
- Copy HTML from Android test app
- Create
capacitor.config.jsonandpackage.json - Set up basic files
Option 2: Manual Setup
Follow the steps below to create the iOS test app manually.
Manual Setup Steps
Step 1: Create Directory Structure
cd test-apps
mkdir -p ios-test-app/App/App/Public
cd ios-test-app
Step 2: Initialize Capacitor
# Create package.json
cat > package.json << 'EOF'
{
"name": "ios-test-app",
"version": "1.0.0",
"description": "iOS test app for DailyNotification plugin",
"scripts": {
"sync": "npx cap sync ios",
"open": "npx cap open ios"
},
"dependencies": {
"@capacitor/core": "^5.0.0",
"@capacitor/ios": "^5.0.0"
}
}
EOF
# Install dependencies
npm install
# Add iOS platform
npx cap add ios
Step 3: Copy HTML from Android Test App
# Copy HTML file
cp ../android-test-app/app/src/main/assets/public/index.html App/App/Public/index.html
Step 4: Configure Capacitor
Create capacitor.config.json:
{
"appId": "com.timesafari.dailynotification.test",
"appName": "DailyNotification Test App",
"webDir": "App/App/Public",
"server": {
"iosScheme": "capacitor"
},
"plugins": {
"DailyNotification": {
"enabled": true
}
}
}
Step 5: Configure Info.plist
Edit App/App/Info.plist and add:
<!-- Background Task Identifiers -->
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.timesafari.dailynotification.fetch</string>
<string>com.timesafari.dailynotification.notify</string>
</array>
<!-- Background Modes -->
<key>UIBackgroundModes</key>
<array>
<string>background-fetch</string>
<string>background-processing</string>
<string>remote-notification</string>
</array>
<!-- Notification Permissions -->
<key>NSUserNotificationsUsageDescription</key>
<string>This app uses notifications to deliver daily updates and reminders.</string>
Step 6: Link Plugin
The plugin needs to be accessible. Options:
Option A: Local Development (Recommended)
- Ensure plugin is at
../../ios/Plugin/ - Capacitor will auto-detect it during sync
Option B: Via npm
- Install plugin:
npm install ../../ - Capacitor will link it automatically
Step 7: Sync Capacitor
npx cap sync ios
Step 8: Build and Run
# Use build script
../../scripts/build-ios-test-app.sh --simulator
# Or open in Xcode
npx cap open ios
# Then press Cmd+R in Xcode
Troubleshooting
Issue: "No Xcode workspace or project found"
Solution: Run npx cap add ios first to create the Xcode project.
Issue: Plugin not found
Solution:
- Ensure plugin exists at
../../ios/Plugin/ - Run
npx cap sync ios - Check
App/App/capacitor.plugins.jsoncontains DailyNotification entry
Issue: BGTask not running
Solution:
- Verify Info.plist has
BGTaskSchedulerPermittedIdentifiers - Check task registered in AppDelegate
- Use simulator-only LLDB command to manually trigger (see testing guide)
Issue: Build failures
Solution:
- Run
pod installinApp/directory - Clean build folder in Xcode (Cmd+Shift+K)
- Verify Capacitor plugin path
Verification Checklist
After setup, verify:
test-apps/ios-test-app/directory existsApp.xcworkspaceorApp.xcodeprojexistsApp/App/Public/index.htmlexistscapacitor.config.jsonexistsInfo.plisthas BGTask identifiers- Plugin loads in test app
- Build script works:
./scripts/build-ios-test-app.sh --simulator
References
- Requirements:
doc/test-app-ios/IOS_TEST_APP_REQUIREMENTS.md - Testing Guide:
doc/IOS_PHASE1_TESTING_GUIDE.md - Build Script:
scripts/build-ios-test-app.sh - Setup Script:
scripts/setup-ios-test-app.sh
Status: 📋 SETUP REQUIRED
Last Updated: 2025-01-XX