Layout Plugin support for swift (#295)

Summary:
Changed the podspec file to expose only those header files in public which are necessary. The exposed public header files have no c++ in it, thus due to this layout plugin now works for swift too.

Fixes #174

![ezgif com-video-to-gif](https://user-images.githubusercontent.com/3865908/46979109-9c5a4b80-d0c8-11e8-8f86-639dfba51efe.gif)
Pull Request resolved: https://github.com/facebook/flipper/pull/295

Reviewed By: passy

Differential Revision: D10389202

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 0ecc428f8008dd3aac48a675a8b97bb610f8e9eb
This commit is contained in:
Pritesh Nandgaonkar
2018-10-16 08:30:46 -07:00
committed by Facebook Github Bot
parent c544199289
commit 603c4c5fbc
6 changed files with 69 additions and 32 deletions

View File

@@ -13,10 +13,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window = UIWindow()
let client = FlipperClient.shared()
// Layout and network plugins are currently not supported for Swift apps.
// let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
// FlipperKitLayoutComponentKitSupport.setUp(descriptorMapper: layoutDescriptorMapper)
// client.addPlugin(FlipperKitLayoutPlugin(rootNode: application, descriptorMapper: layoutDescriptorMapper))
let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
// If you want to debug componentkit view in swift, otherwise you can ignore the next line
FlipperKitLayoutComponentKitSupport.setUpWith(layoutDescriptorMapper)
client?.add(FlipperKitLayoutPlugin(rootNode: application, with: layoutDescriptorMapper!))
client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter()))
client?.add(FKUserDefaultsPlugin.init(suiteName: nil))