Skip to content

Commit

Permalink
Fix a few compilation errors, new Textile ios dependency (#163)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Sutula <hi@asutula.com>
  • Loading branch information
asutula authored Dec 5, 2019
1 parent f670b2c commit 4e72076
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions ios/IpfsBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (dispatch_queue_t)methodQueue {
BOOL connected = [Textile.instance.ipfs swarmConnect:multiaddr error:&error];
if (!error) {
if (connected) {
resolve(true);
resolve(@true);
} else {
reject(@"EUNSPECIFIED", @"connect", nil);;
}
Expand All @@ -53,7 +53,7 @@ - (dispatch_queue_t)methodQueue {
RCT_EXPORT_METHOD(pubsubPub:(NSString*)topic data:(NSString*)data resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
NSError *error;
[Textile.instance.ipfs pubsubPub:topic data:data error:&error];
fulfillWithResult(true, error, resolve, reject);
fulfillWithResult(@true, error, resolve, reject);
}

RCT_EXPORT_METHOD(pubsubSub:(NSString*)topic resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
Expand All @@ -63,9 +63,8 @@ - (dispatch_queue_t)methodQueue {
}

RCT_EXPORT_METHOD(cancelPubsubSub:(NSString*)queryId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
NSError *error;
[Textile.instance.ipfs cancelPubsubSub:queryId error:&error];
fulfillWithResult(nil, error, resolve, reject);
[Textile.instance.ipfs cancelPubsubSub:queryId];
fulfillWithResult(nil, nil, resolve, reject);
}

@end
Expand Down
3 changes: 2 additions & 1 deletion ios/TextileEvents.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ @implementation TextileEvents
@"CONTACT_QUERY_RESULT",
@"SYNC_UPDATE",
@"SYNC_COMPLETE",
@"SYNC_FAILED"
@"SYNC_FAILED",
@"PUBSUB_QUERY_RESULT"
];
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@textile/react-native-sdk",
"version": "3.1.0",
"version": "3.1.1",
"description": "## Getting started",
"nativePackage": true,
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion textile-react-native-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.tvos.deployment_target = '9.0'

s.dependency 'React'
s.dependency 'Textile', '2.1.0'
s.dependency 'Textile', '2.1.1'

s.preserve_paths = 'README.md', 'LICENSE', 'package.json'
s.source_files = 'ios/**/*.{h,m}'
Expand Down

0 comments on commit 4e72076

Please # to comment.