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

Android Studio not recognizing iPhone XS properly #22147

Closed
timtraversy opened this issue Sep 21, 2018 · 25 comments
Closed

Android Studio not recognizing iPhone XS properly #22147

timtraversy opened this issue Sep 21, 2018 · 25 comments
Labels
e: device-specific Only manifests on certain devices platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@timtraversy
Copy link
Contributor

timtraversy commented Sep 21, 2018

I just received an iPhoneXS for development, and when I plug it into my computer, Android Studio displays this in the device list:
iphonexs

Instead of the usual:
iphone6s

You can also see this in the flutter doctor report. One of the connected devices is 'Pete's iPhone'. The other one is this huge string that shows the command line tools for ideviceinfo or libimobiledevice.

This also causes an error during installation:

Homepage: <http://libimobiledevice.org> in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: AW3JDRAG27
Starting Xcode build...
Xcode build done.
Installing and launching...
error: module importing failed: ('invalid syntax', ('temp.py', 1, 27, 'import fruitstrap_00008020-001C50503488002E\n'))
backtrace unavailable

I'm not sure if this is an error in Android Studio, the libimobiledevice library, or Flutter. I made sure to redo all the Flutter iOS installation instructions.

Steps to Reproduce

  1. Connect physical iPhone XS to Android Studio, observe device list

Logs

flutter doctor -v
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 0.8.2 at /Users/timtraversy/Flutter/flutter
    • Framework revision 5ab9e70727 (2 weeks ago), 2018-09-07 12:33:05 -0700
    • Engine revision 58a1894a1c
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /Users/timtraversy/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 2.0.0
    • CocoaPods version 1.6.0.beta.1

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Connected devices (2 available)
    • Pete's iPhone 6s                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     • b6cd2c47c22a62c62ab76fa9fbec687b75efdce7 • ios • iOS 12.0
    • Usage: ideviceinfo [OPTIONS]
      Show information about a connected device.
      
        -d, --debug             enable communication debugging
        -s, --simple            use a simple connection to avoid auto-pairing with the device
        -u, --udid UDID target specific device by its 40-digit device UDID
        -q, --domain NAME       set domain of query to NAME. Default: None
        -k, --key NAME  only query key specified by NAME. Default: All keys.
        -x, --xml               output information as xml plist instead of key/value pairs
        -h, --help              prints usage information
      
        Known domains are:
      
        com.apple.disk_usage
        com.apple.disk_usage.factory
        com.apple.mobile.battery
        com.apple.iqagent
        com.apple.purplebuddy
        com.apple.PurpleBuddy
        com.apple.mobile.chaperone
        com.apple.mobile.third_party_termination
        com.apple.mobile.lockdownd
        com.apple.mobile.lockdown_cache
        com.apple.xcode.developerdomain
        com.apple.international
        com.apple.mobile.data_sync
        com.apple.mobile.tethered_sync
        com.apple.mobile.mobile_application_usage
        com.apple.mobile.backup
        com.apple.mobile.nikita
        com.apple.mobile.restriction
        com.apple.mobile.user_preferences
        com.apple.mobile.sync_data_class
        com.apple.mobile.software_behavior
        com.apple.mobile.iTunes.SQLMusicLibraryPostProcessCommands
        com.apple.mobile.iTunes.accessories
        com.apple.mobile.internal
        com.apple.mobile.wireless_lockdown
        com.apple.fairplay
        com.apple.iTunes
        com.apple.mobile.iTunes.store
        com.apple.mobile.iTunes
      
      Homepage: <http://libimobiledevice.org> • 00008020-001C50503488002E                • ios • iOS Usage: ideviceinfo [OPTIONS]
      Show information about a connected device.
      
        -d, --debug             enable communication debugging
        -s, --simple            use a simple connection to avoid auto-pairing with the device
        -u, --udid UDID target specific device by its 40-digit device UDID
        -q, --domain NAME       set domain of query to NAME. Default: None
        -k, --key NAME  only query key specified by NAME. Default: All keys.
        -x, --xml               output information as xml plist instead of key/value pairs
        -h, --help              prints usage information
      
        Known domains are:
      
        com.apple.disk_usage
        com.apple.disk_usage.factory
        com.apple.mobile.battery
        com.apple.iqagent
        com.apple.purplebuddy
        com.apple.PurpleBuddy
        com.apple.mobile.chaperone
        com.apple.mobile.third_party_termination
        com.apple.mobile.lockdownd
        com.apple.mobile.lockdown_cache
        com.apple.xcode.developerdomain
        com.apple.international
        com.apple.mobile.data_sync
        com.apple.mobile.tethered_sync
        com.apple.mobile.mobile_application_usage
        com.apple.mobile.backup
        com.apple.mobile.nikita
        com.apple.mobile.restriction
        com.apple.mobile.user_preferences
        com.apple.mobile.sync_data_class
        com.apple.mobile.software_behavior
        com.apple.mobile.iTunes.SQLMusicLibraryPostProcessCommands
        com.apple.mobile.iTunes.accessories
        com.apple.mobile.internal
        com.apple.mobile.wireless_lockdown
        com.apple.fairplay
        com.apple.iTunes
        com.apple.mobile.iTunes.store
        com.apple.mobile.iTunes
      
      Homepage: <http://libimobiledevice.org>

• No issues found!

