@@ -27,7 +27,7 @@ The `link` step will pull in the native dependency. If you are using
2727Android or expo you don't have to (or can't) run that step. In that case
2828we fall back automatically.
2929
30- Note that we only support ``react-native >= 0.41 `` at the moment and you
30+ Note that we only support ``react-native >= 0.38 `` at the moment and you
3131will have to make sure a recent version of :ref: `sentry-cli <sentry-cli >`
3232installed.
3333
@@ -104,6 +104,52 @@ Example:
104104 --bundle-output android.main.bundle \
105105 --sourcemap-output android.main.bundle.map
106106
107+ Setup With Cocoapods
108+ --------------------
109+
110+ In order to use Sentry with cocoapods you have to install the packages with
111+ ``npm `` or ``yarn `` and link them locally in your ``Podfile ``.
112+
113+ .. code-block :: bash
114+ npm install --save react react-native react-native-sentry
115+
116+ After that change your ``Podfile `` to reference to the packages in your
117+ ``node_modules `` folder.
118+
119+ .. code-block :: bash
120+ platform :ios, ' 8.0'
121+ use_frameworks!
122+
123+ node_modules_path = ' ./node_modules'
124+ react_path = File.join(node_modules_path, ' react-native' )
125+ yoga_path = File.join(react_path, ' ReactCommon/yoga' )
126+ sentry_path = File.join(node_modules_path, ' react-native-sentry' )
127+
128+ target ' YOUR-TARGET' do
129+ pod ' Yoga' , :path => yoga_path
130+ pod ' React' , :path => react_path, :subspecs => [
131+ ' Core' ,
132+ ' RCTImage' ,
133+ ' RCTNetwork' ,
134+ ' RCTText' ,
135+ ' RCTWebSocket' ,
136+ # Add any other subspecs you want to use in your project
137+ ]
138+ pod ' SentryReactNative' , :path => sentry_path
139+ end
140+
141+ post_install do | installer|
142+ installer.pods_project.build_configurations.each do | config|
143+ config.build_settings[' SWIFT_VERSION' ] = ' 3.0'
144+ config.build_settings[' ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' ] = ' YES'
145+ end
146+ end
147+
148+ After that run ``pod install `` which then should link everything correctly.
149+ If you need more information about how to load the react view check out
150+ `this tutorial.
151+ <https://facebook.github.io/react-native/releases/0.23/docs/embedded-app-ios.html> `_
152+
107153Client Configuration
108154--------------------
109155
0 commit comments