Skip to content

Commit 64f2cf3

Browse files
committed
Add requiresMainQueueSetup, fixes #38
1 parent 4c81399 commit 64f2cf3

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

README.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,10 @@ A cross platform component for serving static assets with React Native.
77

88
`$ npm install react-native-static-server --save`
99

10-
### Mostly automatic installation
10+
### Installation
1111

1212
`$ react-native link react-native-static-server`
1313

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-
3914
## Usage
4015

4116
Declare the `StaticServer` with a port or use the default `0` to pick a random available port.

ios/FPStaticServer.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,10 @@ - (dispatch_queue_t)methodQueue
132132
}
133133
}
134134

135+
+ (BOOL)requiresMainQueueSetup
136+
{
137+
return YES;
138+
}
139+
135140
@end
136141

0 commit comments

Comments
 (0)