1.0.7 • Published 7 years ago
lefit-react-native-bridge v1.0.7
lefit-react-native-bridge
support iOS only
supports react-native >= 0.50.0
Add it to your project
You can try linking the project automatically:
$ react-native link
or do it manually as described below:
iOS
- Run
npm install lefit-react-native-bridge --save
Then either:
Cocoapods
add the following line to your Podfile:
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport',
'RCTText',
'RCTImage',
'RCTNetwork',
'RCTActionSheet',
'RCTLinkingIOS',
'ART',
'RCTAnimation',
'RCTWebSocket',
'jschelpers_legacy',
'cxxreact_legacy',
'BatchedBridge'
]
pod "yoga", :path => '../node_modules/react-native/ReactCommon/yoga'
### 乐刻组件
pod 'LKMapThirdSDK'
pod 'LKReactNativeBridge/SourceCode', :path => '../node_modules/lefit-react-native-bridge'
or:
Manually
- Open your project in XCode, right click on
Libraries
and clickAdd Files to "Your Project Name"
Look undernode_modules/lefit-react-native-bridge
and addLKReactNativeBridge.xcodeproj
. - Add
libLKReactNativeBridge.a
toBuild Phases -> Link Binary With Libraries
- Click on
LKReactNativeBridge.xcodeproj
inLibraries
and go theBuild Settings
tab. Double click the text to the right ofHeader Search Paths
and verify that it has$(SRCROOT)/../react-native/React
- if it isn't, then add it. This is so XCode is able to find the headers that theLKReactNativeBridge
source files are referring to by pointing to the header files installed within thereact-native
node_modules
directory.