~eliasnaur/gio

Re: Any example use in swift project

Cloud
Details
Message ID
<CAMAftoV9xiZZNA_qsrp8-S2KV+hCtgVEUsOg7bKcavCrUfwRBA@mail.gmail.com>
DKIM signature
missing
Download raw message
crash only happens in buildmode archive.

here is a project on gitlab.com/txthinking/gio

On Tue, Jun 23, 2020 at 4:23 PM Elias Naur <mail@eliasnaur.com> wrote:
>
> On Tue Jun 23, 2020 at 11:53, Cloud wrote:
> > On Mon, Jun 22, 2020 at 11:19 PM Elias Naur <mail@eliasnaur.com> wrote:
> > >
> > > On Tue Jun 23, 2020 at 12:40 AM CEST, Cloud wrote:
> > > > On Mon, Jun 22, 2020 at 10:23 PM Elias Naur <mail@eliasnaur.com> wrote:
> > > > >
> > > > > On Mon Jun 22, 2020 at 22:11, Cloud wrote:
> > > > > > I have tried both objc and swift. both failed.
> > > > > > Let me show steps I did:
> > > > > >
> > > > > > env:
> > > > > > macOS: 10.15.5
> > > > > > XCode: 11.5
> > > > > > go version: go1.14.4 darwin/amd64
> > > > > > gomobile version +4c31acb Sun Mar 29 12:56:38 2020 +0000 (android,ios);
> > > > > >
> > > > > > before:
> > > > > > I have already built a simple gui app with gio.
> > > > > >
> > > > > > objc steps:
> > > > > >
> > > > > > 1. open xcode
> > > > > > 2. create ios single view app project with object c
> > > > > > 3. add Gioui.framework file into targets, and select do not embed, and
> > > > > > disable bitcode
> > > > > > 4. replace ALL content of main.m with:
> > > > > >
> > > > > > @import UIKit;
> > > > > > @import Gioui;
> > > > > > int main(int argc, char * argv[]) {
> > > > > >     @autoreleasepool {
> > > > > >         return UIApplicationMain(argc, argv, nil,
> > > > > > NSStringFromClass([GioAppDelegate class]));
> > > > > >     }
> > > > > > }
> > > > > >
> > > > > > 5. build and run on device. got error: Thread 1: EXC_BAD_ACCESS
> > > > > > (code=1, address=0x0)
> > > > > >
> > > > > > swift steps:
> > > > > >
> > > > > > 1. open xcode
> > > > > > 2. create ios single view app project with swift
> > > > > > 3. add Gioui.framework file into targets, and select do not embed, and
> > > > > > disable bitcode
> > > > > > 4. replace ALL content of AppDelegate.swift with:
> > > > > >
> > > > > > import UIKit
> > > > > > import Gioui
> > > > > >
> > > > > > @UIApplicationMain
> > > > > > class AppDelegate: GioAppDelegate {
> > > > > >     override func application(_ application: UIApplication,
> > > > > > didFinishLaunchingWithOptions launchOptions:
> > > > > > [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
> > > > > >         return super.application(application,
> > > > > > didFinishLaunchingWithOptions: launchOptions);
> > > > > >     }
> > > > > > }
> > > > > >
> > > > > > 5. build and run on device. got error: Thread 1: EXC_BAD_ACCESS
> > > > > > (code=1, address=0x0)
> > > > > >
> > > > > > I know the error information is less, if needed, tell me and I will
> > > > > > create a full minimal repo.
> > > > > >
> > > > > - Does your program work on the emulator?
> > > > error same as on device
> > > >
> > > > > - What is stack trace of the crash?
> > > >
> > > > UIKitCore`UIApplicationMain:
> > >
> > > I don't see any clues in that trace, sorry. If you can, please send a minimal
> > > reproduction program and steps to reproduce the crash. It's quite
> > > possible buildmode archive is simply broken. I don't know anyone using
> > > it.
> >
> > gioui.org/example/gophers
> >
> > And I think this is about xcode/macos/golang version?
> >
>
> In buildmode archive or buildmode exe? If the crash only happens in buildmode archive,
> please provide an Xcode project that demonstrates it.
>
> -- elias
Export thread (mbox)