mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
This commit integrates iOS platform support for Wails v3, adapting the iOS-specific code to work with the new transport layer architecture. Key changes: - Add iOS-specific application, webview, and runtime files - Add iOS event types and processing - Add iOS examples and templates - Update messageprocessor to handle iOS requests - Move badge_ios.go to dock package Note: The iOS branch was based on an older v3-alpha and required significant conflict resolution due to the transport layer refactor (PR #4702). Some iOS-specific code may need further adaptation: - processIOSMethod needs to be implemented with new RuntimeRequest signature - iOS event generation in tasks/events/generate.go needs updating 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
90 lines
No EOL
2.1 KiB
Go
90 lines
No EOL
2.1 KiB
Go
//go:build ios
|
|
|
|
package application
|
|
|
|
// dialogsImpl implements dialogs for iOS
|
|
type dialogsImpl struct {
|
|
// iOS-specific fields if needed
|
|
}
|
|
|
|
func newDialogsImpl() *dialogsImpl {
|
|
return &dialogsImpl{}
|
|
}
|
|
|
|
// iOS dialog implementations would use UIAlertController
|
|
// These are placeholder implementations for now
|
|
|
|
func (d *dialogsImpl) info(id uint, param MessageDialogOptions) {
|
|
// TODO: Implement using UIAlertController
|
|
}
|
|
|
|
func (d *dialogsImpl) warning(id uint, param MessageDialogOptions) {
|
|
// TODO: Implement using UIAlertController
|
|
}
|
|
|
|
func (d *dialogsImpl) error(id uint, param MessageDialogOptions) {
|
|
// TODO: Implement using UIAlertController
|
|
}
|
|
|
|
func (d *dialogsImpl) question(id uint, param MessageDialogOptions) chan bool {
|
|
// TODO: Implement using UIAlertController
|
|
ch := make(chan bool, 1)
|
|
ch <- false
|
|
return ch
|
|
}
|
|
|
|
func (d *dialogsImpl) openFile(id uint, param OpenFileDialogOptions) chan string {
|
|
// TODO: Implement using UIDocumentPickerViewController
|
|
ch := make(chan string, 1)
|
|
ch <- ""
|
|
return ch
|
|
}
|
|
|
|
func (d *dialogsImpl) openMultipleFiles(id uint, param OpenFileDialogOptions) chan []string {
|
|
// TODO: Implement using UIDocumentPickerViewController
|
|
ch := make(chan []string, 1)
|
|
ch <- []string{}
|
|
return ch
|
|
}
|
|
|
|
func (d *dialogsImpl) openDirectory(id uint, param OpenFileDialogOptions) chan string {
|
|
// TODO: Implement using UIDocumentPickerViewController
|
|
ch := make(chan string, 1)
|
|
ch <- ""
|
|
return ch
|
|
}
|
|
|
|
func (d *dialogsImpl) saveFile(id uint, param SaveFileDialogOptions) chan string {
|
|
// TODO: Implement using UIDocumentPickerViewController
|
|
ch := make(chan string, 1)
|
|
ch <- ""
|
|
return ch
|
|
}
|
|
|
|
type iosDialog struct {
|
|
dialog *MessageDialog
|
|
}
|
|
|
|
func (d *iosDialog) show() {
|
|
// TODO: Implement using UIAlertController
|
|
}
|
|
|
|
func newDialogImpl(d *MessageDialog) *iosDialog {
|
|
return &iosDialog{
|
|
dialog: d,
|
|
}
|
|
}
|
|
|
|
func (d *dialogsImpl) show() (chan string, error) {
|
|
ch := make(chan string, 1)
|
|
ch <- ""
|
|
return ch, nil
|
|
}
|
|
|
|
func newOpenFileDialogImpl(_ *OpenFileDialogStruct) openFileDialogImpl {
|
|
return &dialogsImpl{}
|
|
}
|
|
|
|
func newSaveFileDialogImpl(_ *SaveFileDialogStruct) saveFileDialogImpl {
|
|
return &dialogsImpl{}
|
|
} |