Expo features Preview: expo dev client "QR CODE DETECTED No usable data found"

Hello guys, since my last build, I worked on the ios simulator so today I try to test it on my iPhone. I run ‘expo start - - dev-client’, I have this problem.

Hi @theo20

Just a guess: Did you install the dev client on your phone before scanning the QR code?

Yes I installed expo fresh app by running
‘expo init’ ,
‘npm install expo-dev-client’,
‘expo run:ios’

I’ll try to reinstall the expo-dev-client

Still get this issue. I reinstall the whole app but same problem. It runs well on simulator but not on real device, the scan doesn’t show anything.

hmmm… not sure why that would be. As a workaround, can you login to the dev client on the device? Then the project you’re running expo start --dev-client in should show up under RECENTLY IN DEVELOPMENT.

Expo go doesn’t launch the app (expo start - - dev-client) after scanning the QR code

OK, but if you run the dev client instead of Expo Go, does scanning the QR code with the iPhone’s camera work? Or else, if you log in to the dev client and expo-cli, do you see the project listed in the dev client?

No, I don’t see it. I don’t understand the issue. When I run simple expo project (expo start) expo go launch the app successfully but if I install fresh expo app with custom client development the QR code doesn’t work. The custom client only work on my android and ios emulator but not on physical devices because of the QR code issue

1 Like

@theo20 I think I’m confused here- you have your custom development client installed on your physical device, then run expo start --dev-client, and scan the QR code with the QR code scanner inside of your custom dev client on android, and it doesn’t open the project?

I have the custom client development installed on simulator not on the physical device. I run expo start - - dev-client and scan the QR code with expo go app, expo go app doesn’t launch the app

@theo20 You need to have the custom dev client installed on the physical device if that’s where you are scanning the QR code.

Also, you should scan the QR code with the custom dev client (Android) or the phone’s camera app (iOS)

Alright thank you. How can I install it on my physical device?

1 Like

For Android you can install it by plugging the phone into your computer using a USB cable, turning on USB debugging and then doing the same as if it were an emulator. Or any other way to install an APK file. e.g. I download the APK and then open it in a file manager which then asks me whether I want to install it. You need to enable installing apps from third party sources in the settings.

I don’t have an iOS device, so I can’t try this myself, but I believe you can do it with iTunes and possibly also with something called “Apple Configurator”. If you are using expo run:ios then you can apparently also use expo run:ios -d to install on a physical device. I’ve also seen a suggestion to “Try drag/drop via Xcode/Devices”.

Here’s a useful-looking HOWTO for installing using iTunes:

https://mercdev.com/support/running-ios-ad-hoc-builds

Here’s another article with various installation methods shown and also some Android info:

1 Like

Humm OK thank you, I’ll try for android, for ios it could be complicated. The documentation is not so clear on the expo client development’ s installation on physical devices.

Apparently you can also drag and drop it using iTunes as explained in the following Stack overflow answer:

I agree the Expo docs assume you know how to do this. I hope the Expo team will provide a link in the docs to the best way to do this.

Ok thanks, and last why scan the QR code as the doc says for open the app on real device ?

The dev client is basically a shell containing the native code, so you can actually use the dev client for any Expo app that depends on (some subset of) that native code. So it’s basically like the Expo Go app, but instead of having the native code that the Expo team decided to include, it’s whatever native code you decided your app(s) need(s).

So in order to load the JS for the particular app you’re currently working on you still need to load that from the dev server, e.g. using a QR code.

At least that’s my understanding.

e.g. let’s say you need to build NFC support into your app (or a couple of different apps). You can build a dev client with NFC support built in. You only need to do this once. Then you can build your apps using expo start --dev-client and plain JS almost like building a normal app using the Managed workflow on Expo Go.

If in future you need to add support for e.g. expo-location or Bluetooth support etc. you will need to rebuild the custom dev client. But otherwise you will just be writing JavaScript code.

2 Likes

Go to Settings of the Expo app on your Phone, and enable Local Area Network Connections.

This will allow Expo to open your running app