It does change things. description length:88662 ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "bios.app" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and armv7(machine code) and armv7(machine code) and armv7(machine code) and armv7(machine code) and arm64(machine code) and arm64(machine code) and arm64(machine code) and arm64(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(machine code) and armv7(machine code) and armv7(machine code) and armv7(machine code) and armv7(machine code) and arm64(machine code) and arm64(machine code) and arm64(machine code) and arm64(machine code) and arm64(machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting." ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'bios.app/bios' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure." ERROR ITMS-90503: "Invalid Bundle. Apps that have 'arm64' in the list of UIRequiredDeviceCapabilities in Info.plist must only contain the arm64 slice." ERROR ITMS-90124: "The binary is invalid. The executable type "OBJECT" is not valid. Only "EXECUTE" is permitted." ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker." ERROR ITMS-90210: "Missing load commands. The executable at 'bios.app' does not have the necessary load commands. Try rebuilding the app with the latest Xcode version. If you are using third party development tools, contact the provider." ERROR ITMS-90700: "Incorrect Platform. You included armv7 executable “bios.app/bios” in your iOS bundle. Only iOS executables can be included." ERROR ITMS-90700: "Incorrect Platform. You included arm64 executable “bios.app/bios” in your iOS bundle. Only iOS executables can be included."
On Monday, October 23, 2017 at 11:40:17 AM UTC-4, Elias Naur wrote: > > Great, thank you! I know very little about gomobile build, but I noticed > that gomobile bind uses the -buildmode=c-archive flag to go build while > gomobile build doesn't. Does the following (completely untested) patch make > any difference: > > diff --git a/cmd/gomobile/build_iosapp.go b/cmd/gomobile/build_iosapp.go > index 0b2a923..cf8da09 100644 > --- a/cmd/gomobile/build_iosapp.go > +++ b/cmd/gomobile/build_iosapp.go > @@ -63,7 +63,7 @@ func goIOSBuild(pkg *build.Package) (map[string]bool, > error) { > ctx.BuildTags = append(ctx.BuildTags, "ios") > > armPath := filepath.Join(tmpdir, "arm") > - if err := goBuild(src, darwinArmEnv, "-o="+armPath); err != nil { > + if err := goBuild(src, darwinArmEnv, "-buildmode=c-archive", > "-o="+armPath); err != nil { > return nil, err > } > nmpkgs, err := extractPkgs(darwinArmNM, armPath) > @@ -72,7 +72,7 @@ func goIOSBuild(pkg *build.Package) (map[string]bool, > error) { > } > > arm64Path := filepath.Join(tmpdir, "arm64") > - if err := goBuild(src, darwinArm64Env, "-o="+arm64Path); err != > nil { > + if err := goBuild(src, darwinArm64Env, "-buildmode=c-archive", > "-o="+arm64Path); err != nil { > return nil, err > } > > ? > > - elias > > On Mon, Oct 23, 2017 at 5:28 PM <pru...@gmail.com <javascript:>> wrote: > >> Ok thank you!. Bind does validate after setting ENABLE_BITCODE to NO in >> the build settings. >> >> >> On Monday, October 23, 2017 at 11:03:51 AM UTC-4, Elias Naur wrote: >> >>> To successfully build the bind example you need to disable bitcode (and >>> import the framework as you did). Sorry. >>> >>> - elias >>> >>> Den man. 23. okt. 2017 17.00 skrev <pru...@gmail.com>: >>> >> Trying bind this time. >>>> Not able to build in Xcode with bind example. Xcode can't find the >>>> Hello module when following the instructions. Dropping the hello.framework >>>> into the ios folder seems to help but leads to the following linker error: >>>> >>>> ld: '/Users/rust/code/src/ >>>> golang.org/x/mobile/example/bind/ios/Hello.framework/Hello(000002.o)' >>>> does not contain bitcode. You must rebuild it with bitcode enabled (Xcode >>>> setting ENABLE_BITCODE), obtain an updated library from the vendor, or >>>> disable bitcode for this target. for architecture arm64 >>>> >>>> clang: error: linker command failed with exit code 1 (use -v to see >>>> invocation) >>>> >>>> Do the bind instructions from https://github.com/golang/go/wiki/Mobile >>>> work >>>> for you in Xcode 9? I accepted all Xcode fixes. Is it better to not do >>>> this? >>>> >>>> On Monday, October 23, 2017 at 10:27:24 AM UTC-4, Elias Naur wrote: >>>> >>>>> >>>>> >>>>> On Mon, Oct 23, 2017 at 2:09 PM <pru...@gmail.com> wrote: >>>>> >>>>>> I reproduced the problem using the gomobile bind example with the >>>>>> following code changes. >>>>>> >>>>>> diff --git a/cmd/gomobile/build_iosapp.go >>>>>> b/cmd/gomobile/build_iosapp.go >>>>>> >>>>>> index 0b2a923..8480790 100644 >>>>>> >>>>>> --- a/cmd/gomobile/build_iosapp.go >>>>>> >>>>>> +++ b/cmd/gomobile/build_iosapp.go >>>>>> >>>>>> @@ -31,7 +31,7 @@ func goIOSBuild(pkg *build.Package) >>>>>> (map[string]bool, error) { >>>>>> >>>>>> infoplist := new(bytes.Buffer) >>>>>> >>>>>> if err := infoplistTmpl.Execute(infoplist, infoplistTmplData{ >>>>>> >>>>>> // TODO: better bundle id. >>>>>> >>>>>> - BundleID: "org.golang.todo." + productName, >>>>>> >>>>>> + BundleID: "com.galvanizedlogic.bios", >>>>>> >>>>>> Name: strings.Title(path.Base(pkg.ImportPath)), >>>>>> >>>>>> }); err != nil { >>>>>> >>>>>> return nil, err >>>>>> >>>>>> @@ -97,7 +97,7 @@ func goIOSBuild(pkg *build.Package) >>>>>> (map[string]bool, error) { >>>>>> >>>>>> // Build and move the release build to the output directory. >>>>>> >>>>>> cmd = exec.Command( >>>>>> >>>>>> "xcrun", "xcodebuild", >>>>>> >>>>>> - "-configuration", "Release", >>>>>> >>>>>> + "-configuration", "Release", >>>>>> "-allowProvisioningUpdates", >>>>>> >>>>>> "-project", tmpdir+"/main.xcodeproj", >>>>>> >>>>>> ) >>>>>> >>>>>> if err := runCmd(cmd); err != nil { >>>>>> >>>>>> @@ -312,12 +312,14 @@ const projPbxproj = `// !$*UTF8*$! >>>>>> >>>>>> ORGANIZATIONNAME = Developer; >>>>>> >>>>>> TargetAttributes = { >>>>>> >>>>>> 254BB83D1B1FD08900C56DE9 = { >>>>>> >>>>>> - CreatedOnToolsVersion = 6.3.1; >>>>>> >>>>>> + CreatedOnToolsVersion = 9.0; >>>>>> >>>>>> + DevelopmentTeam = 9829M3WGFP; >>>>>> >>>>>> + ProvisioningStyle = Automatic; >>>>>> >>>>>> }; >>>>>> >>>>>> }; >>>>>> >>>>>> }; >>>>>> >>>>>> buildConfigurationList = 254BB8391B1FD08900C56DE9 /* Build >>>>>> configuration list for PBXProject "main" */; >>>>>> >>>>>> - compatibilityVersion = "Xcode 3.2"; >>>>>> >>>>>> + compatibilityVersion = "Xcode 8.0"; >>>>>> >>>>>> developmentRegion = English; >>>>>> >>>>>> hasScannedForEncodings = 0; >>>>>> >>>>>> knownRegions = ( >>>>>> >>>>>> Then repackaged bios.app and bios.ipa using the binary from the >>>>>> gomobile basic.app (avoids a bunch of invalid or missing icon errors). >>>>>> Validated that the app runs on an iphone 7. The upload ipa resulted in >>>>>> the >>>>>> following errors: >>>>>> >>>>>> >>>>>> The "Invalid Bundle" is because gomobile builds a binary with both 32 >>>>>> and 64 bit executables. >>>>>> I can't explain the PIE error. I did not get this error in the bios >>>>>> build even though I saw the "-nopie" when looking at a previous bios >>>>>> linker >>>>>> debug output. >>>>>> >>>>>> >>>>> >>>>> This seems like the "gomobile build" mode, not gomobile bind. There is >>>>> a difference: build is for apps in 100% Go, while bind are for apps where >>>>> a >>>>> part is in Go. With gomobile bind, the Go part is built as a c-archive >>>>> library and packaged in a framework. I know that you're interested in the >>>>> gomobile build mode, but knowing whether gomobile bind apps have the same >>>>> validation errors might help to debug the problem. >>>>> >>>>> - elias >>>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "golang-nuts" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/golang-nuts/DaCOnoSWvBw/unsubscribe. >>>> >>> To unsubscribe from this group and all its topics, send an email to >>>> golang-nuts...@googlegroups.com. >>> >>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "golang-nuts" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/golang-nuts/DaCOnoSWvBw/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.