refactor: improve build configuration and code organization
- Add build scripts for Android and iOS platforms - Remove duplicate web implementation (src/web.ts) - Add proper TypeScript configuration - Add module documentation to index.ts - Clean up package.json scripts This commit improves the project structure and build process by: 1. Adding dedicated build scripts for native platforms 2. Removing redundant web implementation 3. Adding proper TypeScript configuration with strict mode 4. Improving code documentation 5. Organizing package.json scripts The changes maintain backward compatibility while improving the development experience and code quality.
This commit is contained in:
39
ios/Plugin/README.md
Normal file
39
ios/Plugin/README.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# iOS Implementation
|
||||
|
||||
This directory contains the iOS-specific implementation of the DailyNotification plugin.
|
||||
|
||||
## Implementation Details
|
||||
|
||||
The iOS implementation uses:
|
||||
|
||||
- `BGTaskScheduler` for background data fetching
|
||||
- `UNUserNotificationCenter` for notification management
|
||||
- `UserDefaults` for local data storage
|
||||
- iOS notification categories and actions
|
||||
|
||||
## Native Code Location
|
||||
|
||||
The native iOS implementation is located in the `ios/` directory at the project root.
|
||||
|
||||
## Key Components
|
||||
|
||||
1. `DailyNotificationIOS.swift`: Main plugin class
|
||||
2. `BackgroundTaskManager.swift`: Handles background fetch scheduling
|
||||
3. `NotificationManager.swift`: Manages notification creation and display
|
||||
4. `DataStore.swift`: Handles local data persistence
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
- Uses BGTaskScheduler for reliable background execution
|
||||
- Implements proper battery optimization handling
|
||||
- Supports iOS notification categories and actions
|
||||
- Handles background refresh limitations
|
||||
- Uses UserDefaults for lightweight data storage
|
||||
|
||||
## Testing
|
||||
|
||||
Run iOS-specific tests with:
|
||||
|
||||
```bash
|
||||
npm run test:ios
|
||||
```
|
||||
Reference in New Issue
Block a user