From 3dbd131e49a18c33e97fc1d6d12493b35910938b Mon Sep 17 00:00:00 2001 From: zarzet Date: Mon, 12 Jan 2026 01:02:16 +0700 Subject: [PATCH] fix: iOS extension auth function names (use ByID suffix) --- .../extension_feature_request.yml | 117 ++++++++++++++++++ ios/Runner/AppDelegate.swift | 10 +- 2 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/extension_feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/extension_feature_request.yml b/.github/ISSUE_TEMPLATE/extension_feature_request.yml new file mode 100644 index 00000000..8748a780 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/extension_feature_request.yml @@ -0,0 +1,117 @@ +name: Extension API Feature Request +description: Request new API features or capabilities for extension development +title: "[Extension API]: " +labels: ["enhancement", "extension-api"] +body: + - type: markdown + attributes: + value: | + Thanks for helping improve the SpotiFLAC Extension API! + This form is for extension developers who need new features or capabilities that don't exist yet. + + - type: checkboxes + id: checklist + attributes: + label: Checklist + description: Please confirm the following before submitting + options: + - label: I have read the [Extension Development Guide](https://github.com/zarzet/SpotiFLAC-Mobile/blob/main/docs/EXTENSION_DEVELOPMENT.md) + required: true + - label: I have searched existing issues and this API feature hasn't been requested yet + required: true + + - type: textarea + id: extension_goal + attributes: + label: What are you trying to build? + description: Describe the extension or feature you're developing + placeholder: "I'm building an extension that downloads from [service name] / provides metadata from [source]..." + validations: + required: true + + - type: textarea + id: current_limitation + attributes: + label: Current API Limitation + description: What's missing or limiting in the current extension API? + placeholder: | + The current API doesn't support: + - [missing feature 1] + - [missing feature 2] + + This prevents me from... + validations: + required: true + + - type: textarea + id: proposed_api + attributes: + label: Proposed API / Feature + description: Describe the API or feature you'd like to see added + placeholder: | + I would like to have: + - A new function `api.newFeature()` that does X + - A new manifest field `newOption` that enables Y + - Access to Z capability... + validations: + required: true + + - type: textarea + id: use_case + attributes: + label: Use Case Example + description: Provide a code example of how you would use this feature + placeholder: | + ```javascript + // Example usage in extension code + function download(request, progressCallback) { + const result = api.proposedFeature(params); + // ... + } + ``` + validations: + required: false + + - type: dropdown + id: api_category + attributes: + label: API Category + description: What category does this feature fall under? + options: + - HTTP/Network API + - File System API + - Storage API + - FFmpeg/Audio Processing + - Manifest Options + - Runtime Functions + - UI Integration + - Authentication + - Other + validations: + required: true + + - type: dropdown + id: priority + attributes: + label: How critical is this for your extension? + options: + - Blocker - Cannot build my extension without this + - High - Major functionality depends on this + - Medium - Would significantly improve my extension + - Low - Nice to have + validations: + required: true + + - type: textarea + id: workaround + attributes: + label: Current Workaround + description: Are you using any workaround currently? If so, describe it. + placeholder: "Currently I'm working around this by..." + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context, links to similar APIs, or examples from other platforms + placeholder: "Similar feature in other platforms: ..." diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 47381420..e4db3473 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -414,8 +414,7 @@ import Gobackend // Import Go framework let args = call.arguments as! [String: Any] let extensionId = args["extension_id"] as! String let authCode = args["auth_code"] as! String - GobackendSetExtensionAuthCode(extensionId, authCode, &error) - if let error = error { throw error } + GobackendSetExtensionAuthCodeByID(extensionId, authCode) return nil case "setExtensionTokens": @@ -424,20 +423,19 @@ import Gobackend // Import Go framework let accessToken = args["access_token"] as! String let refreshToken = args["refresh_token"] as? String ?? "" let expiresIn = args["expires_in"] as? Int ?? 0 - GobackendSetExtensionTokens(extensionId, accessToken, refreshToken, Int(expiresIn), &error) - if let error = error { throw error } + GobackendSetExtensionTokensByID(extensionId, accessToken, refreshToken, Int(expiresIn)) return nil case "clearExtensionPendingAuth": let args = call.arguments as! [String: Any] let extensionId = args["extension_id"] as! String - GobackendClearExtensionPendingAuth(extensionId) + GobackendClearExtensionPendingAuthByID(extensionId) return nil case "isExtensionAuthenticated": let args = call.arguments as! [String: Any] let extensionId = args["extension_id"] as! String - let response = GobackendIsExtensionAuthenticated(extensionId) + let response = GobackendIsExtensionAuthenticatedByID(extensionId) return response case "getAllPendingAuthRequests":