diff --git a/cmd/gomobile/build.go b/cmd/gomobile/build.go index 8737210..6f5c7a4 100644 --- a/cmd/gomobile/build.go +++ b/cmd/gomobile/build.go @@ -50,8 +50,8 @@ are copied into the output. Flag -iosversion sets the minimal version of the iOS SDK to compile against. The default version is 6.1. -The -bundleid flag is for -target ios only and sets the bundle ID to use -with the app; defaults to "org.golang.todo". +The -bundleid flag is required for -target ios and sets the bundle ID to use +with the app. The -o flag specifies the output file name. If not specified, the output file name depends on the package built. @@ -134,6 +134,9 @@ func runBuild(cmd *command) (err error) { } return nil } + if buildBundleID == "" { + return fmt.Errorf("-target=ios requires -bundleid set") + } nmpkgs, err = goIOSBuild(pkg, buildBundleID, targetArchs) if err != nil { return err @@ -240,7 +243,7 @@ func addBuildFlags(cmd *command) { cmd.flag.StringVar(&buildGcflags, "gcflags", "", "") cmd.flag.StringVar(&buildLdflags, "ldflags", "", "") cmd.flag.StringVar(&buildTarget, "target", "android", "") - cmd.flag.StringVar(&buildBundleID, "bundleid", "org.golang.todo", "") + cmd.flag.StringVar(&buildBundleID, "bundleid", "", "") cmd.flag.StringVar(&buildIOSVersion, "iosversion", "6.1", "") cmd.flag.BoolVar(&buildA, "a", false, "") diff --git a/cmd/gomobile/doc.go b/cmd/gomobile/doc.go index 059e4d8..7bcbc27 100644 --- a/cmd/gomobile/doc.go +++ b/cmd/gomobile/doc.go @@ -106,8 +106,8 @@ are copied into the output. Flag -iosversion sets the minimal version of the iOS SDK to compile against. The default version is 6.1. -The -bundleid flag is for -target ios only and sets the bundle ID to use -with the app; defaults to "org.golang.todo". +The -bundleid flag is required for -target ios and sets the bundle ID to use +with the app. The -o flag specifies the output file name. If not specified, the output file name depends on the package built.