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

Apps cannot launch in iOS simulator #1917

Closed
andydotxyz opened this issue Feb 7, 2021 · 13 comments
Closed

Apps cannot launch in iOS simulator #1917

andydotxyz opened this issue Feb 7, 2021 · 13 comments
Assignees
Labels
bug Something isn't working Driver:mobile Issues relating to the mobile driver specifically Hacktoberfest help wanted Extra attention is needed OS:iOS Tickets affecting only iOS devices OS:macOS Tickets affecting only macOS

Comments

@andydotxyz
Copy link
Member

It seems to relate to invalid codesign signature

@andydotxyz andydotxyz added the bug Something isn't working label Feb 7, 2021
@andydotxyz andydotxyz added OS:iOS Tickets affecting only iOS devices OS:macOS Tickets affecting only macOS labels Apr 23, 2021
@andydotxyz andydotxyz self-assigned this Apr 23, 2021
@andydotxyz andydotxyz added the help wanted Extra attention is needed label Apr 23, 2021
@changkun
Copy link
Member

I don't have the problem when I am using darwin/amd64, but the app indeed cannot launch in the iOS simulator when using darwin/arm64. Hence I assume the issue is targeting M1 macs?

Screen Shot 2021-09-21 at 9 11 07 AM

@andydotxyz
Copy link
Member Author

I have this problem in darwin/amd64 as well - what steps did you follow to get it working? (maybe I have some broken cert?)

@changkun
Copy link
Member

I have this problem in darwin/amd64 as well - what steps did you follow to get it working? (maybe I have some broken cert?)

What's the expected procedure to access the Xcode project? or what's the current procedure to run apps in iOS simulator?

I can run on darwin/amd64 via:

  1. Turn on -x and -work build tag in the cmd/fyne/internal/mobile/build.go
  2. fyne package -os ios
  3. Open the temp folder for building the Xcode project, then run it on a simulator.

It might be a problem with the cert, some suggests to turn cert to a always trust, but I don't see myself need their suggested steps: https://developer.apple.com/forums/thread/106711

@andydotxyz
Copy link
Member Author

andydotxyz commented Sep 21, 2021

I get signature not valid: -67050. Did you certainly build without an -profile parameter?
When I execute the package command you issued I see

 No profiles for 'io.fyne.demo' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'io.fyne.demo'. (in target 'main' from project 'main')

And if I specify the profile but not certificate I get:

error: An empty identity is not valid when signing a binary for the product type 'Application'. (in target 'main' from project 'main')

@changkun
Copy link
Member

This is my build process:

iossimulator.mp4

@andydotxyz
Copy link
Member Author

Oh I see - running the temporary folder is the key here.
I guess we need a better process overall - what I would like is if the build asset can be dragged onto the simulator to run.
Is that what #2495 fixes?

@changkun
Copy link
Member

I see the issue. I also pushed a new commit in #2495, which should solve the issue for me. Does the latest #2495 solve the problem for you?

@changkun
Copy link
Member

I guess we need a better process overall

I just noticed there is a install subcommand in the fyne command, is that an expected official approach to deploy to a target system?

How about adding a target iossimulator to the install command, too?

fyne install -target ios demo.app          # install to a physical device
fyne install -target iossimulator demo.app # install to the simulator

@andydotxyz
Copy link
Member Author

I just noticed there is a install subcommand in the fyne command, is that an expected official approach to deploy to a target system?

Yes :)

Adding that for simulator builds would be ideal - do you have ideas about how we could make that happen?

@changkun
Copy link
Member

I just pushed a new commit in #2495

This is how it works in a video:

deploy.mp4

Does this match what we want to do here?

@andydotxyz
Copy link
Member Author

Does this match what we want to do here?

Slick, that looks exactly like the trick :)

@changkun changkun added the Driver:mobile Issues relating to the mobile driver specifically label Dec 3, 2021
@andydotxyz andydotxyz assigned changkun and unassigned andydotxyz Dec 7, 2021
@changkun
Copy link
Member

changkun commented Dec 7, 2021

Close because #2495 is merged in develop

@andydotxyz
Copy link
Member Author

(fixed the milestone as this solution adds a build option so isn't in the bugfix release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Driver:mobile Issues relating to the mobile driver specifically Hacktoberfest help wanted Extra attention is needed OS:iOS Tickets affecting only iOS devices OS:macOS Tickets affecting only macOS
Projects
None yet
Development

No branches or pull requests

2 participants