JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.17k stars 1.11k forks source link

Android studio doesn't recognize my real iOS device(iOS 17) #3745

Open Quyunshuo opened 8 months ago

Quyunshuo commented 8 months ago

Describe the bug I want to run my app on a real ios device, but Android studio does not show my real device. I can run the app on my real device in xcode, and I also filled in the TEAM_ID, but it cannot show my device in Android studio

Affected platforms Select one of the platforms below:

Versions

To Reproduce Select the target device in Android studio

Screenshots 1695976410963 WX20230929-163802

eymar commented 8 months ago

Could you please check that you have the latest (Version 0.6.1(222)-14) KMM plugin installed? https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile

Quyunshuo commented 8 months ago

Yes, I have installed it and it is version 0.6.1(223)-18. I am not sure whether it has anything to do with Apple developer account, I see that redeme mentioned that you need to register the device in xcode. But I can run the program to me from Xcode

image

brewin commented 8 months ago

I'm having the same issue. My iPhone 15 Pro Max is not listed as an execution target even though it is working in Xcode. I have an iPhone X that does show up as an execution target, so I wonder if the problem is specifically with the iPhone 15. I have tried the latest Android Studio canary with the latest dev version of the KMM plugin, but still nothing. I also tried deleting the .idea directory.

Quyunshuo commented 8 months ago

I'm having the same issue. My iPhone 15 Pro Max is not listed as an execution target even though it is working in Xcode. I have an iPhone X that does show up as an execution target, so I wonder if the problem is specifically with the iPhone 15. I have tried the latest Android Studio canary with the latest dev version of the KMM plugin, but still nothing. I also tried deleting the .idea directory.

Probably not, because I have an iPhone 12 that is also unrecognizable, which may not have much to do with the phone

dima-avdeev-jb commented 8 months ago

What Android Studio version are you using ?

dima-avdeev-jb commented 8 months ago

Can you also please try to install and execute kdoctor command: brew install kdoctor kdoctor And check is it some problems with your environment

Quyunshuo commented 8 months ago

I am currently using Android Studio version is Android Studio Giraffe | 2022.3.1 Patch 2. After I checked the environment with kdoctor, everything was normal:

[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✓] Cocoapods

Maybe you can give me some more detailed steps to run a real device and I'll check if any of them are wrong.

dima-avdeev-jb commented 8 months ago

Thanks! I found what there are a little scroll offset if AndroidStudio device menu:

image

So, I just scrolled a little bit to the top. Can you please check the same?

Quyunshuo commented 8 months ago

I checked. I can't scroll up any more. Another thing that comes to mind, is it related to ios 17?

Quyunshuo commented 8 months ago

I seem to have found the cause: devices running iOS 17 are not recognized.
I downgraded my other iPhone 12 system to iOS 16.6.1, and then my Android Studio was able to recognize my iPhone 12.
WX20231002-174435@2x According to another friend's(@brewin ) description, his iPhone 15 pro max was also not recognized, Apparently, the iPhone 15 Pro Max runs on the latest iOS 17.

So I feel it is not compatible with iOS 17 and hope to fix this in the next KMM plugin.(@dima-avdeev-jb )

brewin commented 8 months ago

My iPhone X running iOS 16.7 is recognized in Android Studio 2022.3.1 Patch 2, but my 15 Pro Max running iOS 17.0.2 is not. Both work in Xcode 15. I noticed that "Connect via network" is enabled by default in Xcode for the 15 Pro Max and can't be disabled. I don't know if that has anything to do with it, but it is a difference.

joemockdao commented 8 months ago

Same problem for me too, hope it gets resolved soon

dima-avdeev-jb commented 8 months ago

Made Issue on YouTrack: https://youtrack.jetbrains.com/issue/KT-62267/Android-Studio-KMM-plugin-cant-find-real-iOS-17-device

joemockdao commented 7 months ago

does anyone know when this bug will be fixed? It's been reported for more than two months now

pablichjenkov commented 7 months ago

does anyone know when this bug will be fixed? It's been reported for more than two months now

It seems to be working again. I am on Android Giraffe. Did you update the kmm plugin?

joemockdao commented 7 months ago

does anyone know when this bug will be fixed? It's been reported for more than two months now

It seems to be working again. I am on Android Giraffe. Did you update the kmm plugin?

I have updated both Android Giraffe and kmm plugin, but I still don't see the physical devices with ios 17, to run the project on the physical device

pablichjenkov commented 7 months ago

I have updated both Android Giraffe and kmm plugin, but I still don't see the physical devices with ios 17, to run the project on the physical device

Do you see it from Xcode?

joemockdao commented 7 months ago

I have updated both Android Giraffe and kmm plugin, but I still don't see the physical devices with ios 17, to run the project on the physical device

