Skip to content

Commit f5e75cc

Browse files
chrisbobbegnprice
authored andcommitted
flipper (ios): Prepare to enable Flipper.
We'll actually enable it after the main RN v0.61 -> v0.62 upgrade commit, if only because running Flipper pre-RN v0.62 isn't advertised as something you can do. Enabling it means calling the initialize function, like in facebook/react-native@05f5cb534, but in the form it took in facebook/react-native@b4d1fcfb2 (and in the conditional that appears there). This encompasses several RN commits, as follows, some of which broke builds (which poses a problem even without Flipper enabled). We lump these in with their fixes, so that we don't knowingly introduce errors at any commit in our project. Some of these problems can be traced to upgrading the FlipperKit pod and not handling breaking changes at the same time. Perhaps it wouldn't have been easy for RN to catch these before merging. Generally, though, the RN commits aren't very clear or coherent (at least by our standards), so I feel safer flattening all of these even if something could plausibly stand alone in our project. ----- facebook/react-native@70274f4e9 ----- This commit is unstable. One reason is that `pod install` fails until `:modular_headers` is added to the `Yoga` pod declaration in facebook/react-native@898b1db6d. The failure message: ``` [!] The following Swift pods cannot yet be integrated as static libraries: The Swift pod `YogaKit` depends upon `Yoga`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` ----- facebook/react-native@e8541e03f ----- The claim is that this commit adds running React Dev Tools to the template. I had thought this was something totally separate from Flipper (and so this would naturally stand in its own commit), but no; the added code comes from the `FlipperKitReactPlugin` subspec of the `FlipperKit` pod, and it'll be invoked in the Flipper initialization function. This commit also advances the FlipperKit pod version to v0.23.6; I'm not aware of any new issues that were specifically introduced in this version. Still, seems safest to apply these changes in this giant commit. ----- facebook/react-native@898b1db6d ----- A small handful of changes in `AppDelegate.m`, the Podfile, and `project.pbxproj` are made here. The motivation for the `AppDelegate.m` changes isn't clear to me, unless it's "The integration of Flipper on iOS was crashing the template"--not super descriptive or helpful in finding the origin of the issue. In the Podfile, the addition of `:modular_headers => true` to the `Yoga` pod declaration fixes a `pod install` failure introduced in facebook/react-native@70274f4e9, described above. Also in the Podfile, the change of FlipperKit's version to v0.30.0 introduces a build failure associated with facebook/flipper@ab121f9d9 (Flipper release tag v0.26.0); see facebook/react-native#27565 (comment). That issue was non-optimally resolved in facebook/react-native@b4d1fcfb2, which we take for now in this commit (see below); a more principled solution is open as facebook/flipper#1171. The `project.pbxproj` changes here aren't fully explained, but here's what I think happened, and what I did about it: - An empty Swift file was added, to rouse Xcode into being prepared to handle Swift files, which is needed for the "YogaKit" dep; see facebook/react-native#27426 (comment). This step is included in the upgrade guide [1]. The empty Swift file was later backed out in facebook/react-native@e3218a0d9 (see below), which is why it doesn't appear here. - The addition of the empty Swift file activated a wizard that walked the user through setting up an Objective-C "bridging header" file and set some plausibly desired settings in the `project.pbxproj` file. RN deleted the bridging header file, but the settings remained. We had actually already set up a bridging header file a long time ago, in d38129b, and this setup wizard didn't activate when I created the empty Swift file. I tried to *get* it to activate (to better reproduce the settings changes) by deleting our bridging header file and re-adding the Swift file, but the wizard didn't activate. However, the settings that got added in d38129b seem to match these settings pretty closely; one notable difference is that a SWIFT_VERSION build setting is 4.2 instead of 5.0. In any case, the upgrade guide on the Xcode changes [1] only says the bridging-header wizard will "most likely" appear, and if it doesn't, just keep going. - They added "English" under `knownRegions` in the project info. It appears Xcode doesn't like this change; it gets reverted later as part of facebook/react-native@ebb629d05 (which we take elsewhere in this series, before the upgrade, as an instance of zulip#4112), when they follow an Xcode automatic deprecation fix. So, ignore this. ----- facebook/react-native@e3218a0d9 ----- This Facebook commit looks fairly coherent, but it's a partial reversion of facebook/react-native@898b1db6d (just above) with a tweak on top of it. So, might as well put it into the same commit. The `project.pbxproj` changes are as follows, as best as I can tell: - The empty Swift file described just above is removed. The commit message makes it sound like it's no longer necessary for projects to make the Swift file in the first place; on the other hand, the upgrade guide on the Xcode changes [1] indicate that it should be created and then removed. - A `LIBRARY_SEARCH_PATHS` setting is added. This *is* reflected in the upgrade guide on the Xcode changes [1]; following those instructions does indeed generate a portion of the diff. - An `LD_RUNPATH_SEARCH_PATHS` setting is added; this is *not* reflected in the upgrade guide. It's reportedly crucial; see facebook/react-native#27922 (comment). I copied the code. - A `DEAD_CODE_STRIPPING` setting is removed; this is *not* reflected in the upgrade guide. Reportedly (and in my experience, as best as I can remember and conclude), it's crucial; see facebook/react-native#27922 (comment). I copied the code. ----- facebook/react-native@8f954b365 ----- Just simple prose adjustments to a comment, but it's substantially reworked in facebook/react-native@b4d1fcfb2 (which follows). ----- facebook/react-native@b4d1fcfb2 ----- This looks like a partial reversion of facebook/react-native@898b1db6d (above), with a tweak; the `FB_SONARKIT_ENABLED` conditional is removed from `AppDelegate.m`, but that identifier now appears in the `project.pbxproj`. `ENABLE_BITCODE = NO;` is added to the `project.pbxproj` to fix an issue introduced in facebook/react-native@898b1db6d (see above); see facebook/react-native#27565 (comment). The issue would be better resolved with something like facebook/flipper#1171. In particular, I'm inclined to agree with that PR's author, who says "it strikes me that not having access to current (and possible future) updates of a cryptography library is not a good long-term plan". This commit also continues the advancement of the FlipperKit pod's version, this time to v0.30.2, and adjusts some comments. ----- facebook/react-native@f6a8452e7 ----- After an upgrade to FlipperKit v0.32.0 in facebook/react-native@ada73a354, quickly reverted in facebook/react-native@4bb17944f, this commit brings us to v0.33.1. ----- facebook/react-native@8858d879e ----- This is the last commit that affects Flipper on iOS before the v0.62 release was made. It doesn't continue the advancement of the FlipperKit version (and a good thing, too, maybe!). It lists several transitive dependencies of FlipperKit pods to the Podfile and gives them each a `:configuration => 'Debug'` setting, and that's it. It appears to be accounting for a CocoaPods quirk that means that, before this change is made, all those dependencies would get included in release builds, increasing the binary size. Might as well avoid having any commits with that increased size; so, conclude this giant commit with these changes. All that's left is to actually enable Flipper, which we'll do after the main upgrade commit; see zulip#4244 (comment). [1] react-native-community/upgrade-support#13
1 parent 142b470 commit f5e75cc

