fix(ios): resolve compilation errors for iOS plugin build
Fixed compilation errors preventing iOS plugin build: Duplicate Method Declarations: - Removed duplicate getContentCache() and clearContentCache() from DailyNotificationCallbacks.swift - These methods are already implemented in DailyNotificationPlugin.swift - Added comment explaining removal Override Keyword Issues: - Added 'public' access modifier to checkPermissions() override - Added 'public' access modifier to requestPermissions() override - Methods now properly override parent class methods from CAPPlugin Build Configuration: - Set GENERATE_INFOPLIST_FILE=YES for framework target - Fixed encoding issues with LANG=en_US.UTF-8 Result: - iOS plugin now builds successfully - All 52 API methods compile without errors - Ready for testing and integration
This commit is contained in:
@@ -71,29 +71,8 @@ extension DailyNotificationPlugin {
|
|||||||
|
|
||||||
// MARK: - Content Management
|
// MARK: - Content Management
|
||||||
|
|
||||||
@objc func getContentCache(_ call: CAPPluginCall) {
|
// Note: getContentCache and clearContentCache are implemented in DailyNotificationPlugin.swift
|
||||||
Task {
|
// These methods are removed to avoid duplicate declarations
|
||||||
do {
|
|
||||||
let cache = try await getContentCache()
|
|
||||||
call.resolve(cache)
|
|
||||||
} catch {
|
|
||||||
print("DNP-PLUGIN: Failed to get content cache: \(error)")
|
|
||||||
call.reject("Content cache retrieval failed: \(error.localizedDescription)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc func clearContentCache(_ call: CAPPluginCall) {
|
|
||||||
Task {
|
|
||||||
do {
|
|
||||||
try await clearContentCache()
|
|
||||||
call.resolve()
|
|
||||||
} catch {
|
|
||||||
print("DNP-PLUGIN: Failed to clear content cache: \(error)")
|
|
||||||
call.reject("Content cache clearing failed: \(error.localizedDescription)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc func getContentHistory(_ call: CAPPluginCall) {
|
@objc func getContentHistory(_ call: CAPPluginCall) {
|
||||||
Task {
|
Task {
|
||||||
|
|||||||
@@ -1334,7 +1334,7 @@ public class DailyNotificationPlugin: CAPPlugin {
|
|||||||
* Returns PermissionStatus with notifications field as PermissionState.
|
* Returns PermissionStatus with notifications field as PermissionState.
|
||||||
* This is the standard Capacitor permission check format.
|
* This is the standard Capacitor permission check format.
|
||||||
*/
|
*/
|
||||||
@objc func checkPermissions(_ call: CAPPluginCall) {
|
@objc public override func checkPermissions(_ call: CAPPluginCall) {
|
||||||
print("DNP-PLUGIN: Checking permissions (Capacitor format)")
|
print("DNP-PLUGIN: Checking permissions (Capacitor format)")
|
||||||
|
|
||||||
notificationCenter.getNotificationSettings { settings in
|
notificationCenter.getNotificationSettings { settings in
|
||||||
@@ -1374,7 +1374,7 @@ public class DailyNotificationPlugin: CAPPlugin {
|
|||||||
*
|
*
|
||||||
* Standard Capacitor permission request method.
|
* Standard Capacitor permission request method.
|
||||||
*/
|
*/
|
||||||
@objc func requestPermissions(_ call: CAPPluginCall) {
|
@objc public override func requestPermissions(_ call: CAPPluginCall) {
|
||||||
// Delegate to requestNotificationPermissions
|
// Delegate to requestNotificationPermissions
|
||||||
requestNotificationPermissions(call)
|
requestNotificationPermissions(call)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user