Skip to content

Conversation

@Suyunmeng
Copy link
Contributor

  • 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.

- 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.
@Suyunmeng Suyunmeng marked this pull request as draft October 19, 2025 04:11
Suyunmeng and others added 9 commits October 19, 2025 12:43
- 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants