Commit Graph

158 Commits

Author SHA1 Message Date
Pascal Hartig
625321a8bc Flipper Release: v0.16.0
Summary:
- The Layout inspector can now visualise Litho sections.

- Stop trimming log messages so white-space-sensitive outputs (like trees) are preserved (88cc299811).
- Upgrade Flow to 0.91 (09a93cd9e6).
- Fix a screen recording bug on Pixel devices (64c8163a01).
- Watch plugin files recursively (c6752110cf).

Reviewed By: danielbuechele

Differential Revision: D14123167

fbshipit-source-id: 30cfccf5cfd767348c396401c97596342a243880
2019-02-19 07:21:44 -08:00
John Knox
9b6db1f482 Respond on exceptions thrown when on main thread
Summary: Changes FlipperPerformBlockOnMainThread to take a responder, and respond with an error if an exception is caught.

Reviewed By: passy

Differential Revision: D14066982

fbshipit-source-id: 70135bf58171684bcd013c66d9deec366aed36f5
2019-02-14 06:24:38 -08:00
John Knox
2335cfb312 Fix formatting in PortForwarding readme
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/369

Differential Revision: D14031906

Pulled By: passy

fbshipit-source-id: 6da0ab7da30f7505b5265033f732a00cf9f397a4
2019-02-11 15:21:25 -08:00
John Knox
4a3de26a88 Add requestResponse handler for incoming calls
Summary:
Flipper exposes a call() api to plugins which lets them call their sdk component, and it returns a promise with the response.
Currently this is done by sending a fireAndForget request, noting the id of the request, and then receiving fireAndForget requests and matching up the ids to give the result back to the right plugin promise.

Instead, it will be simpler to use rsocket requestResponse, instead of fireAndForget, which is for this exact use case. This diff adds a requestResponse handler to the SDK, so that it can deal with such requests and respond accordingly, while preserving the current functionality if it receives a fireAndForget.

So this part is backwards compatible and should be safe to land in isolation.

A later diff will change the desktop app to use requestResponse, which may not be backwards compatible, so that will have to be deployed more carefully.

Reviewed By: passy

Differential Revision: D13974049

fbshipit-source-id: b371d94a86b1f186375161ed8f2242a462ce418f
2019-02-11 14:06:55 -08:00
Patrick Shyu
3c35d6d4cf rename FBMacros.h to FBDefines.h (unrevert)
Summary:
Another smaller diff was responsible for breaking the build... D14019510 would have been the fix, which is integrated into this diff anyway.

 ---
Renaming FBMacros.h to FBDefines.h for more standard naming (similar to say UIKit/UIKit.h or Foundation/Foundation.h).

```
Tools/fastmod/fastmod --accept-all '\bFBMacros.h' FBDefines.h ../xplat
```

drop-conflicts
bypass-lint
allow-large-files

Reviewed By: dinhviethoa

Differential Revision: D14019529

fbshipit-source-id: 940490a5ec72ccdeb819598f488dc22eae454a26
2019-02-10 09:36:40 -08:00
Hoa Dinh
5cc1bb74c3 Revert D14011897: rename FBMacros.h to FBDefines.h
Differential Revision:
D14011897

Original commit changeset: f1dd7e686eef

fbshipit-source-id: ccf548ec2f82c7a1e6c2a0df5d6fd8f9dc9e1538
2019-02-09 23:23:24 -08:00
Patrick Shyu
159061c284 rename FBMacros.h to FBDefines.h
Summary:
Renaming FBMacros.h to FBDefines.h for more standard naming (similar to say UIKit/UIKit.h or Foundation/Foundation.h).

```
Tools/fastmod/fastmod --accept-all '\bFBMacros.h' FBDefines.h ../xplat
```

drop-conflicts
bypass-lint
allow-large-files

Reviewed By: adamjernst

Differential Revision: D14011897

fbshipit-source-id: f1dd7e686eef2cdb109e85c2db4a0f2ac3d0ba42
2019-02-09 16:51:50 -08:00
Pritesh Nandgaonkar
697962359c Fixed the build issue for oss
Summary:
Our OSS build was failing with the latest version of cocoapods(1.6.0). The reason was that the `post_install` script of adding a `SWIFT_VERSION` was not getting applied while building the project. So I added a `swift_version` in the YogaKit pod itself. So with this change we no longer need the `post_install` script to add `SWIFT_VERSION`.

