Skip to content

Commit 45c150b

Browse files
committed
gogio: [android] make singleInstance if schemes in use
Signed-off-by: inkeliz <[email protected]>
1 parent 3e8335e commit 45c150b

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

gogio/androidbuild.go

+1
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
463463
android:theme="@style/Theme.GioApp"
464464
android:configChanges="screenSize|screenLayout|smallestScreenSize|orientation|keyboardHidden"
465465
android:windowSoftInputMode="adjustResize"
466+
android:launchMode= "singleInstance"
466467
android:exported="true">
467468
<intent-filter>
468469
<action android:name="android.intent.action.MAIN" />

gogio/help.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ for details. If not provided, the password will be prompted.
7878
The -notaryteamid flag specifies the team ID to use for notarization of MacOS app, ignored if
7979
-notaryid is not provided.
8080
81-
The -schemes flag specifies a list of comma separated URI schemes, which the program can
82-
handle. For example, use -schemes yourAppName to get transfer.URLEvent when access URI
81+
The -schemes flag specifies a list of comma separated URI schemes that the program can
82+
handle. For example, use -schemes yourAppName to receive a transfer.URLEvent for URIs
8383
starting with yourAppName://. It is only supported on Android, iOS, macOS and Windows.
8484
On Windows, it will restrict the program to a single instance.
8585
`

gogio/iosbuild.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,12 @@ func buildInfoPlist(bi *buildInfo) (string, error) {
400400
</dict>
401401
</plist>`)
402402
if err != nil {
403-
return "", err
403+
panic(err)
404404
}
405405

406406
var manifestBuffer bytes.Buffer
407407
if err := tmpl.Execute(&manifestBuffer, manifestSrc); err != nil {
408-
return "", err
408+
panic(err)
409409
}
410410

411411
return manifestBuffer.String(), nil

gogio/macosbuild.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ func (b *macBuilder) setInfo(buildInfo *buildInfo, name string) error {
168168
</dict>
169169
</plist>`)
170170
if err != nil {
171-
return err
171+
panic(err)
172172
}
173173

174174
var manifest bytes.Buffer
175175
if err := t.Execute(&manifest, manifestSrc); err != nil {
176-
return err
176+
panic(err)
177177
}
178178
b.Manifest = manifest.Bytes()
179179

0 commit comments

Comments
 (0)