Skip to content

Commit

Permalink
fix(fixed): add workaround example
Browse files Browse the repository at this point in the history
  • Loading branch information
tr3v3r committed Sep 2, 2023
1 parent 76a420d commit 13f4cee
Show file tree
Hide file tree
Showing 5 changed files with 393 additions and 18 deletions.
166 changes: 166 additions & 0 deletions example/Flipper-Folly.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

Pod::Spec.new do |spec|
spec.name = 'Flipper-Folly'
spec.version = '2.6.10'
spec.license = { :type => 'Apache License, Version 2.0' }
spec.homepage = 'https://github.com/facebook/folly'
spec.summary = 'An open-source C++ library developed and used at Facebook.'
spec.authors = 'Facebook'
spec.source = { :git => 'https://github.com/facebook/folly.git',
:tag => "v2021.06.14.00"}
spec.module_name = 'folly'
spec.dependency 'Flipper-Boost-iOSX'
spec.dependency 'Flipper-Glog'
spec.dependency 'Flipper-DoubleConversion'
spec.dependency 'OpenSSL-Universal'
spec.dependency 'libevent', '~> 2.1.12'
spec.dependency 'Flipper-Fmt', '7.1.7'
spec.compiler_flags = '-DFOLLY_HAVE_BACKTRACE=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0
-frtti
-fexceptions
-std=c++14
-Wno-error
-Wno-unused-local-typedefs
-Wno-unused-variable
-Wno-sign-compare
-Wno-comment
-Wno-return-type
-Wno-global-constructors
-Wno-comma'

spec.source_files = "folly/*.h",
"folly/concurrency/*.h",
"folly/container/*.h",
"folly/container/*.cpp",
"folly/container/detail/*.h",
"folly/detail/*.h",
"folly/executors/**/*.h",
"folly/experimental/*.h",
"folly/functional/*.h",
"folly/futures/*.h",
"folly/futures/detail/*.h",
"folly/gen/*.h",
"folly/hash/*.h",
"folly/hash/detail/*.h",
"folly/init/*.h",
"folly/io/*.h",
"folly/io/async/*.h",
"folly/io/async/ssl/*.h",
"folly/lang/*.h",
"folly/memory/*.h",
"folly/memory/detail/*.h",
"folly/net/*.h",
"folly/net/detail/*.h",
"folly/ssl/*.h",
"folly/ssl/detail/*.h",
"folly/synchronization/*.h",
"folly/synchronization/detail/*.h",
"folly/synchronization/detail/*.cpp",
"folly/system/*.h",
"folly/tracing/*.h",
"folly/tracing/*.cpp",
"folly/chrono/*.h",
"folly/chrono/*.cpp",
"folly/*.cpp",
"folly/concurrency/*.cpp",
"folly/container/detail/*.cpp",
"folly/detail/*.cpp",
"folly/executors/*.cpp",
"folly/experimental/hazptr/*.cpp",
"folly/futures/*.cpp",
"folly/futures/detail/*.cpp",
"folly/hash/*.cpp",
"folly/io/*.cpp",
"folly/io/async/*.cpp",
"folly/io/async/ssl/*.cpp",
"folly/lang/*.cpp",
"folly/memory/*.cpp",
"folly/memory/detail/*.cpp",
"folly/net/*.cpp",
"folly/ssl/*.cpp",
"folly/ssl/detail/*.cpp",
"folly/String.cpp",
"folly/synchronization/*.cpp",
"folly/system/*.cpp",
"folly/experimental/coro/*.h",
"folly/experimental/symbolizer/*.h",
"folly/experimental/symbolizer/*.cpp",
"folly/fibers/*.h",
"folly/fibers/*.cpp",
"folly/experimental/symbolizer/detail/*.h",
"folly/experimental/symbolizer/detail/*.cpp",
"folly/logging/*.h",
"folly/logging/*.cpp",
"folly/experimental/coro/detail/*.h",
"folly/experimental/coro/detail/*.cpp",
"folly/portability/Unistd.h",
"folly/portability/Unistd.cpp",
"folly/portability/Config.h",
"folly/portability/Constexpr.h",
"folly/portability/Builtins.h",
"folly/portability/Builtins.cpp",
"folly/portability/Malloc.h",
"folly/portability/Malloc.cpp",
"folly/portability/Math.h",
"folly/portability/Asm.h",
"folly/portability/OpenSSL.h",
"folly/portability/OpenSSL.cpp",
"folly/portability/PThread.cpp",
"folly/portability/PThread.h",
"folly/portability/Windows.h",
"folly/portability/SysResource.h",
"folly/portability/SysResource.cpp",
"folly/portability/Event.h",
"folly/experimental/observer/*.h",
"folly/experimental/observer/*.cpp",
"folly/portability/Time.h",
"folly/portability/Time.cpp",
"folly/portability/IOVec.h",
"folly/portability/SysTypes.h",
"folly/portability/GFlags.h",
"folly/portability/SysSyscall.h",
"folly/portability/SysUio.h",
"folly/portability/SysUio.cpp",
"folly/portability/SysTime.h",
"folly/portability/SysTime.cpp",
"folly/portability/SysStat.h",
"folly/portability/SysStat.cpp",
"folly/portability/SysMman.h",
"folly/portability/SysMman.cpp",
"folly/portability/Sockets.h",
"folly/portability/Sockets.cpp",
"folly/portability/SysMembarrier.h",
"folly/portability/SysMembarrier.cpp",
"folly/portability/SysFile.h",
"folly/portability/SysFile.cpp",
"folly/portability/String.h",
"folly/portability/String.cpp",
"folly/portability/Fcntl.h",
"folly/portability/Fcntl.cpp",
"folly/portability/Stdlib.h",
"folly/portability/Stdlib.cpp",
"folly/portability/Stdio.h",
"folly/portability/Stdio.cpp",
"folly/portability/FmtCompile.h",
"folly/portability/Sched.h",
"folly/portability/Sched.cpp",
"folly/experimental/observer/detail/*.h",
"folly/experimental/observer/detail/*.cpp",

