Skip to content

Commit

Permalink
Complete the package and sign of a macOS app
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Nov 27, 2020
1 parent cb33972 commit 9796835
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 10 deletions.
5 changes: 4 additions & 1 deletion cmd/fyne/commands/package-darwin.go
Expand Up @@ -4,6 +4,7 @@ import (
"image"
"os"
"path/filepath"
"strings"

"fyne.io/fyne/cmd/fyne/internal/templates"
"fyne.io/fyne/cmd/fyne/internal/util"
Expand All @@ -17,6 +18,7 @@ type darwinData struct {
AppID string
Version string
Build int
Category string
}

func (p *packager) packageDarwin() error {
Expand All @@ -27,7 +29,8 @@ func (p *packager) packageDarwin() error {
info := filepath.Join(contentsDir, "Info.plist")
infoFile, _ := os.Create(info)

tplData := darwinData{Name: p.name, ExeName: exeName, AppID: p.appID, Version: p.appVersion, Build: p.appBuild}
tplData := darwinData{Name: p.name, ExeName: exeName, AppID: p.appID, Version: p.appVersion, Build: p.appBuild,
Category: strings.ToLower(p.category)}
err := templates.InfoPlistDarwin.Execute(infoFile, tplData)
if err != nil {
return errors.Wrap(err, "Failed to write plist template")
Expand Down
2 changes: 1 addition & 1 deletion cmd/fyne/commands/package.go
Expand Up @@ -31,7 +31,7 @@ type packager struct {
appBuild int
install, release bool
certificate, profile string // optional flags for releasing
tags string
tags, category string
}

// NewPackager returns a packager command that can wrap executables into full GUI app packages.
Expand Down
71 changes: 68 additions & 3 deletions cmd/fyne/commands/release.go
Expand Up @@ -15,6 +15,17 @@ import (
"fyne.io/fyne/cmd/fyne/internal/util"
)

var (
macAppStoreCategories = []string{
"business", "developer-tools", "education", "entertainment", "finance", "games", "action-games",
"adventure-games", "arcade-games", "board-games", "card-games", "casino-games", "dice-games",
"educational-games", "family-games", "kids-games", "music-games", "puzzle-games", "racing-games",
"role-playing-games", "simulation-games", "sports-games", "strategy-games", "trivia-games", "word-games",
"graphics-design", "healthcare-fitness", "lifestyle", "medical", "music", "news", "photography",
"productivity", "reference", "social-networking", "sports", "travel", "utilities", "video", "weather",
}
)

// Declare conformity to Command interface
var _ Command = (*releaser)(nil)

Expand Down Expand Up @@ -48,6 +59,7 @@ func (r *releaser) AddFlags() {
flag.StringVar(&r.developer, "developer", "", "Windows: the developer identity for your Microsoft store account")
flag.StringVar(&r.password, "password", "", "Windows: password for the certificate used to sign the build")
flag.StringVar(&r.tags, "tags", "", "A comma-separated list of build tags")
flag.StringVar(&r.category, "category", "", "iOS: category of the app for store listing")
}

func (r *releaser) PrintHelp(indent string) {
Expand Down Expand Up @@ -143,7 +155,7 @@ func (r *releaser) packageIOSRelease() error {
TeamID: team,
AppID: r.appID,
}
err = templates.EntitlementsDarwin.Execute(entitlements, entitlementData)
err = templates.EntitlementsDarwinMobile.Execute(entitlements, entitlementData)
entitlements.Close()
if err != nil {
return errors.New("failed to write entitlements plist template")
Expand All @@ -160,8 +172,40 @@ func (r *releaser) packageIOSRelease() error {
}

func (r *releaser) packageMacOSRelease() error {
cmd := exec.Command("productbuild", "--component", r.name+".app", "/Applications/",
"--product", r.name+".app/Contents/Info.plist", r.name+".pkg")
appCert := r.certificate // try to derive two certificates from one name (they will be consistent)
if strings.Index(appCert, "Installer") != -1 {
appCert = strings.Replace(appCert, "Installer", "Application", 1)
}
installCert := strings.Replace(appCert, "Application", "Installer", 1)
unsignedPath := r.name + "-unsigned.pkg"

defer os.RemoveAll(r.name + ".app") // this was the output of package and it can get in the way of future builds
entitlementPath := filepath.Join(r.dir, "entitlements.plist")
entitlements, _ := os.Create(entitlementPath)
err := templates.EntitlementsDarwin.Execute(entitlements, nil)
entitlements.Close()
if err != nil {
return errors.New("failed to write entitlements plist template")
}
defer os.Remove(entitlementPath)

cmd := exec.Command("codesign", "-vfs", appCert, "--entitlement", "entitlements.plist", r.name+".app")
err = cmd.Run()
if err != nil {
fyne.LogError("Codesign failed", err)
return errors.New("unable to codesign application bundle")
}

cmd = exec.Command("productbuild", "--component", r.name+".app", "/Applications/",
"--product", r.name+".app/Contents/Info.plist", unsignedPath)
err = cmd.Run()
if err != nil {
fyne.LogError("Product build failed", err)
return errors.New("unable to build macOS app package")
}
defer os.Remove(unsignedPath)

cmd = exec.Command("productsign", "--sign", installCert, unsignedPath, r.name+".pkg")
return cmd.Run()
}

Expand Down Expand Up @@ -265,6 +309,16 @@ func (r *releaser) validate() error {
if r.keyStore == "" {
return errors.New("missing required -keyStore parameter for android release")
}
} else if r.os == "darwin" {
if r.certificate == "" {
r.certificate = "3rd Party Mac Developer Application"
}
if r.category == "" {
return errors.New("missing required -category parameter for macOS release")
} else if !isValidMacOSCategory(r.category) {
return errors.New("category does not match one of the supported list: " +
strings.Join(macAppStoreCategories, ", "))
}
} else if r.os == "ios" {
if r.certificate == "" {
r.certificate = "Apple Distribution"
Expand Down Expand Up @@ -305,3 +359,14 @@ func findWindowsSDKBin() (string, error) {

return filepath.Dir(matches[0]), nil
}

func isValidMacOSCategory(in string) bool {
found := false
for _, cat := range macAppStoreCategories {
if cat == strings.ToLower(in) {
found = true
break
}
}
return found
}
10 changes: 10 additions & 0 deletions cmd/fyne/commands/release_test.go
Expand Up @@ -16,3 +16,13 @@ func TestReleaser_nameFromCertInfo(t *testing.T) {
badCase := "Cn=Company, O=Company, L=City, S=State, C=Country"
assert.Equal(t, "Company", rel.nameFromCertInfo(badCase))
}

func TestIsValidMacOSCategory(t *testing.T) {
assert.True(t, isValidMacOSCategory("games"))
assert.True(t, isValidMacOSCategory("utilities"))
assert.True(t, isValidMacOSCategory("Games"))

assert.False(t, isValidMacOSCategory("sporps"))
assert.False(t, isValidMacOSCategory("android-games"))
assert.False(t, isValidMacOSCategory(""))
}
11 changes: 8 additions & 3 deletions cmd/fyne/internal/templates/bundled.go
Expand Up @@ -7,7 +7,7 @@ import "fyne.io/fyne"
var resourceInfoPlist = &fyne.StaticResource{
StaticName: "Info.plist",
StaticContent: []byte{
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, 56, 34, 63, 62, 10, 60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 112, 108, 105, 115, 116, 32, 80, 85, 66, 76, 73, 67, 32, 34, 45, 47, 47, 65, 112, 112, 108, 101, 32, 67, 111, 109, 112, 117, 116, 101, 114, 47, 47, 68, 84, 68, 32, 80, 76, 73, 83, 84, 32, 49, 46, 48, 47, 47, 69, 78, 34, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 97, 112, 112, 108, 101, 46, 99, 111, 109, 47, 68, 84, 68, 115, 47, 80, 114, 111, 112, 101, 114, 116, 121, 76, 105, 115, 116, 45, 49, 46, 48, 46, 100, 116, 100, 34, 62, 10, 60, 112, 108, 105, 115, 116, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 62, 10, 60, 100, 105, 99, 116, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 78, 97, 109, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 69, 120, 101, 99, 117, 116, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 69, 120, 101, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 65, 112, 112, 73, 68, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 99, 111, 110, 70, 105, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 105, 99, 111, 110, 46, 105, 99, 110, 115, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 104, 111, 114, 116, 86, 101, 114, 115, 105, 111, 110, 83, 116, 114, 105, 110, 103, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 86, 101, 114, 115, 105, 111, 110, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 117, 112, 112, 111, 114, 116, 101, 100, 80, 108, 97, 116, 102, 111, 114, 109, 115, 60, 47, 107, 101, 121, 62, 10, 9, 60, 97, 114, 114, 97, 121, 62, 10, 9, 9, 60, 115, 116, 114, 105, 110, 103, 62, 77, 97, 99, 79, 83, 88, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 47, 97, 114, 114, 97, 121, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 66, 117, 105, 108, 100, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 78, 83, 72, 105, 103, 104, 82, 101, 115, 111, 108, 117, 116, 105, 111, 110, 67, 97, 112, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 116, 114, 117, 101, 47, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 110, 102, 111, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 54, 46, 48, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 80, 97, 99, 107, 97, 103, 101, 84, 121, 112, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 65, 80, 80, 76, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 47, 100, 105, 99, 116, 62, 10, 60, 47, 112, 108, 105, 115, 116, 62}}
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, 56, 34, 63, 62, 10, 60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 112, 108, 105, 115, 116, 32, 80, 85, 66, 76, 73, 67, 32, 34, 45, 47, 47, 65, 112, 112, 108, 101, 32, 67, 111, 109, 112, 117, 116, 101, 114, 47, 47, 68, 84, 68, 32, 80, 76, 73, 83, 84, 32, 49, 46, 48, 47, 47, 69, 78, 34, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 97, 112, 112, 108, 101, 46, 99, 111, 109, 47, 68, 84, 68, 115, 47, 80, 114, 111, 112, 101, 114, 116, 121, 76, 105, 115, 116, 45, 49, 46, 48, 46, 100, 116, 100, 34, 62, 10, 60, 112, 108, 105, 115, 116, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 62, 10, 60, 100, 105, 99, 116, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 78, 97, 109, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 69, 120, 101, 99, 117, 116, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 69, 120, 101, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 65, 112, 112, 73, 68, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 99, 111, 110, 70, 105, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 105, 99, 111, 110, 46, 105, 99, 110, 115, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 104, 111, 114, 116, 86, 101, 114, 115, 105, 111, 110, 83, 116, 114, 105, 110, 103, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 86, 101, 114, 115, 105, 111, 110, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 117, 112, 112, 111, 114, 116, 101, 100, 80, 108, 97, 116, 102, 111, 114, 109, 115, 60, 47, 107, 101, 121, 62, 10, 9, 60, 97, 114, 114, 97, 121, 62, 10, 9, 9, 60, 115, 116, 114, 105, 110, 103, 62, 77, 97, 99, 79, 83, 88, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 47, 97, 114, 114, 97, 121, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 66, 117, 105, 108, 100, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 78, 83, 72, 105, 103, 104, 82, 101, 115, 111, 108, 117, 116, 105, 111, 110, 67, 97, 112, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 116, 114, 117, 101, 47, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 110, 102, 111, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 54, 46, 48, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 80, 97, 99, 107, 97, 103, 101, 84, 121, 112, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 65, 80, 80, 76, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 76, 83, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 67, 97, 116, 101, 103, 111, 114, 121, 84, 121, 112, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 112, 117, 98, 108, 105, 99, 46, 97, 112, 112, 45, 99, 97, 116, 101, 103, 111, 114, 121, 46, 123, 123, 46, 67, 97, 116, 101, 103, 111, 114, 121, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 76, 83, 77, 105, 110, 105, 109, 117, 109, 83, 121, 115, 116, 101, 109, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 49, 48, 46, 49, 49, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 47, 100, 105, 99, 116, 62, 10, 60, 47, 112, 108, 105, 115, 116, 62}}

var resourceMakefile = &fyne.StaticResource{
StaticName: "Makefile",
Expand All @@ -29,8 +29,13 @@ var resourceAppxmanifestXML = &fyne.StaticResource{
StaticContent: []byte{
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 117, 116, 102, 45, 56, 34, 63, 62, 10, 60, 80, 97, 99, 107, 97, 103, 101, 32, 120, 109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 97, 112, 112, 120, 47, 50, 48, 49, 48, 47, 109, 97, 110, 105, 102, 101, 115, 116, 34, 62, 10, 32, 32, 60, 73, 100, 101, 110, 116, 105, 116, 121, 32, 78, 97, 109, 101, 61, 34, 123, 123, 46, 65, 112, 112, 73, 68, 125, 125, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 101, 114, 115, 105, 111, 110, 61, 34, 123, 123, 46, 86, 101, 114, 115, 105, 111, 110, 125, 125, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 80, 117, 98, 108, 105, 115, 104, 101, 114, 61, 34, 123, 123, 46, 68, 101, 118, 101, 108, 111, 112, 101, 114, 125, 125, 34, 32, 47, 62, 10, 32, 32, 60, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 62, 10, 32, 32, 32, 32, 60, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 123, 123, 46, 78, 97, 109, 101, 125, 125, 60, 47, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 10, 32, 32, 32, 32, 60, 80, 117, 98, 108, 105, 115, 104, 101, 114, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 123, 123, 46, 68, 101, 118, 101, 108, 111, 112, 101, 114, 78, 97, 109, 101, 125, 125, 60, 47, 80, 117, 98, 108, 105, 115, 104, 101, 114, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 10, 32, 32, 32, 32, 60, 76, 111, 103, 111, 62, 73, 99, 111, 110, 46, 112, 110, 103, 60, 47, 76, 111, 103, 111, 62, 10, 32, 32, 60, 47, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 62, 10, 32, 32, 60, 80, 114, 101, 114, 101, 113, 117, 105, 115, 105, 116, 101, 115, 62, 10, 32, 32, 32, 32, 60, 79, 83, 77, 105, 110, 86, 101, 114, 115, 105, 111, 110, 62, 54, 46, 50, 60, 47, 79, 83, 77, 105, 110, 86, 101, 114, 115, 105, 111, 110, 62, 10, 32, 32, 32, 32, 60, 79, 83, 77, 97, 120, 86, 101, 114, 115, 105, 111, 110, 84, 101, 115, 116, 101, 100, 62, 49, 48, 46, 48, 60, 47, 79, 83, 77, 97, 120, 86, 101, 114, 115, 105, 111, 110, 84, 101, 115, 116, 101, 100, 62, 10, 32, 32, 60, 47, 80, 114, 101, 114, 101, 113, 117, 105, 115, 105, 116, 101, 115, 62, 10, 32, 32, 60, 82, 101, 115, 111, 117, 114, 99, 101, 115, 62, 10, 32, 32, 32, 32, 60, 82, 101, 115, 111, 117, 114, 99, 101, 32, 76, 97, 110, 103, 117, 97, 103, 101, 61, 34, 101, 110, 45, 117, 115, 34, 32, 47, 62, 10, 32, 32, 60, 47, 82, 101, 115, 111, 117, 114, 99, 101, 115, 62, 10, 10, 32, 32, 60, 33, 45, 45, 32, 84, 79, 68, 79, 32, 60, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 115, 62, 32, 45, 45, 62, 10, 60, 47, 80, 97, 99, 107, 97, 103, 101, 62}}

var resourceEntitlementsPlist = &fyne.StaticResource{
StaticName: "entitlements.plist",
var resourceEntitlementsDarwinPlist = &fyne.StaticResource{
StaticName: "entitlements-darwin.plist",
StaticContent: []byte{
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, 56, 34, 63, 62, 10, 60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 112, 108, 105, 115, 116, 32, 80, 85, 66, 76, 73, 67, 32, 34, 45, 47, 47, 65, 112, 112, 108, 101, 47, 47, 68, 84, 68, 32, 80, 76, 73, 83, 84, 32, 49, 46, 48, 47, 47, 69, 78, 34, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 97, 112, 112, 108, 101, 46, 99, 111, 109, 47, 68, 84, 68, 115, 47, 80, 114, 111, 112, 101, 114, 116, 121, 76, 105, 115, 116, 45, 49, 46, 48, 46, 100, 116, 100, 34, 62, 10, 60, 112, 108, 105, 115, 116, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 62, 10, 60, 100, 105, 99, 116, 62, 10, 32, 32, 32, 32, 60, 107, 101, 121, 62, 99, 111, 109, 46, 97, 112, 112, 108, 101, 46, 115, 101, 99, 117, 114, 105, 116, 121, 46, 97, 112, 112, 45, 115, 97, 110, 100, 98, 111, 120, 60, 47, 107, 101, 121, 62, 10, 32, 32, 32, 32, 60, 116, 114, 117, 101, 47, 62, 10, 60, 47, 100, 105, 99, 116, 62, 10, 60, 47, 112, 108, 105, 115, 116, 62}}

var resourceEntitlementsIosPlist = &fyne.StaticResource{
StaticName: "entitlements-ios.plist",
StaticContent: []byte{
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, 56, 34, 63, 62, 10, 60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 112, 108, 105, 115, 116, 32, 80, 85, 66, 76, 73, 67, 32, 34, 45, 47, 47, 65, 112, 112, 108, 101, 47, 47, 68, 84, 68, 32, 80, 76, 73, 83, 84, 32, 49, 46, 48, 47, 47, 69, 78, 34, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 97, 112, 112, 108, 101, 46, 99, 111, 109, 47, 68, 84, 68, 115, 47, 80, 114, 111, 112, 101, 114, 116, 121, 76, 105, 115, 116, 45, 49, 46, 48, 46, 100, 116, 100, 34, 62, 10, 60, 112, 108, 105, 115, 116, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 62, 10, 60, 100, 105, 99, 116, 62, 10, 32, 32, 32, 32, 60, 107, 101, 121, 62, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 45, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 60, 47, 107, 101, 121, 62, 10, 32, 32, 32, 32, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 84, 101, 97, 109, 73, 68, 125, 125, 46, 123, 123, 46, 65, 112, 112, 73, 68, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 47, 100, 105, 99, 116, 62, 10, 60, 47, 112, 108, 105, 115, 116, 62}}

Expand Down
4 changes: 4 additions & 0 deletions cmd/fyne/internal/templates/data/Info.plist
Expand Up @@ -24,5 +24,9 @@
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.{{.Category}}</string>
<key>LSMinimumSystemVersion</key>
<string>10.11</string>
</dict>
</plist>
8 changes: 8 additions & 0 deletions cmd/fyne/internal/templates/data/entitlements-darwin.plist
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>

0 comments on commit 9796835

Please sign in to comment.