Commit Graph

6 Commits

Author SHA1 Message Date
Pascal Hartig
757ba91bf6 Simplify bridge types
Summary: This turns the bridge type into a simpler struct with always-present methods so you don't need to add additional null check to the calling logic which are hard to deal with.

Reviewed By: mweststrate

Differential Revision: D30248628

fbshipit-source-id: cdaee44efcbb19dcbb301099b4a7d0eb0c350e67
2021-08-11 11:03:45 -07:00
Pascal Hartig
52b3edc5ad Move screenshot to iOSBridge
Summary:
In order to support IOS cloud devices, we need to abstract
over the direct uses of idb/xcrun so we can switch them
out based on more than the device type.

Note that there's a bit of a type weirdness in there. I'll
clean this up with the next diff.

Reviewed By: mweststrate

Differential Revision: D30248036

fbshipit-source-id: ec8571429e04abe059850ef334a6645ae4a5e034
2021-08-11 11:03:45 -07:00
Michel Weststrate
d5fbe9a5b9 Support physical device logging
Summary:
Changelog: Logs plugin now supports physical iOS devices

As reported in https://github.com/facebook/flipper/issues/262 and linked papercut.

This diff adds support for iOS device logs through idb. Since idb doesn't respect `--json` flag at the moment, we perform the parsing in Flipper itself.

Reviewed By: passy

Differential Revision: D27346262

fbshipit-source-id: 3b314716f48bb9a7fe709370303396a51893359c
2021-03-29 07:00:47 -07:00
Pritesh Nandgaonkar
a2d559c8c0 Detect Physical iOS device without Xcode
Summary:
This diff adds the support of detecting physical device in Flipper even if the xcode is not installed and there is no cli tool installed.

See the demo.

Reviewed By: timur-valiev

Differential Revision: D26816588

fbshipit-source-id: 5f052998fcbe5c51385222d16df0e1855177b552
2021-03-05 11:36:20 -08:00
Pascal Hartig
39f0fa86cc Fix idb test (#1996)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1996

Erm, I'm a bit of a dummy. I didn't mock the access check, so it would actually
rely on idb being installed to run the tests correctly. Without, we'd fail like here
on GitHub: https://github.com/facebook/flipper/runs/2021551466

I couldn't quite figure out how to mock `fs.promises.access`, so I made the constructor
configurable, which doesn't seem that bad, actually.

Reviewed By: mweststrate

Differential Revision: D26778428

fbshipit-source-id: 120b8060ad3ccb1cecd8ce2b208733d5e1090a72
2021-03-03 08:06:42 -08:00
Pascal Hartig
390f27a137 Start bridge abstraction
Summary: This is just an early start of centralising some ad-hoc logic we've got all over the place right now. Memoised do-we-have-idb calls with concatenated shell invocations. This gives us the opportunity to do a bit of testing, too.

Reviewed By: mweststrate

Differential Revision: D26694863

fbshipit-source-id: cd2b9883f90397802bbaae6030f7cb3881c565c2
2021-03-02 09:53:19 -08:00