spec.exclude_files = "folly/synchronization/Rcu.cpp", "folly/synchronization/Rcu.h"
spec.header_mappings_dir = 'folly'
spec.header_dir = 'folly'
spec.libraries = "stdc++", "c++abi"

spec.public_header_files = "folly/**/*.h"

spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Flipper-Boost-iOSX\" \"$(PODS_ROOT)/Flipper-DoubleConversion\" \"$(PODS_ROOT)/libevent/include\""
}
spec.platforms = { :ios => "10.0"}
end
34 changes: 22 additions & 12 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PODS:
- Flipper-Fmt (= 7.1.7)
- Flipper-Glog
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- OpenSSL-Universal
- Flipper-Glog (0.5.0.5)
- Flipper-PeerTalk (0.0.4)
- Flipper-RSocket (1.4.3):
Expand Down Expand Up @@ -75,7 +75,9 @@ PODS:
- glog (0.3.5)
- hermes-engine (0.70.5)
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
- OpenSSL-Universal (1.0.2.20):
- OpenSSL-Universal/Static (= 1.0.2.20)
- OpenSSL-Universal/Static (1.0.2.20)
- RCT-Folly (2021.07.22.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -302,7 +304,7 @@ PODS:
- React-jsinspector (0.70.5)
- React-logger (0.70.5):
- glog
- react-native-esc-pos-printer (2.5.0):
- react-native-esc-pos-printer (2.6.0):
- React-Core
- React-perflogger (0.70.5)
- React-RCTActionSheet (0.70.5):
Expand Down Expand Up @@ -370,7 +372,7 @@ PODS:
- React-jsi (= 0.70.5)
- React-logger (= 0.70.5)
- React-perflogger (= 0.70.5)
- SocketRocket (0.6.0)
- SocketRocket (0.6.1)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand All @@ -384,7 +386,7 @@ DEPENDENCIES:
- Flipper-Boost-iOSX (= 1.76.0.1.11)
- Flipper-DoubleConversion (= 3.2.0.1)
- Flipper-Fmt (= 7.1.7)
- Flipper-Folly (= 2.6.10)
- Flipper-Folly (from `./Flipper-Folly.podspec`)
- Flipper-Glog (= 0.5.0.5)
- Flipper-PeerTalk (= 0.0.4)
- Flipper-RSocket (= 1.4.3)
Expand All @@ -404,7 +406,7 @@ DEPENDENCIES:
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- OpenSSL-Universal (from `https://github.com/krzyzanowskim/OpenSSL.git`, tag `1.0.220`)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
Expand Down Expand Up @@ -444,14 +446,12 @@ SPEC REPOS:
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- Flipper-RSocket
- FlipperKit
- fmt
- libevent
- OpenSSL-Universal
- SocketRocket
- YogaKit

Expand All @@ -464,10 +464,15 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
:path: "../node_modules/react-native/React/FBReactNativeSpec"
Flipper-Folly:
:podspec: "./Flipper-Folly.podspec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
hermes-engine:
:podspec: "../node_modules/react-native/sdks/hermes/hermes-engine.podspec"
OpenSSL-Universal:
:git: https://github.com/krzyzanowskim/OpenSSL.git
:tag: 1.0.220
RCT-Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
Expand Down Expand Up @@ -527,6 +532,11 @@ EXTERNAL SOURCES:
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

CHECKOUT OPTIONS:
OpenSSL-Universal:
:git: https://github.com/krzyzanowskim/OpenSSL.git
:tag: 1.0.220

SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
Expand All @@ -537,7 +547,7 @@ SPEC CHECKSUMS:
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
Flipper-Folly: 38bc4ec4df32e1bfdc0a3058280fc58072dec457
Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
Expand All @@ -546,7 +556,7 @@ SPEC CHECKSUMS:
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: 7fe5fc6ef707b7fdcb161b63898ec500e285653d
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
OpenSSL-Universal: ff34003318d5e1163e9529b08470708e389ffcdd
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
RCTRequired: 21229f84411088e5d8538f21212de49e46cc83e2
RCTTypeSafety: 62eed57a32924b09edaaf170a548d1fc96223086
Expand All @@ -562,7 +572,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 31564fa6912459921568e8b0e49024285a4d584b
React-jsinspector: badd81696361249893a80477983e697aab3c1a34
React-logger: fdda34dd285bdb0232e059b19d9606fa0ec3bb9c
react-native-esc-pos-printer: c7fbd65d010b8e17388bfb0952553e5baa2b0de2
react-native-esc-pos-printer: b3ee93f42173a8af1bb348cb923eb05bdca8595a
React-perflogger: e68d3795cf5d247a0379735cbac7309adf2fb931
React-RCTActionSheet: 05452c3b281edb27850253db13ecd4c5a65bc247
React-RCTAnimation: 578eebac706428e68466118e84aeacf3a282b4da
Expand All @@ -575,7 +585,7 @@ SPEC CHECKSUMS:
React-RCTVibration: 8e5c8c5d17af641f306d7380d8d0fe9b3c142c48
React-runtimeexecutor: 7401c4a40f8728fd89df4a56104541b760876117
ReactCommon: c9246996e73bf75a2c6c3ff15f1e16707cdc2da9
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: eca980a5771bf114c41a754098cd85e6e0d90ed7
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
8 changes: 5 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"pods": "pod-install --quiet"
"pods": "pod-install --quiet",
"postinstall": "patch-package"
},
"dependencies": {
"react": "18.1.0",
Expand All @@ -15,7 +16,8 @@
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"babel-plugin-module-resolver": "^4.1.0",
"metro-react-native-babel-preset": "0.72.3",
"babel-plugin-module-resolver": "^4.1.0"
"patch-package": "^8.0.0"
}
}
}
22 changes: 22 additions & 0 deletions example/patches/react-native+0.70.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/node_modules/react-native/scripts/cocoapods/flipper.rb b/node_modules/react-native/scripts/cocoapods/flipper.rb
index e2bfe76..1e9416f 100644
--- a/node_modules/react-native/scripts/cocoapods/flipper.rb
+++ b/node_modules/react-native/scripts/cocoapods/flipper.rb
@@ -52,7 +52,7 @@ def use_flipper_pods(versions = {}, configurations: ['Debug'])
pod 'Flipper-Boost-iOSX', versions['Flipper-Boost-iOSX'], :configurations => configurations
pod 'Flipper-DoubleConversion', versions['Flipper-DoubleConversion'], :configurations => configurations
pod 'Flipper-Fmt', versions['Flipper-Fmt'], :configurations => configurations
- pod 'Flipper-Folly', versions['Flipper-Folly'], :configurations => configurations
+ pod 'Flipper-Folly', :podspec => "../Flipper-Folly.podspec", :configurations => configurations
pod 'Flipper-Glog', versions['Flipper-Glog'], :configurations => configurations
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configurations => configurations
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configurations => configurations
@@ -64,7 +64,7 @@ def use_flipper_pods(versions = {}, configurations: ['Debug'])
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configurations => configurations
- pod 'OpenSSL-Universal', versions['OpenSSL-Universal'], :configurations => configurations
+ pod 'OpenSSL-Universal', :git => 'https://github.com/krzyzanowskim/OpenSSL.git', :tag => "1.0.220", :configurations => configurations
end

# Applies some changes to some pods of the project:
Loading

0 comments on commit 13f4cee

Please sign in to comment.