idb icon indicating copy to clipboard operation
idb copied to clipboard

Failed to connect to Mac Catalyst app

Open Arkkeeper opened this issue 4 years ago • 0 comments

Description

Flipper desktop app can see the app build with Catalyst, but can't connect due to idb. Flipper tries to init certs exchange that uses idb file pull, but it surely fails, because idb can see only Xcode simulators or real iOS devices.

150939915-173ebc45-3814-4b99-bbaf-241d00da486a

idb says:

Ignoring device as cannot obtain ECID for it Reported 30 targets to stdout 2022-01-26 08:50:31,644 [DEBUG] - idb - list_targets succeeded 2022-01-26 08:50:31,644 [DEBUG] - idb - FSPullCommand failed Cannot spawn companion for 0F157BCB-E831-5FEA-AF60-C3D4513157FD, no matching target in available udids

Reproduction

  • Create new React Native app with npx react-native init AwesomeProject
  • Replace Flipper-DoubleConversion in react-native/scripts/react_native_pods.rb with fixed xcframework creation (pod 'Flipper-DoubleConversion', :git => 'https://github.com/Arkkeeper/double-conversion.git', :configurations => configurations) (explained here https://github.com/facebook/flipper/issues/3117)
  • Set "Dead Code Stripping" in Xcode build settings to Yes for the main app's target
  • Check "Mac Catalyst" on General tab in Xcode
  • Set "My Mac" as run destination and build app
  • Open Flipper app and try to connect to the app
  • Open Terminal and enter:

idb --log DEBUG file pull --udid HERE_IS_YOUR_MAC_UDID --bundle-id org.reactjs.native.example.AwesomeProject ~/Library/Containers/org.reactjs.native.example.AwesomeProject/Data/Library/Application Support/sonar/app.csr ~/Downloads

Solution

No idea. I realize that it's rather uncommon case, but it would be interesting, is there anything that could be done on the idb side to fix that behavior? Technically, Catalyst app is just a regular iOS app running on Mac using iOS SDK.

Additional Information

  • idb revision: 1.1.6

Arkkeeper avatar Jan 26 '22 14:01 Arkkeeper