feat(ios): implement Phase 1 permission methods and fix build issues
Implement checkPermissionStatus() and requestNotificationPermissions() methods for iOS plugin, matching Android functionality. Fix compilation errors across plugin files and add comprehensive build/test infrastructure. Key Changes: - Add checkPermissionStatus() and requestNotificationPermissions() methods - Fix 13+ categories of Swift compilation errors (type conversions, logger API, access control, async/await, etc.) - Create DailyNotificationScheduler, DailyNotificationStorage, DailyNotificationStateActor, and DailyNotificationErrorCodes components - Fix CoreData initialization to handle missing model gracefully for Phase 1 - Add iOS test app build script with simulator auto-detection - Update directive with lessons learned from build and permission work Build Status: ✅ BUILD SUCCEEDED Test App: ✅ Ready for iOS Simulator testing Files Modified: - doc/directives/0003-iOS-Android-Parity-Directive.md (lessons learned) - ios/Plugin/DailyNotificationPlugin.swift (Phase 1 methods) - ios/Plugin/DailyNotificationModel.swift (CoreData fix) - 11+ other plugin files (compilation fixes) Files Added: - ios/Plugin/DailyNotificationScheduler.swift - ios/Plugin/DailyNotificationStorage.swift - ios/Plugin/DailyNotificationStateActor.swift - ios/Plugin/DailyNotificationErrorCodes.swift - scripts/build-ios-test-app.sh - scripts/setup-ios-test-app.sh - test-apps/ios-test-app/ (full test app) - Multiple Phase 1 documentation files
This commit is contained in:
@@ -162,7 +162,7 @@ class DailyNotificationDatabase {
|
||||
*
|
||||
* @param sql SQL statement to execute
|
||||
*/
|
||||
private func executeSQL(_ sql: String) {
|
||||
func executeSQL(_ sql: String) {
|
||||
var statement: OpaquePointer?
|
||||
|
||||
if sqlite3_prepare_v2(db, sql, -1, &statement, nil) == SQLITE_OK {
|
||||
@@ -208,4 +208,33 @@ class DailyNotificationDatabase {
|
||||
func isOpen() -> Bool {
|
||||
return db != nil
|
||||
}
|
||||
|
||||
/**
|
||||
* Save notification content to database
|
||||
*
|
||||
* @param content Notification content to save
|
||||
*/
|
||||
func saveNotificationContent(_ content: NotificationContent) {
|
||||
// TODO: Implement database persistence
|
||||
// For Phase 1, storage uses UserDefaults primarily
|
||||
print("\(Self.TAG): saveNotificationContent called for \(content.id)")
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification content from database
|
||||
*
|
||||
* @param id Notification ID
|
||||
*/
|
||||
func deleteNotificationContent(id: String) {
|
||||
// TODO: Implement database deletion
|
||||
print("\(Self.TAG): deleteNotificationContent called for \(id)")
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all notifications from database
|
||||
*/
|
||||
func clearAllNotifications() {
|
||||
// TODO: Implement database clearing
|
||||
print("\(Self.TAG): clearAllNotifications called")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user