feat(ios): create iOS test app structure and synchronization documentation
Created standalone iOS test app structure matching android-test-app: - Added ios-test-app directory with README, setup guide, and build scripts - Created comprehensive iOS synchronization status documentation - Documented API method gaps between Android (52) and iOS (9 methods) - Added iOS setup guide for Vue 3 test app New files: - test-apps/ios-test-app/ - Standalone iOS test app structure - docs/IOS_SYNC_STATUS.md - Detailed API comparison and status tracking - docs/IOS_SYNC_SUMMARY.md - Summary of iOS synchronization work - test-apps/daily-notification-test/docs/IOS_SETUP.md - Vue app iOS setup iOS test environments are now ready for setup. Test apps need Xcode project generation via Capacitor CLI or copying from ios/App. Next steps: Generate Xcode projects and implement missing API methods.
This commit is contained in:
163
test-apps/daily-notification-test/docs/IOS_SETUP.md
Normal file
163
test-apps/daily-notification-test/docs/IOS_SETUP.md
Normal file
@@ -0,0 +1,163 @@
|
||||
# iOS Setup for Daily Notification Test App
|
||||
|
||||
**Author**: Matthew Raymer
|
||||
**Date**: 2025-11-04
|
||||
|
||||
## Overview
|
||||
|
||||
This guide explains how to set up the iOS platform for the Vue 3 test app (`daily-notification-test`).
|
||||
|
||||
## Initial Setup
|
||||
|
||||
### Step 1: Add iOS Platform
|
||||
|
||||
```bash
|
||||
cd test-apps/daily-notification-test
|
||||
npx cap add ios
|
||||
```
|
||||
|
||||
This will:
|
||||
- Create `ios/` directory
|
||||
- Generate Xcode project structure
|
||||
- Set up CocoaPods configuration
|
||||
- Configure Capacitor integration
|
||||
|
||||
### Step 2: Install CocoaPods Dependencies
|
||||
|
||||
```bash
|
||||
cd ios/App
|
||||
pod install
|
||||
```
|
||||
|
||||
### Step 3: Verify Plugin Integration
|
||||
|
||||
The plugin should be automatically included via Capacitor when you run `npx cap sync ios`. Verify in `ios/App/Podfile`:
|
||||
|
||||
```ruby
|
||||
pod 'DailyNotificationPlugin', :path => '../../../ios'
|
||||
```
|
||||
|
||||
If not present, add it manually.
|
||||
|
||||
### Step 4: Build and Run
|
||||
|
||||
```bash
|
||||
# From test-apps/daily-notification-test
|
||||
npm run build
|
||||
npx cap sync ios
|
||||
npx cap run ios
|
||||
```
|
||||
|
||||
Or use the build script:
|
||||
|
||||
```bash
|
||||
./scripts/build-and-deploy-ios.sh
|
||||
```
|
||||
|
||||
## Plugin Configuration
|
||||
|
||||
The plugin is configured in `capacitor.config.ts`:
|
||||
|
||||
```typescript
|
||||
plugins: {
|
||||
DailyNotification: {
|
||||
debugMode: true,
|
||||
enableNotifications: true,
|
||||
// ... TimeSafari configuration
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This configuration is automatically synced to iOS when you run `npx cap sync ios`.
|
||||
|
||||
## iOS-Specific Configuration
|
||||
|
||||
### Info.plist
|
||||
|
||||
After `npx cap add ios`, verify `ios/App/App/Info.plist` includes:
|
||||
|
||||
- `NSUserNotificationsUsageDescription` - Notification permission description
|
||||
- `UIBackgroundModes` - Background modes (fetch, processing)
|
||||
- `BGTaskSchedulerPermittedIdentifiers` - Background task identifiers
|
||||
|
||||
### Podfile
|
||||
|
||||
Ensure `ios/App/Podfile` includes the plugin:
|
||||
|
||||
```ruby
|
||||
platform :ios, '13.0'
|
||||
use_frameworks!
|
||||
|
||||
def capacitor_pods
|
||||
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'DailyNotificationPlugin', :path => '../../../ios'
|
||||
end
|
||||
|
||||
target 'App' do
|
||||
capacitor_pods
|
||||
end
|
||||
```
|
||||
|
||||
## Build Process
|
||||
|
||||
1. **Build Web Assets**: `npm run build`
|
||||
2. **Sync with iOS**: `npx cap sync ios`
|
||||
3. **Install Pods**: `cd ios/App && pod install`
|
||||
4. **Build iOS**: Use Xcode or `xcodebuild`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### iOS Directory Missing
|
||||
|
||||
If `ios/` directory doesn't exist:
|
||||
|
||||
```bash
|
||||
npx cap add ios
|
||||
```
|
||||
|
||||
### Plugin Not Found
|
||||
|
||||
1. Ensure plugin is built:
|
||||
```bash
|
||||
./scripts/build-native.sh --platform ios
|
||||
```
|
||||
|
||||
2. Verify Podfile includes plugin path
|
||||
|
||||
3. Reinstall pods:
|
||||
```bash
|
||||
cd ios/App
|
||||
pod deintegrate
|
||||
pod install
|
||||
```
|
||||
|
||||
### Build Errors
|
||||
|
||||
1. Clean build folder in Xcode (⌘⇧K)
|
||||
2. Delete derived data
|
||||
3. Rebuild
|
||||
|
||||
### Sync Issues
|
||||
|
||||
If `npx cap sync ios` fails:
|
||||
|
||||
1. Check `capacitor.config.ts` is valid
|
||||
2. Ensure `dist/` directory exists (run `npm run build`)
|
||||
3. Check plugin path in `package.json`
|
||||
|
||||
## Testing
|
||||
|
||||
Once set up, you can test the plugin:
|
||||
|
||||
1. Build and run: `npx cap run ios`
|
||||
2. Open app in simulator
|
||||
3. Navigate to plugin test views
|
||||
4. Test plugin functionality
|
||||
|
||||
## See Also
|
||||
|
||||
- [iOS Build Quick Reference](IOS_BUILD_QUICK_REFERENCE.md)
|
||||
- [Plugin Detection Guide](PLUGIN_DETECTION_GUIDE.md)
|
||||
- [Main README](../../README.md)
|
||||
|
||||
Reference in New Issue
Block a user