File tree

4 files changed

+185
-3
lines changed

4 files changed

+185
-3
lines changed

ios/Podfile

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,50 @@ platform :ios, '10.3'
55
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
66
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
77

8+
# Add Flipper Pods
9+
def add_flipper_pods!(versions = {})
10+
versions['Flipper'] ||= '~> 0.33.1'
11+
versions['DoubleConversion'] ||= '1.1.7'
12+
versions['Flipper-Folly'] ||= '~> 2.1'
13+
versions['Flipper-Glog'] ||= '0.3.6'
14+
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
15+
versions['Flipper-RSocket'] ||= '~> 1.0'
16+
17+
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
18+
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
19+
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
20+
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
21+
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
22+
23+
# List all transitive dependencies for FlipperKit pods
24+
# to avoid them being linked in Release builds
25+
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
26+
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
27+
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
28+
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
29+
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
30+
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
31+
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
32+
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
33+
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
34+
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
35+
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
36+
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
37+
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
38+
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
39+
end
40+
41+
# Post Install processing for Flipper
42+
def flipper_post_install(installer)
43+
installer.pods_project.targets.each do |target|
44+
if target.name == 'YogaKit'
45+
target.build_configurations.each do |config|
46+
config.build_settings['SWIFT_VERSION'] = '4.1'
47+
end
48+
end
49+
end
50+
end
51+
852
target 'ZulipMobile' do
953
# Pods from React Native
1054
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
@@ -35,7 +79,7 @@ target 'ZulipMobile' do
3579
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
3680
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
3781
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
38-
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
82+
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
3983
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
4084
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
4185
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
@@ -44,6 +88,15 @@ target 'ZulipMobile' do
4488
# Native, unless omitted in our own `react-native.config.js`.
4589
use_native_modules!
4690

