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

Documentation is unclear that physical iOS devices aren't yet supported #1190

Open
boxed opened this issue Apr 16, 2023 · 7 comments
Open

Documentation is unclear that physical iOS devices aren't yet supported #1190

boxed opened this issue Apr 16, 2023 · 7 comments
Labels
documentation An improvement required in the project's documentation. good first issue Is this your first time contributing? This could be a good place to start! iOS The issue relates to Apple iOS mobile support.

Comments

@boxed
Copy link

boxed commented Apr 16, 2023

Describe the bug

I failed to test my app in the simulator (see #1189) so I tried running on device. I failed with this too and noticed the docs are... a bit weird.

Steps to reproduce

Ran briefcase run iOS -u -r -d <my UDID as copy pasted from XCodes devices list>
Get the error message Invalid device device name '<UDID>'

Expected behavior

App installed and started on phone.

Screenshots

No response

Environment

  • Operating System: macOS Ventura 13.2.1
  • Python version: 3.9
  • Software versions:
    • Briefcase: 13.2.1
    • Toga: latest

Logs

No response

Additional context

I read through the code and it does look rather suspicious. It looks like it validates the device IDs against a list it gets from a function call get_simulators. But I'm not trying to run on a simulator, I'm trying to run on a real device...

The docs at https://docs.beeware.org/en/latest/tutorial/tutorial-5/iOS.html are rather weird about this. They show how to get something running on a simulator, but then at the end say "We’ve now got an application on our phone!". Which isn't what the commands above is doing or the text above talks about.

When I run just briefcase run iOS it shows a menu asking which simulator... but I don't want a simulator. I want the real phone.

@boxed boxed added the bug A crash or error in behavior. label Apr 16, 2023
@rmartin16 rmartin16 added the iOS The issue relates to Apple iOS mobile support. label Apr 16, 2023
@rmartin16
Copy link
Member

Crosslinking; may still be room for doc improvements, though:

@boxed
Copy link
Author

boxed commented Apr 16, 2023

Ah. Yea ok. Didn't find that when searching. Yea, the docs should definitely change! As of now they lie, and don't mention this workaround which is what you actually need.

@boxed
Copy link
Author

boxed commented Apr 16, 2023

Although. Now that I've tried to open xcode with briefcase open iOS and run that I see another problem:

from . import _bcrypt # noqa: I100
ImportError: dlopen(/private/var/containers/Bundle/Application/E0914435-ABEE-415F-B9AE-0F4AB42E3162/RebootShow.app/app_packages/bcrypt/_bcrypt.abi3.so, 0x0002): tried: '/usr/lib/system/introspection/_bcrypt.abi3.so' (no such file, not in dyld cache), '/private/var/containers/Bundle/Application/E0914435-ABEE-415F-B9AE-0F4AB42E3162/RebootShow.app/app_packages/bcrypt/_bcrypt.abi3.so' (mach-o file (/private/var/containers/Bundle/Application/E0914435-ABEE-415F-B9AE-0F4AB42E3162/RebootShow.app/app_packages/bcrypt/_bcrypt.abi3.so), but incompatible platform (have 'macOS', need 'iOS')), '/private/preboot/Cryptexes/OS/private/var/containers/Bundle/Application/E0914435-ABEE-415F-B9AE-0F4AB42E3162/RebootShow.app/app_packages/bcrypt/_bcrypt.abi3.so' (no such file), '/private/var/containers/Bundle/Application/E0914435-ABEE-415F-B9AE-0F4AB42E3162/RebootShow.app/app_packages/bcrypt/_bcrypt.abi3.so' (mach-o file (/private/var/containers/Bundle/Application/E0914435-ABEE-415F-B9AE-0F4AB42E3162/RebootShow.app/app_packages/bcrypt/_bcrypt.abi3.so), but incompatible platform (have 'macOS', need 'iOS'))

at least it finds the so file! :P

@freakboy3742 freakboy3742 added documentation An improvement required in the project's documentation. good first issue Is this your first time contributing? This could be a good place to start! and removed bug A crash or error in behavior. labels Apr 16, 2023
@boxed
Copy link
Author

boxed commented Apr 17, 2023

After debugging help for #1189, I got that to work by rm -rf build/ and now after that the error in xcode is:

[...] but incompatible platform (have 'iOS-sim', need 'iOS'))

There's clearly something fishy about the build folder! That the xcode project is IN the build folder seems less than ideal if I have to nuke it periodically. Maybe there should be build/iOS/simulator/, build/iOS/device/, etc?

Anyway, I tried nuking build/ again, and only ever building for the real phone, but no dice. Same error as above. Still... seems like there's a clue here somewhere...

@sathishchinniah
Copy link

@boxed I am also facing same issue. My custom framework is working fine in simulator. But not working in real device.

Below is my error. Any workaround or fixes you had for your issue ?

dyld[541]: Library not loaded: @rpath/CustomFramework.framework/CustomFramework
  Referenced from: <E072FE8A-611F-30AB-A6ED-186777B4B0F1> /private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/App
  Reason: tried: '/usr/lib/swift/CustomFramework.framework/CustomFramework' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CustomFramework.framework/CustomFramework' (no such file), '/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework' (mach-o file (/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework), but incompatible platform (have 'iOS-sim', need 'iOS')), '/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework' (mach-o file (/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework), but incompatible platform (have 'iOS-sim', need 'iOS')), '/usr/lib/swift/CustomFramework.framework/CustomFramework' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CustomFramework.framework/CustomFramework' (no such file), '/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework' (mach-o file (/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework), but incompatible platform (have 'iOS-sim', need 'iOS')), '/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework' (mach-o file (/private/var/containers/Bundle/Application/8B615D3F-B911-41DB-A630-F74C7737DAC4/App.app/Frameworks/CustomFramework.framework/CustomFramework), but incompatible platform (have 'iOS-sim', need 'iOS'))

@mhsmith mhsmith changed the title Problem running on device (maybe a documentation issue?) Documentation is unclear that physical iOS devices aren't yet supported Jan 28, 2024
@mhsmith
Copy link
Member

mhsmith commented Jan 28, 2024

Briefcase does not yet support running apps on a physical iOS device. There's a workaround in #860, but if you want to add custom frameworks then that's probably out of Briefcase's scope, and you should seek help in a more general iOS forum.

Let's keep this issue focused on improving the documentation.

@freakboy3742
Copy link
Member

We need to be clear that there's 2 issues being discussed here.

The first is starting apps on iOS devices from the Briefcase command line. This is a gap in documentation.

The second is adding external frameworks to your iOS app. I'd argue it is in scope for Briefcase - it's the manifestation of #485 on iOS/macOS, which is being addressed on Android by #1610 - but it is completely distinct from the subject of this ticket (launching on iOS devices).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An improvement required in the project's documentation. good first issue Is this your first time contributing? This could be a good place to start! iOS The issue relates to Apple iOS mobile support.
Projects
None yet
Development

No branches or pull requests

5 participants