I have also released a new version of YogaKit(1.10.0) on the CocoaPods. Usually the swift pods should specify the swift_version which is being used to develop it.Due to unknown reason, it was never mentioned in the podspec.

Reviewed By: jknoxville

Differential Revision: D13990363

fbshipit-source-id: 3c2f814765c03683fbedd17b3607ff0e6cdef566
2019-02-07 12:52:21 -08:00
Pritesh Nandgaonkar
ca797999eb Flipper Release: v0.15.0
Summary:
- Added build-headless yarn target for producing a headless binary
- Crash Reporter plugin added. Details [here](https://fbflipper.com/docs/crash-reporter-plugin.html).
- Bug fixes and dependency updates

- Desktop notifications for all kinds of crashes with their callstack
- Desktop notifications when an exception occurs within [Litho's error boundaries](https://fblitho.com/docs/error-boundaries)
- Ability to deeplink to the crash entry in the Logs plugin for Android. This feature is not available in iOS as the callstack doesn't get logged through Flipper's Logs plugin
- Ability to copy the stacktrace by right-clicking it
- Ability to see the list of crashes in the Notifications hub

Reviewed By: passy

Differential Revision: D13880665

fbshipit-source-id: 92a3455bb826b6fb22858e2c4c88c0b9ace91a5f
2019-01-31 04:03:48 -08:00
Pascal Hartig
993c8532df Flipper Release: v0.14.2
Summary: Patch release.

Reviewed By: jknoxville

Differential Revision: D13801789

fbshipit-source-id: f325b7b99de7bc573f728a94598cf2383cf217c2
2019-01-25 03:27:32 -08:00
John Knox
74d0ecac1b Add FLIPPER_PORTS env var to iOS SDK
Summary:
Part 2 of changing flipper to use customizable ports: iOS SDK.
Still to go: JS app.

env var should be of the format:

`FLIPPER_PORTS=1111,2222` for insecure port: 1111 and secure port: 2222.

Reviewed By: danielbuechele

Differential Revision: D13800988

fbshipit-source-id: 3560ba850389964f4b784551b803c45c6524e6f0
2019-01-24 06:49:33 -08:00
Pritesh Nandgaonkar
64efeef70b Update Flipper to use latest Folly (#356)
Summary:
Updates Flipper to use latest Folly version
Pull Request resolved: https://github.com/facebook/flipper/pull/356

Reviewed By: passy

Differential Revision: D13718181

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 13a7c2ef37e24295d442fb787f0d5bec0d5e75c6
2019-01-21 05:51:02 -08:00
Pritesh Nandgaonkar
f47de92117 Build sample app through BUCK
Summary: This diff adds capabilty to build sample app through BUCK.

Reviewed By: passy

Differential Revision: D13697307

fbshipit-source-id: d7008bb4709b13384f65051631b365a0eceddfff
2019-01-17 07:27:33 -08:00
Pritesh Nandgaonkar
b8c9597b07 Flipper Release: v0.14.1
Summary:
- Refactored [Crash Reporter Plugin's](https://fbflipper.com/docs/crash-reporter-plugin.html) android implementation to show the crash notification for all kind of crashes. It sniffs the logcat and fires notification whenever crash happens.
- "Plugin not showing?" in the plugin list now supports more cases for telling you what went wrong.
- Plugins are now sorted by name.

Reviewed By: jknoxville

Differential Revision: D13650988

fbshipit-source-id: 8b4861befa962162dea84a1394ea2829b88ab4c9
2019-01-14 07:26:45 -08:00
Scott Wolchok
6d4728c41f Rename FB_LINK_REQUIRE to FB_LINK_REQUIRE_CATEGORY
Reviewed By: adamjernst

Differential Revision: D13577664

fbshipit-source-id: 6a81e097840ccc66f55641990ad63729345b49e2
2019-01-08 16:53:06 -08:00
Scott Wolchok
6cfdf1a8a9 Delete second argument to FB_LINK_REQUIRE_
Summary: It is now always NAME.

Reviewed By: adamjernst

Differential Revision: D13577665

fbshipit-source-id: 9d9330fd17b7e214ef807760d0314c34bd06ebd5
2019-01-08 16:53:05 -08:00
Scott Wolchok
864327c9e5 Delete FB_LINK_REQUIRE_EXT
Summary: It is unused per ibgs

Reviewed By: adamjernst

Differential Revision: D13577666

fbshipit-source-id: e8ba16bf8aacfee178d2fdaea367903107cd3b62
2019-01-08 16:53:05 -08:00
Pascal Hartig
dc908928f0 Flipper Release: v0.14.0
Summary:
- New [Crash Reporter Plugin](https://fbflipper.com/docs/crash-reporter-plugin.html).
- "Where is my plugin?" screen can show you why a plugin wasn't loaded.
- New reusable components for StackTrace and MarkerTimeline.
- Support for remote Android devices when connected with adb.

- Avoid indexing 0s videos on Android when recording screencaps. (7471dc6481)
- Fix emulator launching on Linux. (7471dc6481)
- Several fixes to the certificate negotiation process.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13589524

fbshipit-source-id: 3bc0b2ff4d7802b0b767bb5fc55046a84e4a3ec8
2019-01-07 09:44:20 -08:00
Pritesh Nandgaonkar
da37ab78bd Docs with an updated install instruction (#343)
Summary:
This PR updates the installation instruction. It missed few crucial information and thus the projects installing flipper as a dependency were facing issues. It addresses the issue #341. It also brings the sample application at par with the documentation.
Pull Request resolved: https://github.com/facebook/flipper/pull/343

Reviewed By: danielbuechele

Differential Revision: D13507298

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 5a4b23d79930cb7eeb491e359b616d3558e260fb
2018-12-21 07:40:57 -08:00
Pritesh Nandgaonkar
2c9feb40e9 Remove crashreporter plugin iOS implementation
Summary: Removes the iOS implementation of crash reporter plugin as its implemented as desktop plugin

Reviewed By: adamjernst

Differential Revision: D13451980

fbshipit-source-id: 19cca52a00bb4a6d350eff91ac405f6dd3b07818
2018-12-18 13:42:40 -08:00
Pritesh Nandgaonkar
e3fb1e1d84 Disable crash reporter plugin for iOS and update callstack from array to string
Summary:
This diff does the following

- Comments out the code in iOS which sends the message to the desktop side
- Also comments out the part where signal handler is initialised, as we no longer need it. I will remove the iOS implementation completely in next few diffs
- Updated the JS side to expect call stack as a string instead of an array
- Updated the android side to send callstack as a string

I have commented out the code for crash reporter plugin of iOS as for iOS I will be adding a watchman  to a directory where crash logs are dumped. The diff related to this is in the stack

Reviewed By: passy

Differential Revision: D13424824

fbshipit-source-id: b1105da912292bf73cff948206c031de9b059abd
2018-12-18 13:42:40 -08:00
John Knox
73e921bafc Disable iOS portforwarder
Summary:
Disabling the port fordwarder.
On physical devices, when flipper isn't running and they don't have any certificates, they attempt to connect to the desktop.
They always connect to the portforwarder, even though it doesn't connect to flipper desktop.
After connecting to the portforwarder, they then try to generate the SSL certs. This is a CPU intensive operation and happens repeatedly in this condition when it really shouldn't be, causing high cpu usage.

Disabling for now. The fix will be to make sure that they only do that generation when they are fully connected.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13507353

fbshipit-source-id: a858a5da7352228b063150334ea443130763d888
2018-12-18 13:42:40 -08:00
Qichuan
d7ecd3af5a Fixe the iOS UserDefaultsPlugin (#340)
Summary:
The `getAllSharedPreferences` API is not implemented in the iOS UserDefaultsPlugin and thus the data is not shown in the `Shared Preference Viewer`.

This PR implements the missing API and present the Standard UserDefaults data from the target application.
Pull Request resolved: https://github.com/facebook/flipper/pull/340

Reviewed By: danielbuechele

Differential Revision: D13464765

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 8c6cf4e9f7094fcf75c71cce43cb6c34f9f957e7
2018-12-17 11:08:29 -08:00
Pascal Hartig
f5e5c33c68 Flipper Release: v0.13.0
Summary:
- Crash reporter plugin: Get notified for crashes in Android and iOS apps. Currently in Alpha and not enabled by default.
- Support for physical iOS devices.

- `yarn start` in open source works again (54d09aa951)
- Prevent unnecessary UI rerenders (133788380e)
- Fixes a problem on macOS where external plugin from `pluginPaths` config weren't loaded  (f7ddf3b496)
- Various improvements for certificate exchange and device connections.

Full changes here: 19485d076b...c6e0517640

Reviewed By: danielbuechele, priteshrnandgaonkar

Differential Revision: D13431074

fbshipit-source-id: ef2087742911e4c5ee98af1941bc7db5cfe75578
2018-12-12 07:28:56 -08:00
Pritesh Nandgaonkar
940ab5843f Add crash reporter plugin in swift sample app
Summary: Adds crash reporter plugin to swift sample app

Reviewed By: jknoxville

Differential Revision: D13359298

fbshipit-source-id: 2025725a7405d79407fbc15448d4f222f33c00fc
2018-12-07 07:37:55 -08:00
Pritesh Nandgaonkar
5894ad3834 Catch signal errors
Summary: This PR adds support to catch and report signal errors to the flipper. It also reports the callstack. Please look at the video in the test plan to understand the what it does.

Reviewed By: jknoxville

Differential Revision: D13328818

fbshipit-source-id: 304a68f47bb5ca5b0014c8b7d30f6a6fc2b6d147
2018-12-07 07:37:55 -08:00
John Knox
40f50d48e3 Add physical iOS support to internal build
Summary: Adds support for physical iOS devices, when the necessary dependencies are present. Unfortunately these aren't open sourced yet so the open source build won't get this feature yet.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13001473

fbshipit-source-id: d8c2bcd53b7972bec676717c8af0112800b918d0
2018-12-03 11:34:53 -08:00
John Knox
8d93946739 Add FBPortForwarding source code
Summary:
See FBPortForwarding/README.md for an explanation of what this is.
It's required for the upcoming support for physical iOS devices.

To simplify development of the JS app, We're going to bundle the pre-built PortForwardingMacApp
inside the repo, and inside the electron app (static/PortForwardingMacApp.app).
Adding this source so users can build it from source if they choose to.

Reviewed By: danielbuechele

Differential Revision: D13276022

fbshipit-source-id: 99b18e0412cf443bb4a67eb4846cc780e0014de1
2018-12-03 11:34:53 -08:00
Daniel Abramowitz
0f5cee4fec Reenable SubDescriptors after fixing a bug on the flipper client dealing with empty strings
Summary: Previously an empty string would crash the flipper client. Now that we handled that ok, we can reenable the descriptors.

Reviewed By: jknoxville

Differential Revision: D13257534

fbshipit-source-id: 09be4834d5a7023b2fa4e2bee7e57e412916120b
2018-11-30 10:50:32 -08:00
Pritesh Nandgaonkar
3183e56560 Add crash reporter plugin to wilde with a gatekeeper
Summary: Adds crash reporter plugin in wilde under a gatekeeper `flipper_crash_reporter_plugin`. By default all the employees will be part of this gatekeeper

Reviewed By: passy

Differential Revision: D13258265

fbshipit-source-id: 1baa2a342f492781d8fb3e86c2a30140537c23f1
2018-11-30 07:19:46 -08:00
Pritesh Nandgaonkar
912d3c4bcb FlipperClient tests on iOS
Summary:
This diff adds few tests for flipper client on iOS side. This tests are similar to the ones which exists in xplat but this tests the iOS side of flipper client.

Following tests are added

- connect , disconnect block called on plugin
- background plugin activated before init method
- crash getting suppressed

Reviewed By: jknoxville

Differential Revision: D13167637

fbshipit-source-id: 6c21d5cf2f08e7e3c17ecacbf3badfbde80fb5d1
2018-11-26 07:56:13 -08:00
Pritesh Nandgaonkar
d475a50f2a Crash reporter plugin
Summary: iOS side of crash reporter plugin

Reviewed By: jknoxville

Differential Revision: D13176725

fbshipit-source-id: be104958c5e26aa67709a33ef43c0b99600ca2b7
2018-11-26 03:43:26 -08:00
Pascal Hartig
19485d076b Flipper Release: v0.12.0
Summary:
- Docs for UI components are now automatically published: https://fbflipper.com/docs/ui-components.html
- Stop caching source files in dev mode: ad98ba3235
- `createTablePlugin` now uses persisted State: db42e8e970
- HTML in network responses now gets formatted: a56d7d5d72
- Notification filters are persisted between sessions: 9fb3a56303
- Prevent Flipper SDK crashes from bringing down Android apps: ddbb3c7f89
- Fix Android devices from not showing up: a6765deec6

Full commit log since the last release available here: https://github.com/facebook/flipper/compare/v0.11.1...v0.12.0

Reviewed By: jknoxville

Differential Revision: D13153344

fbshipit-source-id: e67e2ac9469b2a5ef58d1963a38b1c8f448bd4fb
2018-11-23 16:58:39 -08:00
mtfum
67dd1fc596 Remove unnecessary semicolon (#327)
Summary:
I updated to remove unnecessary semicolon in AppDelegate.swift, SampleSwift
Pull Request resolved: https://github.com/facebook/flipper/pull/327

Reviewed By: priteshrnandgaonkar

Differential Revision: D13121242

Pulled By: jknoxville

fbshipit-source-id: 9e848b2def84c5b969c9167abc556fe18ccecdbc
2018-11-20 02:12:18 -08:00
Pritesh Nandgaonkar
6e1c1d57f9 Adds example flipper plugin in swift sample app (#329)
Summary:
This PR adds the example flipper plugin in swift sample app. Example flipper plugin acts as an example for the plugin authors. The example flipper plugin was already added in an objective c example but the swift sample app didn't have it.
Pull Request resolved: https://github.com/facebook/flipper/pull/329

Reviewed By: jknoxville

Differential Revision: D13085611

Pulled By: priteshrnandgaonkar

fbshipit-source-id: d86cca43e95592ecca8d9991d170e62170b8217b
2018-11-19 01:53:00 -08:00
John Knox
ed93c98313 Disable subdescriptors to fix layout plugin
Summary:
Bug report here: https://fb.facebook.com/groups/230455004101832/permalink/519062535241076/

This has broken layout plugin when NT components are used.
Removing the subdescriptors as a quick fix. At the moment, this means removing the new NT features.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13103790

fbshipit-source-id: 57c10a0a07507aaba0cd7a20d1b548470203f2f6
2018-11-16 11:33:04 -08:00
John Knox
57235131fc Prevent overlay class from being target-selected
Summary:
We use this class to show an invisible overlay when using a sandbox. This shouldn't intercept hit tests.

Would be good to remove these FB-specific references from the OSS code, but since there's one already, will leave that for a separate diff.

Reviewed By: danielbuechele

Differential Revision: D13028248

fbshipit-source-id: df2eb83fd9c4b7547ede5dcb088e10a7d3d4f36b
2018-11-13 03:54:22 -08:00
John Knox
c76b524907 iOS - Use bundleId for app ID
Summary:
The appId field gets embedded into the certificate request, so flipper knows which app to provide the cert to.
In iOS this field is never used, so far, because the destination path uniquely identifies the app so this is redundant.

For physical iPhones however, knowing the bundle id lets you deploy files into the container, so we can use this value.

Reviewed By: passy

Differential Revision: D13000296

fbshipit-source-id: 9f21850b908a03f1be87dc204e59d616150cc7ec
2018-11-12 04:23:58 -08:00
Noah Gilmore
5ef39cbcad Fix a couple of Sonar references in FlipperKit.podspec (#321)
Summary:
Noticed these while looking through the podspec.
Pull Request resolved: https://github.com/facebook/flipper/pull/321

Reviewed By: passy

Differential Revision: D12963023

Pulled By: jknoxville

fbshipit-source-id: c4abc77d508f56bb7a1678ddf733b36a96f0b45b
2018-11-08 03:41:06 -08:00
Dimple Jethani
aa6d6ccb9b sending www string through ntsubdescriptor
Summary: took out dictionary implementation and passing string through NTSubDescriptor

Reviewed By: rohan-mehta

Differential Revision: D12961340

fbshipit-source-id: 73493b83b3b670eb3455148c0223972b0d25815a
2018-11-07 15:20:05 -08:00
Pascal Hartig
870f6017ab Flipper Release: v0.11.1
Summary: Fixes Apple dependencies and QPL plugin, changes build to fail on error.

Reviewed By: jknoxville

Differential Revision: D12905241

fbshipit-source-id: 339ca920f958cdc36c4339976d11b2b50380e861
2018-11-03 06:26:51 -07:00
Pritesh Nandgaonkar
2e9489d426 Remove unwanted import (#315)
Summary:
- [ ] Solves the broken travis
Pull Request resolved: https://github.com/facebook/flipper/pull/315

Reviewed By: jknoxville

Differential Revision: D12903152

Pulled By: passy

fbshipit-source-id: c349e451fd62f50d07814b86ff3e52cc5bdda10f
2018-11-02 09:59:54 -07:00
Pascal Hartig
d54fb3a21a Flipper Release: v0.11.0
Summary: Including a fix for OkHttp issues, contributed by NightlyNexus: https://github.com/facebook/flipper/pull/313

Reviewed By: jknoxville

Differential Revision: D12883196

fbshipit-source-id: e17b43b33694f46a2bd949eafc008a772777f83e
2018-11-02 06:57:47 -07:00
Dimple Jethani
aa979b8abd Added NTSubDescriptor files and SKSubDescriptor interface
Summary: Added NTSubDescriptor file which implements the SKSubDescriptor interface to pass all NT specific data to the Layout Component Descriptor.

Reviewed By: jknoxville

Differential Revision: D12840392

fbshipit-source-id: bff295e13e8531456428424b7e073aefe7e1ced4
2018-11-01 14:43:48 -07:00
Dimple Jethani
f153eedd3e add xhp tags on nt primitives
Summary: Adding xhp tags of <:nt:object> to reduction trace elements

Reviewed By: priteshrnandgaonkar

Differential Revision: D12818285

fbshipit-source-id: 4729ecc84dd1c31242c48fc6195ba05cdbb58e59
2018-10-29 12:04:06 -07:00
Dimple Jethani
e19489fbcb parsing JSON string for NTData subsections
Summary: Added separate subsections for ntData in objc - json string will be parsed on ios into correct subsections

Reviewed By: priteshrnandgaonkar

Differential Revision: D12817695

fbshipit-source-id: e1480303e121ceb537c47e6c30d328654ab91b8a
2018-10-29 11:29:28 -07:00
Pritesh Nandgaonkar
c938931b4f Add compiler flag for OSS builds
Summary: Currently we don't have a flag in iOS setup which lets us know if the code is going to be compiled in Open source or internally. Till now we didn't have a use case for it. But NT team is hacking a componentkit descriptor which is open sourced. This flag will come in handy for us to keep the open source setup build successfully.

Reviewed By: jknoxville

Differential Revision: D10854300

fbshipit-source-id: ac5da6f239b2066b6d7f0680cbfc1b7062ae0f36
2018-10-29 03:56:35 -07:00
Dimple Jethani
a2c4c98feb Added nt stack trace param in SKComponentLayoutDescriptor
Summary: Added stack trace param in layout node descriptor

Reviewed By: priteshrnandgaonkar

Differential Revision: D10850248

fbshipit-source-id: 0d647c773528f40a349b6738ecfafed0f22df193
2018-10-26 18:53:25 -07:00
Pritesh Nandgaonkar
ff6b1790cb Adds Diagnostics screen in sample app
Summary: Adds Diagnostics screen in sample app

Reviewed By: danielbuechele

Differential Revision: D10509941

fbshipit-source-id: 9d0a8244dc93528cfdb06ae70d51c2a408f3e3be
2018-10-23 10:39:08 -07:00
Pritesh Nandgaonkar
12d2af38f7 Added screens in sample app for notification
Summary:
Added a basic communication flows and a button to trigger notification
{F142016937}

Reviewed By: jknoxville

Differential Revision: D10492428

fbshipit-source-id: b65fc46b3be695852f9197771a253d9e8596f328
2018-10-23 09:12:57 -07:00