Skip to content

Commit d0e60a2

Browse files
authored
Depend on android-textile (#75)
* Depend on android-textile to bring in mobile.aar, remove all traces of go-mobile * Version bump
1 parent b3e8b96 commit d0e60a2

File tree

8 files changed

+16
-117
lines changed

8 files changed

+16
-117
lines changed

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ repositories {
4949

5050
dependencies {
5151
implementation "com.facebook.react:react-native:+" // From node_modules
52-
api project(':mobile')
52+
implementation 'io.textile:textile:0.1.1'
5353
}
5454

5555
task wrapper(type: Wrapper) {

android/mobile/build.gradle

-2
This file was deleted.

android/settings.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
rootProject.name = 'RNTextile'
2-
include ':mobile'

config/DOCS_TEMPLATE.md

+4-26
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,14 @@ Installation
1111

1212
`react-native link @textile/react-native-sdk`
1313

14-
**Update Search Paths in iOS**
15-
16-
The library requires you to update two Search Paths in your iOS code to locate Textile's mobile framework (installed as a dependency of the React Native library).
17-
18-
Open your project's XCode file. Then, in XCode, navigate to the `Root file -> Build Settings` in the search bar enter, `Search Paths`. You'll see a group of three entries, we are going to edit two.
19-
20-
1. In `Framework search paths` add `$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios`
21-
2. In `Library search paths` add `$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios`
14+
Note: The iOS component of `@textile/react-native-sdk` should be installed using Cocoapods. `react-native-link` should do this correctly. More documentation coming here.
2215

2316
**Update Android Gradle**
2417

25-
Open your project and navigate to `android/settings.gradle`. At the end, you will add,
26-
27-
```
28-
include ':mobile'
29-
```
30-
31-
Navigate to `app/build.gradle`. Add to the end of the `dependencies {` section,
32-
33-
```
34-
api project(':mobile')
35-
```
36-
37-
Finally, inside the `android` folder, you need to create a new folder called, `mobile`.
38-
39-
Inside the newly created `mobile` folder, create a file called, `build.gradle` and for the contents of `build.gradle` enter,
18+
You'll need to add Textile's maven repository to your project `build.gradle`'s `allProjects.repositories` section:
4019

4120
```
42-
configurations.maybeCreate("default")
43-
artifacts.add("default", file('../../node_modules/@textile/go-mobile/dist/android/mobile.aar'))
21+
maven { url "https://dl.bintray.com/textile/maven" }
4422
```
4523

4624
**Other dependencies**
@@ -53,7 +31,7 @@ The Textile library also requires that your project has two other libraries inst
5331

5432
### Typescript Types
5533

56-
@textile/react-native-sdk is written in TypeScript and compiled to JavaScript. You can use either in your app.
34+
@textile/react-native-sdk is written in TypeScript and compiled to JavaScript. You can use either in your app.
5735

5836
#### Import Model Types
5937

ios/RNTextile.xcodeproj/project.pbxproj

+6-24
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,9 @@
209209
58B511F01A9E6C8500147676 /* Debug */ = {
210210
isa = XCBuildConfiguration;
211211
buildSettings = {
212-
FRAMEWORK_SEARCH_PATHS = (
213-
"$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios/**",
214-
"$(SRCROOT)/../../go-mobile/dist/ios/**",
215-
);
216-
HEADER_SEARCH_PATHS = (
217-
"$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios/**",
218-
"$(SRCROOT)/../../go-mobile/dist/ios/**",
219-
);
220-
LIBRARY_SEARCH_PATHS = (
221-
"$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios/**",
222-
"$(SRCROOT)/../../go-mobile/dist/ios/**",
223-
);
212+
FRAMEWORK_SEARCH_PATHS = "";
213+
HEADER_SEARCH_PATHS = "";
214+
LIBRARY_SEARCH_PATHS = "";
224215
OTHER_LDFLAGS = "-ObjC";
225216
PRODUCT_NAME = RNTextile;
226217
SKIP_INSTALL = YES;
@@ -230,18 +221,9 @@
230221
58B511F11A9E6C8500147676 /* Release */ = {
231222
isa = XCBuildConfiguration;
232223
buildSettings = {
233-
FRAMEWORK_SEARCH_PATHS = (
234-
"$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios/**",
235-
"$(SRCROOT)/../../go-mobile/dist/ios/**",
236-
);
237-
HEADER_SEARCH_PATHS = (
238-
"$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios/**",
239-
"$(SRCROOT)/../../go-mobile/dist/ios/**",
240-
);
241-
LIBRARY_SEARCH_PATHS = (
242-
"$(SRCROOT)/../node_modules/@textile/go-mobile/dist/ios/**",
243-
"$(SRCROOT)/../../go-mobile/dist/ios/**",
244-
);
224+
FRAMEWORK_SEARCH_PATHS = "";
225+
HEADER_SEARCH_PATHS = "";
226+
LIBRARY_SEARCH_PATHS = "";
245227
OTHER_LDFLAGS = "-ObjC";
246228
PRODUCT_NAME = RNTextile;
247229
SKIP_INSTALL = YES;

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@textile/react-native-sdk",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "## Getting started",
55
"nativePackage": true,
66
"main": "dist/index.js",
@@ -69,7 +69,7 @@
6969
"typescript": "^3.1.1"
7070
},
7171
"dependencies": {
72-
"@textile/go-mobile": "0.1.11",
72+
"@textile/js-types": "0.1.11",
7373
"buffer": "^5.2.1"
7474
},
7575
"directories": {

src/Textile/Models/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import pb from '@textile/go-mobile'
1+
import pb from '@textile/js-types'
22

33
export * from './SDK'
44
export { pb }

0 commit comments

Comments
 (0)