Эх сурвалжийг харах

1.配置ReactNative环境

time 6 жил өмнө
parent
commit
5ea75e4168

+ 1 - 0
.gitignore

@@ -32,6 +32,7 @@ xcuserdata/
 # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
 #
 Pods/
+UU_RN/
 
 Podfile.lock
 # Carthage

+ 27 - 2
shiku_im/Podfile

@@ -1,12 +1,12 @@
 # Uncomment the next line to define a global platform for your project
-# platform :ios, '9.0'
+ platform :ios, '9.0'
 
 target 'shiku_im' do
   # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
   # use_frameworks!
 
   pod 'MJRefresh'
-  pod 'MJExtension'
+  pod 'MJExtension'=>'3.0.10'
 
 #  pod 'MBProgressHUD'
   pod 'AFNetworking'
@@ -23,7 +23,32 @@ target 'shiku_im' do
   pod 'EGOCache'
   pod 'SDWebImage'=>'4.4.6'
   pod 'HMSegmentedControl'
+
+  #ReactNative
+  pod 'React', :path => './UU_RN/node_modules/react-native/'
+  pod 'React-Core', :path => './UU_RN/node_modules/react-native/React'
+  pod 'React-DevSupport', :path => './UU_RN/node_modules/react-native/React'
+  pod 'React-fishhook', :path => './UU_RN/node_modules/react-native/Libraries/fishhook'
+  pod 'React-RCTActionSheet', :path => './UU_RN/node_modules/react-native/Libraries/ActionSheetIOS'
+  pod 'React-RCTAnimation', :path => './UU_RN/node_modules/react-native/Libraries/NativeAnimation'
+  pod 'React-RCTBlob', :path => './UU_RN/node_modules/react-native/Libraries/Blob'
+  pod 'React-RCTImage', :path => './UU_RN/node_modules/react-native/Libraries/Image'
+  pod 'React-RCTLinking', :path => './UU_RN/node_modules/react-native/Libraries/LinkingIOS'
+  pod 'React-RCTNetwork', :path => './UU_RN/node_modules/react-native/Libraries/Network'
+  pod 'React-RCTSettings', :path => './UU_RN/node_modules/react-native/Libraries/Settings'
+  pod 'React-RCTText', :path => './UU_RN/node_modules/react-native/Libraries/Text'
+  pod 'React-RCTVibration', :path => './UU_RN/node_modules/react-native/Libraries/Vibration'
+  pod 'React-RCTWebSocket', :path => './UU_RN/node_modules/react-native/Libraries/WebSocket'
+  
+  pod 'React-cxxreact', :path => './UU_RN/node_modules/react-native/ReactCommon/cxxreact'
+  pod 'React-jsi', :path => './UU_RN/node_modules/react-native/ReactCommon/jsi'
+  pod 'React-jsiexecutor', :path => './UU_RN/node_modules/react-native/ReactCommon/jsiexecutor'
+  pod 'React-jsinspector', :path => './UU_RN/node_modules/react-native/ReactCommon/jsinspector'
+  pod 'yoga', :path => './UU_RN/node_modules/react-native/ReactCommon/yoga'
   
+  pod 'DoubleConversion', :podspec => './UU_RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
+  pod 'glog', :podspec => './UU_RN/node_modules/react-native/third-party-podspecs/glog.podspec'
+  pod 'Folly', :podspec => './UU_RN/node_modules/react-native/third-party-podspecs/Folly.podspec'
 
 
 end

+ 187 - 12
shiku_im/Podfile.lock

@@ -15,49 +15,155 @@ PODS:
   - AFNetworking/UIKit (3.2.1):
     - AFNetworking/NSURLSession
   - AliPay (2.1.2)
