Skip to content

Commit

Permalink
feat: open RCT_DEBUG in release
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqingchen committed Aug 6, 2021
1 parent 9c58474 commit 7e37b61
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ target 'taroDemo' do
# use_flipper!()

post_install do |installer|
find_and_replace("../node_modules/react-native/React/CoreModules/RCTDevLoadingView.mm","[self showOfflineMessage];","")
find_and_replace("../node_modules/react-native/React/Base/RCTDefines.h","#define RCT_DEV 0", "#define RCT_DEV 1")
react_native_post_install(installer)
end
end

def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ SPEC CHECKSUMS:
EXPermissions: 30cbe5b72bd209b65c00884180ad058a60bb413d
EXSensors: d7829297e383600b38d4bf22b2137097e6748358
FBLazyVector: e686045572151edef46010a6f819ade377dfeb4b
FBReactNativeSpec: 15bb7c2f9bd13e756e23e31e2db2f835f3f5a4b1
FBReactNativeSpec: 15960d2cc2d75a848393d5c339079fe0d737df7a
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
RCTRequired: 6d3e854f0e7260a648badd0d44fc364bc9da9728
Expand Down Expand Up @@ -670,6 +670,6 @@ SPEC CHECKSUMS:
Yoga: 575c581c63e0d35c9a83f4b46d01d63abc1100ac
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

PODFILE CHECKSUM: c344860e1adc91090ce1272e7a26ffe3a3208c9d
PODFILE CHECKSUM: 1dd30dd3ee33447d67f92bcbe482977467b1b58b

COCOAPODS: 1.10.1

0 comments on commit 7e37b61

Please sign in to comment.