This commit is contained in:
2026-02-04 02:21:23 +08:00
commit 208786aa90
112 changed files with 9571 additions and 0 deletions

24
build/ios/main_ios.go Normal file
View File

@@ -0,0 +1,24 @@
//go:build ios
package main
import (
"C"
)
// For iOS builds, we need to export a function that can be called from Objective-C
// This wrapper allows us to keep the original main.go unmodified
//export WailsIOSMain
func WailsIOSMain() {
// DO NOT lock the goroutine to the current OS thread on iOS!
// This causes signal handling issues:
// "signal 16 received on thread with no signal stack"
// "fatal error: non-Go code disabled sigaltstack"
// iOS apps run in a sandboxed environment where the Go runtime's
// signal handling doesn't work the same way as desktop platforms.
// Call the actual main function from main.go
// This ensures all the user's code is executed
main()
}