-  - Bugtags (3.1.2):
-    - Bugtags/Core (= 3.1.2)
-  - Bugtags/Core (3.1.2)
+  - boost-for-react-native (1.63.0)
+  - Bugtags (3.1.3):
+    - Bugtags/Core (= 3.1.3)
+  - Bugtags/Core (3.1.3)
+  - DoubleConversion (1.1.6)
   - EGOCache (2.2.0)
   - FMDB (2.7.5):
     - FMDB/standard (= 2.7.5)
   - FMDB/standard (2.7.5)
+  - Folly (2018.10.22.00):
+    - boost-for-react-native
+    - DoubleConversion
+    - Folly/Default (= 2018.10.22.00)
+    - glog
+  - Folly/Default (2018.10.22.00):
+    - boost-for-react-native
+    - DoubleConversion
+    - glog
+  - glog (0.3.5)
   - HMSegmentedControl (1.5.5)
-  - IQKeyboardManager (6.3.0)
+  - IQKeyboardManager (6.4.0)
   - Masonry (1.1.0)
-  - MJExtension (3.0.17)
+  - MJExtension (3.0.10)
   - MJRefresh (3.2.0)
   - pop (1.0.12)
+  - React (0.60.3):
+    - React-Core (= 0.60.3)
+    - React-DevSupport (= 0.60.3)
+    - React-RCTActionSheet (= 0.60.3)
+    - React-RCTAnimation (= 0.60.3)
+    - React-RCTBlob (= 0.60.3)
+    - React-RCTImage (= 0.60.3)
+    - React-RCTLinking (= 0.60.3)
+    - React-RCTNetwork (= 0.60.3)
+    - React-RCTSettings (= 0.60.3)
+    - React-RCTText (= 0.60.3)
+    - React-RCTVibration (= 0.60.3)
+    - React-RCTWebSocket (= 0.60.3)
+  - React-Core (0.60.3):
+    - Folly (= 2018.10.22.00)
+    - React-cxxreact (= 0.60.3)
+    - React-jsiexecutor (= 0.60.3)
+    - yoga (= 0.60.3.React)
+  - React-cxxreact (0.60.3):
+    - boost-for-react-native (= 1.63.0)
+    - DoubleConversion
+    - Folly (= 2018.10.22.00)
+    - glog
+    - React-jsinspector (= 0.60.3)
+  - React-DevSupport (0.60.3):
+    - React-Core (= 0.60.3)
+    - React-RCTWebSocket (= 0.60.3)
+  - React-fishhook (0.60.3)
+  - React-jsi (0.60.3):
+    - boost-for-react-native (= 1.63.0)
+    - DoubleConversion
+    - Folly (= 2018.10.22.00)
+    - glog
+    - React-jsi/Default (= 0.60.3)
+  - React-jsi/Default (0.60.3):
+    - boost-for-react-native (= 1.63.0)
+    - DoubleConversion
+    - Folly (= 2018.10.22.00)
+    - glog
+  - React-jsiexecutor (0.60.3):
+    - DoubleConversion
+    - Folly (= 2018.10.22.00)
+    - glog
+    - React-cxxreact (= 0.60.3)
+    - React-jsi (= 0.60.3)
+  - React-jsinspector (0.60.3)
+  - React-RCTActionSheet (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTAnimation (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTBlob (0.60.3):
+    - React-Core (= 0.60.3)
+    - React-RCTNetwork (= 0.60.3)
+    - React-RCTWebSocket (= 0.60.3)
+  - React-RCTImage (0.60.3):
+    - React-Core (= 0.60.3)
+    - React-RCTNetwork (= 0.60.3)
+  - React-RCTLinking (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTNetwork (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTSettings (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTText (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTVibration (0.60.3):
+    - React-Core (= 0.60.3)
+  - React-RCTWebSocket (0.60.3):
+    - React-Core (= 0.60.3)
+    - React-fishhook (= 0.60.3)
   - ReactiveObjC (3.1.1)
   - SDWebImage (4.4.6):
     - SDWebImage/Core (= 4.4.6)
   - SDWebImage/Core (4.4.6)
   - SVProgressHUD (2.2.5)
-  - TZImagePickerController (3.2.0)
+  - TZImagePickerController (3.2.1)
   - WechatOpenSDK (1.8.4)
+  - yoga (0.60.3.React)
 
 DEPENDENCIES:
   - AFNetworking
   - AliPay
   - Bugtags
+  - DoubleConversion (from `./UU_RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
   - EGOCache
   - FMDB
+  - Folly (from `./UU_RN/node_modules/react-native/third-party-podspecs/Folly.podspec`)
+  - glog (from `./UU_RN/node_modules/react-native/third-party-podspecs/glog.podspec`)
   - HMSegmentedControl
   - IQKeyboardManager
   - Masonry
-  - MJExtension
+  - MJExtension (= 3.0.10)
   - MJRefresh
   - pop
+  - React (from `./UU_RN/node_modules/react-native/`)
+  - React-Core (from `./UU_RN/node_modules/react-native/React`)
+  - React-cxxreact (from `./UU_RN/node_modules/react-native/ReactCommon/cxxreact`)
+  - React-DevSupport (from `./UU_RN/node_modules/react-native/React`)
+  - React-fishhook (from `./UU_RN/node_modules/react-native/Libraries/fishhook`)
+  - React-jsi (from `./UU_RN/node_modules/react-native/ReactCommon/jsi`)
+  - React-jsiexecutor (from `./UU_RN/node_modules/react-native/ReactCommon/jsiexecutor`)
+  - React-jsinspector (from `./UU_RN/node_modules/react-native/ReactCommon/jsinspector`)
+  - React-RCTActionSheet (from `./UU_RN/node_modules/react-native/Libraries/ActionSheetIOS`)
+  - React-RCTAnimation (from `./UU_RN/node_modules/react-native/Libraries/NativeAnimation`)
+  - React-RCTBlob (from `./UU_RN/node_modules/react-native/Libraries/Blob`)
+  - React-RCTImage (from `./UU_RN/node_modules/react-native/Libraries/Image`)
+  - React-RCTLinking (from `./UU_RN/node_modules/react-native/Libraries/LinkingIOS`)
+  - React-RCTNetwork (from `./UU_RN/node_modules/react-native/Libraries/Network`)
+  - React-RCTSettings (from `./UU_RN/node_modules/react-native/Libraries/Settings`)
+  - React-RCTText (from `./UU_RN/node_modules/react-native/Libraries/Text`)
+  - React-RCTVibration (from `./UU_RN/node_modules/react-native/Libraries/Vibration`)
+  - React-RCTWebSocket (from `./UU_RN/node_modules/react-native/Libraries/WebSocket`)
   - ReactiveObjC
   - SDWebImage (= 4.4.6)
   - SVProgressHUD
   - TZImagePickerController
   - WechatOpenSDK
+  - yoga (from `./UU_RN/node_modules/react-native/ReactCommon/yoga`)
 
 SPEC REPOS:
   https://github.com/cocoapods/specs.git:
     - AFNetworking
     - AliPay
+    - boost-for-react-native
     - Bugtags
     - EGOCache
     - FMDB
@@ -73,24 +179,93 @@ SPEC REPOS:
     - TZImagePickerController
     - WechatOpenSDK
 
+EXTERNAL SOURCES:
+  DoubleConversion:
+    :podspec: "./UU_RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
+  Folly:
+    :podspec: "./UU_RN/node_modules/react-native/third-party-podspecs/Folly.podspec"
+  glog:
+    :podspec: "./UU_RN/node_modules/react-native/third-party-podspecs/glog.podspec"
+  React:
+    :path: "./UU_RN/node_modules/react-native/"
+  React-Core:
+    :path: "./UU_RN/node_modules/react-native/React"
+  React-cxxreact:
+    :path: "./UU_RN/node_modules/react-native/ReactCommon/cxxreact"
+  React-DevSupport:
+    :path: "./UU_RN/node_modules/react-native/React"
+  React-fishhook:
+    :path: "./UU_RN/node_modules/react-native/Libraries/fishhook"
+  React-jsi:
+    :path: "./UU_RN/node_modules/react-native/ReactCommon/jsi"
+  React-jsiexecutor:
+    :path: "./UU_RN/node_modules/react-native/ReactCommon/jsiexecutor"
+  React-jsinspector:
+    :path: "./UU_RN/node_modules/react-native/ReactCommon/jsinspector"
+  React-RCTActionSheet:
+    :path: "./UU_RN/node_modules/react-native/Libraries/ActionSheetIOS"
+  React-RCTAnimation:
+    :path: "./UU_RN/node_modules/react-native/Libraries/NativeAnimation"
+  React-RCTBlob:
+    :path: "./UU_RN/node_modules/react-native/Libraries/Blob"
+  React-RCTImage:
+    :path: "./UU_RN/node_modules/react-native/Libraries/Image"
+  React-RCTLinking:
+    :path: "./UU_RN/node_modules/react-native/Libraries/LinkingIOS"
+  React-RCTNetwork:
+    :path: "./UU_RN/node_modules/react-native/Libraries/Network"
+  React-RCTSettings:
+    :path: "./UU_RN/node_modules/react-native/Libraries/Settings"
+  React-RCTText:
+    :path: "./UU_RN/node_modules/react-native/Libraries/Text"
+  React-RCTVibration:
+    :path: "./UU_RN/node_modules/react-native/Libraries/Vibration"
+  React-RCTWebSocket:
+    :path: "./UU_RN/node_modules/react-native/Libraries/WebSocket"
+  yoga:
+    :path: "./UU_RN/node_modules/react-native/ReactCommon/yoga"
+
 SPEC CHECKSUMS:
   AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
   AliPay: 2bd35a4e486d2a8c035043023cd846e886bb21d1
-  Bugtags: 3a70c73c3415938f842556d8d9f9dcf592ccfd86
+  boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
+  Bugtags: 3ea74dc1a2a0a24989c2243ab2e075bf60b48d56
+  DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
   EGOCache: 191fd213da6804d487b49b1a91772ba904f3e324
   FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+  Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
+  glog: 1f3da668190260b06b429bb211bfbee5cd790c28
   HMSegmentedControl: f514c6dad47aa3065e0ed2e8046b73efc71221b9
-  IQKeyboardManager: 2ca9d64893247556f53523dcd8d78641f0ba7c23
+  IQKeyboardManager: fcef267266379c003181fc3592f6bdb8bf4db839
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
-  MJExtension: 74ec83124a68891619fb7ba9c5c811bbf1691076
+  MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
   MJRefresh: ed450d6eb9d3346a2cb033ab7eb6de090aeef437
   pop: d582054913807fd11fd50bfe6a539d91c7e1a55a
+  React: c438ccc7e14e86d4702bb92d7e262f549ffaa995
+  React-Core: c76495f5c14e73c0f803b89c3fa83f804da61bd6
+  React-cxxreact: f64bc64cf4682d6ea5a064f6017da72482858682
+  React-DevSupport: 30336bca00f72681eac995d21a31b963e7d5cfec
+  React-fishhook: 73dc8058ca42828cc92e8fbba6cd9571100e10ca
+  React-jsi: 40f467ff088c811c6630acccb4aea57ea7ccb1b5
+  React-jsiexecutor: e4b4717060a0cd8d0270323b5655a68c95432efd
+  React-jsinspector: 044105eea064aec81adc5e4d777a8f6589e7d094
+  React-RCTActionSheet: 08864c609d9f959abf3d51fdd93f8bc6e91f21eb
+  React-RCTAnimation: a4547e9fac2627ded3df9d302f5558b475faf819
+  React-RCTBlob: 62d5c263a2adb8f7a2cafd601beba18a2d99cbbb
+  React-RCTImage: 963859de2b05d2037d1b7842cdbddc8d7f3a2f3b
+  React-RCTLinking: 5998a7db9a6156ed112b006d01f76b2d1cc83d98
+  React-RCTNetwork: 0b676e8194f3f893db813007d37e37e9820173a3
+  React-RCTSettings: fdd7606f1b6050eced69fc6046d5db6768aefd57
+  React-RCTText: 36c0532feb5521cb295ba80e7e44b70cf1c36fc7
+  React-RCTVibration: dabb8d59bb47e1d9124b3f77bfdc1b33d42b0a74
+  React-RCTWebSocket: f32b93e0953d7c07fd5dd45305406282cfdc95cf
   ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
   SDWebImage: 3f3f0c02f09798048c47a5ed0a13f17b063572d8
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
-  TZImagePickerController: 7850b158d025065b162a1a963d445040b828abc9
+  TZImagePickerController: bf4c57b98d8707fce41ea6be872414a71c7a8c9d
   WechatOpenSDK: 9b721089507c895d05f997408c30bb6e6f5f9b60
+  yoga: 88c514f310aff89b94a14c5fbf44b95735af0cb7
 
-PODFILE CHECKSUM: 35f8891469791b77021a3108626cac09b8c84acb
+PODFILE CHECKSUM: 842830fffd26ca4ae347913fe0ee18bbd2e2bbc7
 
 COCOAPODS: 1.5.2

+ 46 - 0
shiku_im/shiku_im.xcodeproj/project.pbxproj

@@ -1451,6 +1451,7 @@
 		99A6655B21192EA5007A858D /* UASPreView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99A6655A21192EA5007A858D /* UASPreView.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
 		99AE8CE321474907006D9FEB /* UASClientMaAccountCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 99AE8CE221474907006D9FEB /* UASClientMaAccountCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
 		99AE981F2182E11C0028B05A /* Workdata_Add.json in Resources */ = {isa = PBXBuildFile; fileRef = 99AE981E2182E11C0028B05A /* Workdata_Add.json */; };
+		99B02AE322EED6660014A144 /* YRReactVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B02AE122EED6650014A144 /* YRReactVC.m */; };
 		99B34858212A6F2400CE6332 /* UASScheduleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B34857212A6F2400CE6332 /* UASScheduleCell.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
 		99B3485B212A8E5A00CE6332 /* UASScheduleModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B3485A212A8E5A00CE6332 /* UASScheduleModel.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
 		99B3485E212A9A9C00CE6332 /* UASAddCircleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B3485D212A9A9C00CE6332 /* UASAddCircleView.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
@@ -5105,6 +5106,8 @@
 		99AE8CE121474907006D9FEB /* UASClientMaAccountCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UASClientMaAccountCell.h; sourceTree = "<group>"; };
 		99AE8CE221474907006D9FEB /* UASClientMaAccountCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UASClientMaAccountCell.m; sourceTree = "<group>"; };
 		99AE981E2182E11C0028B05A /* Workdata_Add.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Workdata_Add.json; sourceTree = "<group>"; };
+		99B02AE022EED6650014A144 /* YRReactVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YRReactVC.h; sourceTree = "<group>"; };
+		99B02AE122EED6650014A144 /* YRReactVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YRReactVC.m; sourceTree = "<group>"; };
 		99B34856212A6F2400CE6332 /* UASScheduleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UASScheduleCell.h; sourceTree = "<group>"; };
 		99B34857212A6F2400CE6332 /* UASScheduleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UASScheduleCell.m; sourceTree = "<group>"; };
 		99B34859212A8E5A00CE6332 /* UASScheduleModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UASScheduleModel.h; sourceTree = "<group>"; };
@@ -12030,6 +12033,47 @@
 			name = Frameworks;
 			sourceTree = "<group>";
 		};
+		99B02ADC22EED6650014A144 /* RN */ = {
+			isa = PBXGroup;
+			children = (
+				99B02ADD22EED6650014A144 /* Others */,
+				99B02ADE22EED6650014A144 /* Models */,
+				99B02ADF22EED6650014A144 /* Controllers */,
+				99B02AE222EED6650014A144 /* Views */,
+			);
+			path = RN;
+			sourceTree = "<group>";
+		};
+		99B02ADD22EED6650014A144 /* Others */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Others;
+			sourceTree = "<group>";
+		};
+		99B02ADE22EED6650014A144 /* Models */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Models;
+			sourceTree = "<group>";
+		};
+		99B02ADF22EED6650014A144 /* Controllers */ = {
+			isa = PBXGroup;
+			children = (
+				99B02AE022EED6650014A144 /* YRReactVC.h */,
+				99B02AE122EED6650014A144 /* YRReactVC.m */,
+			);
+			path = Controllers;
+			sourceTree = "<group>";
+		};
+		99B02AE222EED6650014A144 /* Views */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Views;
+			sourceTree = "<group>";
+		};
 		99C399A62146450D004D3306 /* Others */ = {
 			isa = PBXGroup;
 			children = (
@@ -16221,6 +16265,7 @@
 		CCE23E8C18FFB8EA00A3CB5A /* shiku_im */ = {
 			isa = PBXGroup;
 			children = (
+				99B02ADC22EED6650014A144 /* RN */,
 				4DE8427D1E94C6DE00D20EA2 /* Main(主文件) */,
 				A75FA3761C72F55F004B2D32 /* LoginUAS(登陆) */,
 				A7D56A241C76E66D00DAACEE /* MessageList(消息) */,
@@ -19419,6 +19464,7 @@
 				CC1D1924195455710029F7FD /* JXTextView.m in Sources */,
 				CCE2415B18FFB8EB00A3CB5A /* VoiceConverter.mm in Sources */,
 				7D305E7D1E320E530045D753 /* JLHeightSettingModel.m in Sources */,
+				99B02AE322EED6660014A144 /* YRReactVC.m in Sources */,
 				7DE27D2C20134F0700BE1E3B /* LYYPubicWaitquoteVC.m in Sources */,
 				273F3F261D373A2A00160ECE /* DataAnalysisVC.m in Sources */,
 				276BDE9A20A1770E00C1DB57 /* ForgetPwToEmailVC.m in Sources */,

+ 6 - 0
shiku_im/shiku_im/AppDelegate.mm

@@ -366,6 +366,12 @@
     @weakify(self)
     self.adView.loadCompleted = ^{
 
+        UIViewController *RN = [NSClassFromString(@"YRReactVC") new];
+        
+        self.window.rootViewController = RN;
+        
+        return;
+        
         @strongify(self)
         
         NSString *lastVersion = [[NSUserDefaults standardUserDefaults] objectForKey:@"theLastVersion"];

+ 16 - 0
shiku_im/shiku_im/RN/Controllers/YRReactVC.h

@@ -0,0 +1,16 @@
+//
+//  YRReactVC.h
+//  shiku_im
+//
+//  Created by liujl on 2019/7/29.
+//
+
+#import "UASBaseVC.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface YRReactVC : UASBaseVC
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 36 - 0
shiku_im/shiku_im/RN/Controllers/YRReactVC.m

@@ -0,0 +1,36 @@
+//
+//  YRReactVC.m
+//  shiku_im
+//
+//  Created by liujl on 2019/7/29.
+//
+
+#import "YRReactVC.h"
+#import <React/RCTRootView.h>
+#import <React/RCTBundleURLProvider.h>
+
+@interface YRReactVC ()
+
+@end
+
+@implementation YRReactVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+
+    
+
+    NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
+
+    RCTRootView * rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"UU_RN"
+                                                          initialProperties:@{@"UU":@"UU_RN"}
+                                                              launchOptions:nil];
+    
+    self.view = rootView;
+    
+}
+
+
+
+@end