5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 00:59:34 +08:00
wails/v3/pkg/mac/mac.go
Lea Anthony 755e869fe7 [v3] Add start_at_login plugin
[v3] Fix plugin startup/shutdown order
2023-04-05 21:22:02 +10:00

25 lines
577 B
Go

//go:build darwin
// Package mac provides a set of functions to interact with the macOS platform.
package mac
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Foundation -framework ServiceManagement
#import <Foundation/Foundation.h>
#import <ServiceManagement/ServiceManagement.h>
// Get the bundle ID
char* getBundleID() {
NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier];
return (char*)[bundleID UTF8String];
}
*/
import "C"
// GetBundleID returns the bundle ID of the application.
func GetBundleID() string {
return C.GoString(C.getBundleID())
}