Do you see it from Xcode?

yes from xcode I can see it without problems

pablichjenkov commented 7 months ago

Do you see yes from xcode I can see it without problems

Humm not sure what could be it. Try restarting the AS, clean, create a new iosApp configuration in Edit Configurations that sort of stuff.

Quyunshuo commented 7 months ago

Made Issue on YouTrack: https://youtrack.jetbrains.com/issue/KT-62267/Android-Studio-KMM-plugin-cant-find-real-iOS-17-device

According to the issue tracker on YouTrack, the issue is already being fixed and will be released soon

@pablichjenkov @joemockdao

pablichjenkov commented 7 months ago

According to the issue tracker on YouTrack, the issue is already being fixed and will be released soon

Oh great 😃 I didn't noticed it because I my device is in iOS 16 yet 🤷🏻‍♂️

suhomud commented 7 months ago

Made Issue on YouTrack: https://youtrack.jetbrains.com/issue/KT-62267/Android-Studio-KMM-plugin-cant-find-real-iOS-17-device

According to the issue tracker on YouTrack, the issue is already being fixed and will be released soon

@pablichjenkov @joemockdao

Running into same issue. Hope https://youtrack.jetbrains.com/issue/KT-62267/Android-Studio-KMM-plugin-cant-find-real-iOS-17-device will be released soon

mikolajefento commented 6 months ago

Running into this issue after update from RC to stable build in Android studio Hedgehog. I have iphone 11 with ios 16.5 and it is visible in xcode but not in Android Studio. When I downgraded KMM plugin to version 0.8.0(231)-16 it started working again.

dima-avdeev-jb commented 5 months ago

This issue was already fixed with:

image
Caij commented 5 months ago

image image

Android Studio Iguana | 2023.2.1 Canary 18 Kotlin Multiplatform Mobile plugin 0.8.1(232)-18 iPhone 8 iOS 16

This problem still exists。

dima-avdeev-jb commented 5 months ago

@Caij Initially problem was only with iOS 17 I think you have another one Issue. Can you please create new Issue for this? And provide MacOS version and Xcode version.

bidadh commented 4 months ago

I have a similar issue with Android Studio. It doesn't show any item in the Execution target list, and I can't run the iosApp.

I've tried Release, Beta and Canary versions with the latest Kotlin multiplatform plugin. However, I can run from Fleet and Xcode!

I've tried new projects created via KMP and my previous projects, which have worked fine!

I'm using Xcode Version 15.2 (15C500b).

kdoctor
Environment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✓] CocoaPods

Conclusion:
  ✓ Your operation system is ready for Kotlin Multiplatform Mobile Development!

Android Studio Jellyfish | 2023.3.1 Canary 7 Build #AI-233.13135.103.2331.11360849, built on January 26, 2024 Runtime version: 17.0.9+0-17.0.9b1087.9-11255266 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.3 GC: G1 Young Generation, G1 Old Generation Memory: 8192M Cores: 10 Metal Rendering is ON Registry: ide.balloon.shadow.size=0 debugger.new.tool.window.layout=true search.everywhere.structure=true search.everywhere.settings=true ide.experimental.ui=true editor.minimap.enabled=true ide.images.show.chessboard=true Non-Bundled Plugins: dev.j-a.swift (0.19.0.167-233) com.vecheslav.darculaSolidTheme (1.0.3) wu.seal.tool.jsontokotlin (3.7.4) idea.plugin.protoeditor (233.13135.65) com.jetbrains.kmm (0.8.2(233)-8) com.squareup.sqldelight (2.0.1) com.github.copilot (1.4.13.4415) com.mallowigi (94.1.0)

Kotlin Multiplatform version 0.8.2(233)-8

CleanShot 2024-01-27 at 15 47 39@2x

yuroyami commented 3 months ago

I confirm that this issue occurs when I reinstalled Android Studio (fully deleted it, then downloaded it again and placed it in /Applications/. Anyone worked around it ?

dima-avdeev-jb commented 3 months ago

@bidadh @yuroyami Do you have Apple VisionPro simulator installed? If yes - then please follow this issue

yuroyami commented 3 months ago

@dima-avdeev-jb I think I don't have the VisionPro simulator installed. Android Studio Jellyfish Canary 4 used to detect my iPhone XS (iOS 17.3.1, macOS Ventura) normally after I installed Xcode 15.2. However, after I deleted Android Studio and replaced it with Canary 11 it's not longer detecting my physical device, just the simulators.

EDIT: When I connect the iPhone with a USB wire, Android Studio detects it. But it doesn't work over wireless, although it used to work before when I had Xcode 14.2, Android Studio Hedgehog, and iOS 16.3.