-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gogio: add deeplink support #9
Open
inkeliz
wants to merge
12
commits into
gioui:main
Choose a base branch
from
inkeliz:add-deeplink
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
41944b6
gogio: add deeplink support [WIP]
inkeliz 0d5ad97
gogio: [iOS/macOS] add deeplink plist
inkeliz f94a502
gogio: [iOS/Windows] add deeplink support
inkeliz 4884def
gogio: [windows] rename ldflag variable name
inkeliz f4d53a2
gogio: rename deeplink to schemes
inkeliz b2271c8
gogio: change flag description
inkeliz 5710d99
gogio: rename scheme to schemes
inkeliz 4ce1804
gogio: fix go.mod/go.sum and rebase
inkeliz b489bb7
gogio: [windows] add appID
inkeliz f1c443a
[gogio] add AppID -X flags
inkeliz 3e8335e
gogio: fix darwin builds with custom schemes
inkeliz 45c150b
gogio: [android] make singleInstance if schemes in use
inkeliz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package main | ||
|
||
import ( | ||
"bytes" | ||
"errors" | ||
"fmt" | ||
"os" | ||
|
@@ -124,6 +125,19 @@ func (b *macBuilder) setIcon(path string) (err error) { | |
} | ||
|
||
func (b *macBuilder) setInfo(buildInfo *buildInfo, name string) error { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. |
||
|
||
manifestSrc := struct { | ||
Name string | ||
Bundle string | ||
Version Semver | ||
Schemes []string | ||
}{ | ||
Name: name, | ||
Bundle: buildInfo.appID, | ||
Version: buildInfo.version, | ||
Schemes: buildInfo.schemes, | ||
} | ||
|
||
t, err := template.New("manifest").Parse(`<?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"> | ||
|
@@ -138,20 +152,28 @@ func (b *macBuilder) setInfo(buildInfo *buildInfo, name string) error { | |
<true/> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
{{if .Schemes}} | ||
<key>CFBundleURLTypes</key> | ||
<array> | ||
{{range .Schemes}} | ||
<dict> | ||
<key>CFBundleURLSchemes</key> | ||
<array> | ||
<string>{{.}}</string> | ||
</array> | ||
</dict> | ||
{{end}} | ||
</array> | ||
{{end}} | ||
</dict> | ||
</plist>`) | ||
if err != nil { | ||
return err | ||
panic(err) | ||
} | ||
|
||
var manifest bufferCoff | ||
if err := t.Execute(&manifest, struct { | ||
Name, Bundle string | ||
}{ | ||
Name: name, | ||
Bundle: buildInfo.appID, | ||
}); err != nil { | ||
return err | ||
var manifest bytes.Buffer | ||
if err := t.Execute(&manifest, manifestSrc); err != nil { | ||
panic(err) | ||
} | ||
b.Manifest = manifest.Bytes() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this function can return a non-nil error anymore.