We support both Swift and Objective-C for Flipper with CocoaPods as build and distribution mechanism.
The following configuration assumed CocoaPods 1.9+.
For pure Objective-C projects
For pure Objective-C projects, add the following things in your settings:
/usr/lib/swiftas the first entry of the
- Add the following in
- If after the above two steps there are still error's like
Undefined symbol _swift_getFunctionReplacementthen set
YES. Reference for this fix is here
This is done to overcome a bug with Xcode 11 which fails to compile swift code when bitcode is enabled. Flipper transitively depends on YogaKit which is written in Swift. More about this issue can be found here and here.
Install the dependencies by running
pod install. You can now import and initialize Flipper in your
Finally, you need to add plugins to your Flipper client. Above, we have only added the Layout Inspector plugin to get you started. See Network Plugin and Layout Inspector Plugin for information on how to add them, and also enable Litho or ComponentKit support. You can check the sample apps in the GitHub repo for examples of integrating other plugins.
See the troubleshooting page for help with known problems.
On iOS, we currently do not support connecting to physical devices.