91+
# Enables Flipper.
92+
#
93+
# Note that if you have use_frameworks! enabled, Flipper will not work and
94+
# you should disable these next few lines.
95+
add_flipper_pods!
96+
post_install do |installer|
97+
flipper_post_install(installer)
98+
end
99+
47100
# unimodules provides Expo packages individually.
48101
use_unimodules!
49102
end

ios/Podfile.lock

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
PODS:
22
- boost-for-react-native (1.63.0)
3+
- CocoaAsyncSocket (7.6.4)
4+
- CocoaLibEvent (1.0.0)
35
- DoubleConversion (1.1.6)
46
- EXAppleAuthentication (2.1.1):
57
- UMCore
@@ -29,6 +31,52 @@ PODS:
2931
- React-Core (= 0.61.5)
3032
- React-jsi (= 0.61.5)
3133
- ReactCommon/turbomodule/core (= 0.61.5)
34+
- Flipper (0.33.1):
35+
- Flipper-Folly (~> 2.1)
36+
- Flipper-RSocket (~> 1.0)
37+
- Flipper-DoubleConversion (1.1.7)
38+
- Flipper-Folly (2.2.0):
39+
- boost-for-react-native
40+
- CocoaLibEvent (~> 1.0)
41+
- Flipper-DoubleConversion
42+
- Flipper-Glog
43+
- OpenSSL-Universal (= 1.0.2.19)
44+
- Flipper-Glog (0.3.6)
45+
- Flipper-PeerTalk (0.0.4)
46+
- Flipper-RSocket (1.1.0):
47+
- Flipper-Folly (~> 2.2)
48+
- FlipperKit (0.33.1):
49+
- FlipperKit/Core (= 0.33.1)
50+
- FlipperKit/Core (0.33.1):
51+
- Flipper (~> 0.33.1)
52+
- FlipperKit/CppBridge
53+
- FlipperKit/FBCxxFollyDynamicConvert
54+
- FlipperKit/FBDefines
55+
- FlipperKit/FKPortForwarding
56+
- FlipperKit/CppBridge (0.33.1):
57+
- Flipper (~> 0.33.1)
58+
- FlipperKit/FBCxxFollyDynamicConvert (0.33.1):
59+
- Flipper-Folly (~> 2.1)
60+
- FlipperKit/FBDefines (0.33.1)
61+
- FlipperKit/FKPortForwarding (0.33.1):
62+
- CocoaAsyncSocket (~> 7.6)
63+
- Flipper-PeerTalk (~> 0.0.4)
64+
- FlipperKit/FlipperKitHighlightOverlay (0.33.1)
65+
- FlipperKit/FlipperKitLayoutPlugin (0.33.1):
66+
- FlipperKit/Core
67+
- FlipperKit/FlipperKitHighlightOverlay
68+
- FlipperKit/FlipperKitLayoutTextSearchable
69+
- YogaKit (~> 1.18)
70+
- FlipperKit/FlipperKitLayoutTextSearchable (0.33.1)
71+
- FlipperKit/FlipperKitNetworkPlugin (0.33.1):
72+
- FlipperKit/Core
73+
- FlipperKit/FlipperKitReactPlugin (0.33.1):
74+
- FlipperKit/Core
75+
- FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1):
76+
- FlipperKit/Core
77+
- FlipperKit/SKIOSNetworkPlugin (0.33.1):
78+
- FlipperKit/Core
79+
- FlipperKit/FlipperKitNetworkPlugin
3280
- Folly (2018.10.22.00):
3381
- boost-for-react-native
3482
- DoubleConversion
@@ -39,6 +87,9 @@ PODS:
3987
- DoubleConversion
4088
- glog
4189
- glog (0.3.5)
90+
- OpenSSL-Universal (1.0.2.19):
91+
- OpenSSL-Universal/Static (= 1.0.2.19)
92+
- OpenSSL-Universal/Static (1.0.2.19)
4293
- RCTRequired (0.61.5)
4394
- RCTTypeSafety (0.61.5):
4495
- FBLazyVector (= 0.61.5)
@@ -304,6 +355,8 @@ PODS:
304355
- UMSensorsInterface (5.1.0)
305356
- UMTaskManagerInterface (5.1.0)
306357
- Yoga (1.14.0)
358+
- YogaKit (1.18.1):
359+
- Yoga (~> 1.14)
307360

