Skip to content
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

meta.Version is always 1.0.0 on android #3109

Closed
bon-ami opened this issue Jun 30, 2022 · 5 comments
Closed

meta.Version is always 1.0.0 on android #3109

bon-ami opened this issue Jun 30, 2022 · 5 comments
Labels
information-needed Further information is requested

Comments

@bon-ami
Copy link

bon-ami commented Jun 30, 2022

Describe the bug:

I fail to get appVersion on Android by code. But the same code works on Windows.
The version in detail info of my app, such as in Settings, shows the version correctly.

To Reproduce:

fyne package -os android -appVersion 1.1.1 with FyneApp.toml setting other info, such as Build.

Screenshots:

Refer to my screenshot for my sample project

Example code:

	myApp := app.NewWithID("a")
	myWin := myApp.NewWindow("a")
	meta := myApp.Metadata()  // it's always 1.0.0
	but1 := widget.NewButton("StrFlw", nil)
	but2 := widget.NewButton("StrFlw", nil)
	tabs := container.NewAppTabs(
		container.NewTabItem(meta.Version, container.NewVBox(but1)),  // show it as tab name
		container.NewTabItem("2", container.NewVBox(but2)),
		//container.NewTabItem("3", makeControlsCfg(myWin)),
	)
	myWin.ShowAndRun(tabs)
//	myApp.Run()

Device (please complete the following information):

  • OS: Android app built on Windows 10
  • Version: Android 9
  • Go version: 1.18
  • Fyne version: 2.2.1
@bon-ami bon-ami added the unverified A bug that has been reported but not verified label Jun 30, 2022
@andydotxyz
Copy link
Member

Can you try v2.2.2 please? Does the version become always 0.0.1?

@andydotxyz andydotxyz added information-needed Further information is requested and removed unverified A bug that has been reported but not verified labels Jun 30, 2022
@bon-ami
Copy link
Author

bon-ami commented Jul 5, 2022

@andydotxyz , yes. Fyne 2.2.2 makes the version 0.0.1 regardless of what I set it to.

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jul 6, 2022
This had been missed as it's a different compile path
Fixes fyne-io#3109
@andydotxyz
Copy link
Member

That PR should have the fix in if you'd like to test.
Install the fyne executable from that code should fix the metadata injection for mobile builds.

@andydotxyz
Copy link
Member

This is landed and will be in v2.2.3

@andydotxyz andydotxyz added this to the Fixes (v2.2.x) milestone Jul 6, 2022
@bon-ami
Copy link
Author

bon-ami commented Jul 11, 2022

confirmed to be solved on 2.2.3. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information-needed Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants