-
Notifications
You must be signed in to change notification settings - Fork 28
feat(ios): implement Pigeon API bridges for OpenList core #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Suyunmeng
wants to merge
14
commits into
main
Choose a base branch
from
feat/ios/working
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add OpenListManager.swift for core server lifecycle management - Add OpenListBridge.swift implementing Android API interface - Add AppConfigBridge.swift for app configuration management - Add CommonBridge.swift for common native functions - Update AppDelegate.swift to register all Pigeon APIs - Implement event and log callbacks for Flutter communication This enables iOS app to start/stop OpenList server when button is clicked.
- Generate PigeonApi.swift with correct protocol names - Update AppDelegate to use Event class from Pigeon - Update OpenListManager to use Event API instead of delegate pattern - Remove delegate protocols, use Pigeon Event API directly - Add conditional compilation for Openlistlib framework This fixes Swift compiler errors about missing types.
Change Event.setup() to Event.setUp() to match Pigeon generated API.
- Add PigeonApi.swift to project - Add OpenListManager.swift to project - Add OpenListBridge.swift to project - Add AppConfigBridge.swift to project - Add CommonBridge.swift to project - Create Bridges group for organization - Add all files to Sources build phase This fixes 'Cannot find type' Swift compiler errors.
- Remove underscore prefixes from all Bridge method parameters - Fix AppConfigBridge: add parameter labels (enabled:, dir:) - Fix OpenListBridge: add parameter label (pwd:) - Fix CommonBridge: add parameter labels (intentUri:, msg:) - Fix OpenListManager Go Mobile calls with proper error handling - Use NSError pattern for OpenlistlibShutdown and OpenlistlibForceDBSync - Fix OpenlistlibIsRunning string parameter passing This fixes 'Missing argument for parameter' and 'different argument labels' errors.
- Remove extraneous 'cb:' label in OpenlistlibInit - Remove extraneous 'error:' label in OpenlistlibShutdown - Fix NSError parameter order: (param, &error) not (param, error: &error) - Remove incorrect string pointer in OpenlistlibIsRunning - Simplify error handling without try-catch blocks Go Mobile generated bindings use positional NSError parameters.
- Added data directory setup in OpenListManager.initialize() - Call OpenlistlibSetConfigData() before Init() like Android - Auto-initialize on startServer() if not already done - Store dataDir reference for debugging - Fixed crash: Sandbox deny file-write-create in Bundle directory
Go Mobile functions SetConfigData and SetConfigLogStd do not return errors, so they don't have NSError** parameters in Swift bindings. Fixed: - OpenlistlibSetConfigData(path) - removed &setDirError - OpenlistlibSetConfigLogStd(bool) - removed &setLogError Matches Android implementation which also calls these without error handling.
- Add background task management in AppDelegate to maintain process assertions - Implement applicationDidEnterBackground/WillEnterForeground lifecycle methods - Enable WebView page caching and state preservation settings - Fix issue where app appears terminated when switching from webpage to OpenList Resolves process suspension issue identified in system logs where WebContent process enters running-suspended-NotVisible state with jetsam priority 0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables iOS app to start/stop OpenList server when button is clicked.