308361
DEPENDENCIES:
309362
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
@@ -316,6 +369,25 @@ DEPENDENCIES:
316369
- EXScreenOrientation (from `../node_modules/expo-screen-orientation/ios`)
317370
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
318371
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
372+
- Flipper (~> 0.33.1)
373+
- Flipper-DoubleConversion (= 1.1.7)
374+
- Flipper-Folly (~> 2.1)
375+
- Flipper-Glog (= 0.3.6)
376+
- Flipper-PeerTalk (~> 0.0.4)
377+
- Flipper-RSocket (~> 1.0)
378+
- FlipperKit (~> 0.33.1)
379+
- FlipperKit/Core (~> 0.33.1)
380+
- FlipperKit/CppBridge (~> 0.33.1)
381+
- FlipperKit/FBCxxFollyDynamicConvert (~> 0.33.1)
382+
- FlipperKit/FBDefines (~> 0.33.1)
383+
- FlipperKit/FKPortForwarding (~> 0.33.1)
384+
- FlipperKit/FlipperKitHighlightOverlay (~> 0.33.1)
385+
- FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1)
386+
- FlipperKit/FlipperKitLayoutTextSearchable (~> 0.33.1)
387+
- FlipperKit/FlipperKitNetworkPlugin (~> 0.33.1)
388+
- FlipperKit/FlipperKitReactPlugin (~> 0.33.1)
389+
- FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1)
390+
- FlipperKit/SKIOSNetworkPlugin (~> 0.33.1)
319391
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
320392
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
321393
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
@@ -374,8 +446,19 @@ DEPENDENCIES:
374446
SPEC REPOS:
375447
trunk:
376448
- boost-for-react-native
449+
- CocoaAsyncSocket
450+
- CocoaLibEvent
451+
- Flipper
452+
- Flipper-DoubleConversion
453+
- Flipper-Folly
454+
- Flipper-Glog
455+
- Flipper-PeerTalk
456+
- Flipper-RSocket
457+
- FlipperKit
458+
- OpenSSL-Universal
377459
- Sentry
378460
- Toast
461+
- YogaKit
379462

380463
EXTERNAL SOURCES:
381464
DoubleConversion:
@@ -503,6 +586,8 @@ EXTERNAL SOURCES:
503586

