From 40fa16aac14e70b95e91466bda4859d599ed5e0f Mon Sep 17 00:00:00 2001 From: Kevin Strider Date: Tue, 10 May 2022 09:09:57 -0700 Subject: [PATCH] ios-native.mdx (SetUp - Generic iOS Apps) Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant). Reviewed By: lblasa Differential Revision: D36275804 fbshipit-source-id: 4d6538b0c3123dfd88980b05bee3cbb2b9c3d4f2 --- docs/getting-started/ios-native.mdx | 33 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/docs/getting-started/ios-native.mdx b/docs/getting-started/ios-native.mdx index 6e527846a..c6d8eb69d 100644 --- a/docs/getting-started/ios-native.mdx +++ b/docs/getting-started/ios-native.mdx @@ -1,6 +1,6 @@ --- id: ios-native -title: Adding Flipper to iOS apps +title: Adding Flipper to Generic iOS Apps sidebar_label: Generic iOS apps --- @@ -9,11 +9,13 @@ import Link from "@docusaurus/Link"; import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -We support both Swift and Objective-C for Flipper with CocoaPods as build and distribution mechanism. +:::note +Swift and Objective-C are supported for Flipper with CocoaPods as build and distribution mechanism. +::: ## CocoaPods -The following configuration assumed CocoaPods 1.9+. +The following configuration assumes CocoaPods 1.9+: ```ruby project 'MyApp.xcodeproj' @@ -72,22 +74,22 @@ end ## For pure Objective-C projects -For pure Objective-C projects, add the following things in your settings: +For pure Objective-C projects, add the following to your settings: 1. `/usr/lib/swift` as the first entry of the `LD_RUNPATH_SEARCH_PATHS` 2. Add the following in `LIBRARY_SEARCH_PATHS` -``` -"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", -"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", -``` + ```bash + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", + ``` -3. If after the above two steps there are still error's like `Undefined symbol _swift_getFunctionReplacement` then set `DEAD_CODE_STRIPPING` to `YES`. Reference for this fix is [here](https://forums.swift.org/t/undefined-symbol-swift-getfunctionreplacement/30495/4) +3. If, after following the above two steps, there are still errors such as `Undefined symbol _swift_getFunctionReplacement`, then set `DEAD_CODE_STRIPPING` to `YES`. The reference for this fix is in the [Swift forum](https://forums.swift.org/t/undefined-symbol-swift-getfunctionreplacement/30495/4) -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](https://twitter.com/krzyzanowskim/status/1151549874653081601?s=21) and [here](https://github.com/Carthage/Carthage/issues/2825). +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. +For more information about this issue, refer to the Swift code [tweet](https://twitter.com/krzyzanowskim/status/1151549874653081601?s=21) and [Github issue](https://github.com/Carthage/Carthage/issues/2825). -Install the dependencies by running `pod install`. You can now import and initialize Flipper in your -AppDelegate. +Install the dependencies by running `pod install`. You can now import and initialize Flipper in yourAppDelegate. @@ -147,8 +149,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ## Enabling plugins -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](https://github.com/facebook/flipper) for examples of integrating other plugins. +Finally, you need to add plugins to your Flipper client. The Layout Inspector plugin is shown above to get you started. +See Network Plugin and [Layoutj Inspector Plugin](https://www.internalfb.com/intern/staticdocs/flipper/docs/features/plugins/inspector/) for information on how to add them and enable Litho or ComponentKit support. You can check the sample apps in the [GitHub repo](https://github.com/facebook/flipper) for examples of integrating other plugins. -## Having trouble? +## Questions or issues -See the troubleshooting page for help with known problems. +If you have any questions or issues, refer to the troubleshooting page, or post the details on the [Flipper Support](https://fb.workplace.com/groups/flippersupport) Workplace group.