update website

This commit is contained in:
Travis CI
2015-05-18 01:45:44 +00:00
parent b145330cd9
commit 7cf0177b3b
+3 -3
View File
@@ -2,7 +2,7 @@
all those features would impact the binary size... But we still want to make it
easy to add these features whenever you need them.</p><p>With that in mind we exposed many of these features as independent static libraries.</p><p>For most of the libs it will be as simple as dragging two files, sometimes a third
step will be necessary, but no more than that.</p><p><em>All the libraries we ship with React Native live on the <code>Libraries</code> folder in
the root of the repository. Some of them are pure JavaScript, and you just need
the root of the repository. Some of them are pure JavaScript, and you only need
to <code>require</code> it. Other libraries also rely on some native code, in that case
you&#x27;ll have to add these files to your app, otherwise the app will throw an
error as soon as you try to use the library.</em></p><h2><a class="anchor" name="here-the-few-steps-to-link-your-libraries-that-contain-native-code"></a>Here the few steps to link your libraries that contain native code <a class="hash-link" href="#here-the-few-steps-to-link-your-libraries-that-contain-native-code">#</a></h2><h3><a class="anchor" name="step-1"></a>Step 1 <a class="hash-link" href="#step-1">#</a></h3><p>If the library has native code, there must be a <code>.xcodeproj</code> file inside it&#x27;s
@@ -10,8 +10,8 @@ folder.
Drag this file to your project on Xcode (usually under the <code>Libaries</code> group
on Xcode);</p><p><img src="/react-native/img/AddToLibraries.png" alt=""></p><h3><a class="anchor" name="step-2"></a>Step 2 <a class="hash-link" href="#step-2">#</a></h3><p>Click on your main project file (the one that represents the <code>.xcodeproj</code>)
select <code>Build Phases</code> and drag the static library from the <code>Products</code> folder
inside the Library you are importing to <code>Link Binary With Libraries</code></p><p><img src="/react-native/img/AddToBuildPhases.png" alt=""></p><h3><a class="anchor" name="step-3"></a>Step 3 <a class="hash-link" href="#step-3">#</a></h3><p>Not every library will need this step, what you need to consider is:</p><p><em>Do I need to know the contents of the library at compile time?</em></p><p>What that means is, are you using this library on the native site or just in
JavaScript? If you are just using it in JavaScript, you are good to go!</p><p>This step is not necessary for libraries that we ship with React Native with the
inside the Library you are importing to <code>Link Binary With Libraries</code></p><p><img src="/react-native/img/AddToBuildPhases.png" alt=""></p><h3><a class="anchor" name="step-3"></a>Step 3 <a class="hash-link" href="#step-3">#</a></h3><p>Not every library will need this step, what you need to consider is:</p><p><em>Do I need to know the contents of the library at compile time?</em></p><p>What that means is, are you using this library on the native side or only in
JavaScript? If you are only using it in JavaScript, you are good to go!</p><p>This step is not necessary for libraries that we ship with React Native with the
exception of <code>PushNotificationIOS</code> and <code>LinkingIOS</code>.</p><p>In the case of the <code>PushNotificationIOS</code> for example, you have to call a method
on the library from your <code>AppDelegate</code> every time a new push notifiation is
received.</p><p>For that we need to know the library&#x27;s headers. To achieve that you have to go