504587
SPEC CHECKSUMS:
505588
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
589+
CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
590+
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
506591
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
507592
EXAppleAuthentication: 046c76335343eaa97f6ed8d35a9cf493a2c4d351
508593
EXApplication: 7cf81de6fafccff42f5d1caa5c24a159db6b9437
@@ -513,8 +598,16 @@ SPEC CHECKSUMS:
513598
EXScreenOrientation: 44d3cd3a99a86b9cb681e742697bc2c057d7fbd2
514599
FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
515600
FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
601+
Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69
602+
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
603+
Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
604+
Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
605+
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
606+
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
607+
FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e
516608
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
517609
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
610+
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
518611
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
519612
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
520613
React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
@@ -566,7 +659,8 @@ SPEC CHECKSUMS:
566659
UMSensorsInterface: 48941f70175e2975af1a9386c6d6cb16d8126805
567660
UMTaskManagerInterface: cb890c79c63885504ddc0efd7a7d01481760aca2
568661
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
662+
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
569663

570-
PODFILE CHECKSUM: a17f480863448723f1b256597206709dfa50870c
664+
PODFILE CHECKSUM: b31e45ca912ffe41b915cb3dbc892ca3049708b7
571665

572666
COCOAPODS: 1.9.3

ios/ZulipMobile.xcodeproj/project.pbxproj

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,13 @@
392392
CLANG_ENABLE_MODULES = YES;
393393
CODE_SIGN_ENTITLEMENTS = ZulipMobile/ZulipMobile.entitlements;
394394
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
395-
DEAD_CODE_STRIPPING = NO;
396395
DEVELOPMENT_TEAM = 66KHCWMEYB;
396+
ENABLE_BITCODE = NO;
397397
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
398+
GCC_PREPROCESSOR_DEFINITIONS = (
399+
"$(inherited)",
400+
"FB_SONARKIT_ENABLED=1",
401+
);
398402
HEADER_SEARCH_PATHS = "$(inherited)";
399403
INFOPLIST_FILE = ZulipMobile/Info.plist;
400404
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
@@ -491,6 +495,12 @@
491495
GCC_WARN_UNUSED_VARIABLE = YES;
492496
HEADER_SEARCH_PATHS = "";
493497
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
498+
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
499+
LIBRARY_SEARCH_PATHS = (
500+
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
501+
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
502+
"\"$(inherited)\"",
503+
);
494504
MTL_ENABLE_DEBUG_INFO = YES;
495505
ONLY_ACTIVE_ARCH = YES;
496506
PRODUCT_BUNDLE_IDENTIFIER = org.zulip.ZulipMobile;
@@ -540,6 +550,12 @@
540550
GCC_WARN_UNUSED_VARIABLE = YES;
541551
HEADER_SEARCH_PATHS = "";
542552
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
553+
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
554+
LIBRARY_SEARCH_PATHS = (
555+
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
556+
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
557+
"\"$(inherited)\"",
558+
);
543559
MTL_ENABLE_DEBUG_INFO = NO;
544560
PRODUCT_BUNDLE_IDENTIFIER = org.zulip.ZulipMobile;
545561
SDKROOT = iphoneos;

ios/ZulipMobile/AppDelegate.m

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@
1313
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
1414
#import <EXScreenOrientation/EXScreenOrientationViewController.h>
1515

16+
#if DEBUG
17+
#import <FlipperKit/FlipperClient.h>
18+
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
19+
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
20+
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
21+
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
22+
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
23+
24+
static void InitializeFlipper(UIApplication *application) {
25+
FlipperClient *client = [FlipperClient sharedClient];
26+
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
27+
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
28+
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
29+
[client addPlugin:[FlipperKitReactPlugin new]];
30+
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
31+
[client start];
32+
}
33+
#endif
34+
1635
@implementation AppDelegate
1736

1837
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

0 commit comments

Comments
 (0)