@luismarquesfreire
Copy link

Hi, I have exactly the same problem. Were you able to fix this issue?

@zoechi zoechi added e: device-specific Only manifests on certain devices platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Sep 22, 2018
@zoechi zoechi added this to the Goals milestone Sep 22, 2018
@timtraversy
Copy link
Contributor Author

No, not yet. I reinstalled pretty much all the relevant tools here and it stil only works on iPhones other than my XS, so it must be device specific. I might open this issue with the libimobiledevice repo, because I’m pretty sure that’s the code that allows flutter projects to be tested on iOS devices.

@timtraversy
Copy link
Contributor Author

@mortkane
Copy link

Same problem here, but it works, when you build directly in Xcode!

@timtraversy
Copy link
Contributor Author

Thanks! I forgot to mention that in my issue description. XCode builds are fine but obviously don’t offer hot reload, so can’t really be used for fast development.

@HelveticaScenario
Copy link

this is due to ideviceinstaller, ios-deploy, and libimobiledevice expecting a 40 digit hexadecimal string for the UDID, which seems to have changed for the iPhone XS (and i would assume the max as well but i dont have one to test). I have fixed this and submitted pull requests to the 3 projects libimobiledevice/libimobiledevice#703 libimobiledevice/ideviceinstaller#102
ios-control/ios-deploy#360

@timtraversy
Copy link
Contributor Author

timtraversy commented Sep 26, 2018

Thank you! Nice work.

@jasnig
Copy link

jasnig commented Sep 28, 2018

Meeting the same problem with iphone xs max.

@timtraversy
Copy link
Contributor Author

Although these library issues have not been fixed yet, I'm going to close this since it doesn't really pertain to the flutter team.

@davidair
Copy link

This also affects "flutter run" from the command line.

@Dano79
Copy link

Dano79 commented Nov 18, 2018

Same issue with XR in Visual Studio. I can open runner and build and run project but whats the point.

@davidair
Copy link

I tried updating to the latest flutter (v0.11.10-pre.1) as well as updating libimobiledevice and ideviceinstaller (flutter doctor provide the detailed instructions) and the problem went away.

@rafaeldalbosco
Copy link

Does anyone else solve any solution for the case,? I have an iPhone XR with the same problem.

@timtraversy
Copy link
Contributor Author

timtraversy commented Jan 27, 2019

This was solved 2 months ago, have you updated all the libraries involved? You might want to redo the installation instructions:

 brew install --HEAD usbmuxd
$ brew link usbmuxd
$ brew install --HEAD libimobiledevice
$ brew install ideviceinstaller ios-deploy cocoapods
$ pod setup

@rafaeldalbosco
Copy link

Thank you, problem has been solved.

@StarJiao
Copy link

StarJiao commented Feb 15, 2019

@timtraversy with execute all step the above mentioned , I still have the same error .

I first check the version of library ideviceinstaller and libimobiledevice they are the same as my colleagues.They are 1.1.0 &1.2.0 as the image shows
image

Then I have tried install the lib libimobiledevice by source code but failed it seems something wrong with my config. I found the newest version is 1.2.1 from make command , but not support by brew

i don't know what to do next T_T

This is my log from the android studio console
image

and the flutter doctor
source star$ flutter doctor -v

[✓] Flutter (Channel beta, v1.1.8, on Mac OS X 10.14.3 18D109, locale zh-Hans-CN)
    • Flutter version 1.1.8 at /Users/star/Dev/flutter
    • Framework revision 985ccb6d14 (5 weeks ago), 2019-01-08 13:45:55 -0800
    • Engine revision 7112b72cc2
    • Dart version 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/star/Library/Android/sdk
    • Android NDK at /Users/star/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 2.0.0
    • CocoaPods version 1.6.0

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] VS Code (version 1.30.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.22.1

[✓] Connected device (1 available)
    • 张卓然的 iPhone • 00008020-000964911A04002E • ios • iOS 12.1.2

• No issues found!

I am wondering what can I try next ?
Thank you very much for pay attention to my problem

@zoechi
Copy link
Contributor

zoechi commented Feb 15, 2019

Sounds like you don't have the latest version installed.

@StarJiao
Copy link

Sounds like you don't have the latest version installed.

Is that your meaning the version of library ideviceinstaller and libimobiledevice? But my colleague has the same version and they can run applications on to ios device after iphoneX ,and launch them naturally. Meanwhile, I can't upgrade that library version more hight. It's really awkward. T_T

@StarJiao
Copy link

@timtraversy @rafaeldalbosco @zoechi any other suggest?

@zoechi
Copy link
Contributor

zoechi commented Feb 20, 2019

@StarJiao When you run flutter devices does the device id contain a hyphen?

@StarJiao
Copy link

@zoechi yes it has

@zoechi
Copy link
Contributor

zoechi commented Feb 20, 2019

@StarJiao then updating libimobidevice as explained in the flutter doctor -v output in #22595 (comment) should fix it. Do you not get the instructions when you run flutter doctor?

@StarJiao
Copy link

The problem gone !!!
I think this suggest helped me.
comment
the version from brew is not the latest and not contains this pr pull

@zoechi in fact i got the instructions and i follow the steps to execute, but it didn't works. So many thanks for you all the same for giving me confidence to solve this problem

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: device-specific Only manifests on certain devices platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

10 participants