File tree Expand file tree Collapse file tree 2 files changed +6
-26
lines changed Expand file tree Collapse file tree 2 files changed +6
-26
lines changed Original file line number Diff line number Diff line change @@ -7,35 +7,10 @@ A cross platform component for serving static assets with React Native.
7
7
8
8
` $ npm install react-native-static-server --save `
9
9
10
- ### Mostly automatic installation
10
+ ### Installation
11
11
12
12
` $ react-native link react-native-static-server `
13
13
14
- ### Manual installation
15
-
16
-
17
- #### iOS
18
-
19
- 1 . In XCode, in the project navigator, right click ` Libraries ` ➜ ` Add Files to [your project's name] `
20
- 2 . Go to ` node_modules ` ➜ ` react-native-static-server ` and add ` FPStaticServer.xcodeproj `
21
- 3 . In XCode, in the project navigator, select your project. Add ` libFPStaticServer.a ` to your project's ` Build Phases ` ➜ ` Link Binary With Libraries `
22
- 4 . Run your project (` Cmd+R ` )<
23
-
24
- #### Android
25
-
26
- 1 . Open up ` android/app/src/main/java/[...]/MainActivity.java `
27
- - Add ` import com.futurepress.staticserver.FPStaticServerPackage; ` to the imports at the top of the file
28
- - Add ` new FPStaticServerPackage() ` to the list returned by the ` getPackages() ` method
29
- 2 . Append the following lines to ` android/settings.gradle ` :
30
- ```
31
- include ': react-native-static-server '
32
- project(': react-native-static-server ').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-static-server/android')
33
- ```
34
- 3 . Insert the following lines inside the dependencies block in ` android/app/build.gradle ` :
35
- ```
36
- compile project(': react-native-static-server ')
37
- ```
38
-
39
14
## Usage
40
15
41
16
Declare the ` StaticServer ` with a port or use the default ` 0 ` to pick a random available port.
Original file line number Diff line number Diff line change @@ -132,5 +132,10 @@ - (dispatch_queue_t)methodQueue
132
132
}
133
133
}
134
134
135
+ + (BOOL )requiresMainQueueSetup
136
+ {
137
+ return YES ;
138
+ }
139
+
135
140
@end
136
141
You can’t perform that action at this time.
0 commit comments