AbsaOSS / rn-indy-sdk

This code was starting point of https://github.com/hyperledger/indy-sdk-react-native where the work continues.
Apache License 2.0
11 stars 6 forks source link

build fails #9

Closed japrescott closed 3 years ago

japrescott commented 4 years ago

Hello, I am trying to setup your wrapper to do some tests on iOS. The instructions or prerequisites dont seem to be clear; when building/running npx react-native run-ios I get following errors; I am trying to build for iOS 10

/ssi-app/node_modules/rn-indy-sdk/ios/IndySdk.swift:23:57: error: use of undeclared type 'RCTPromiseResolveBlock'
                            resolver resolve: @escaping RCTPromiseResolveBlock,
                                                        ^~~~~~~~~~~~~~~~~~~~~~
/ssi-app/node_modules/rn-indy-sdk/ios/IndySdk.swift:24:56: error: use of undeclared type 'RCTPromiseRejectBlock'
                            rejecter reject: @escaping RCTPromiseRejectBlock) {
                                                       ^~~~~~~~~~~~~~~~~~~~~

** BUILD FAILED **

The following build commands failed:
    CompileSwift normal x86_64 /Users/jeremyprescott/Programming/ssi-app/masterdata/node_modules/rn-indy-sdk/ios/IndySdk.swift
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
japrescott commented 4 years ago

by adding

#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>

to the file rn-indy-sdk/ios/IndySdk-Bridging-Header.h is was able to successfully build. I am not sure if this is due to another issue in my setup so I wont make a PR, just leaving this here for anybody that stumbles over this issue

japrescott commented 4 years ago

hmm.. the app compiles but I get an error trying to call createWallet(..) -> ReferenceError: IndyBridge is not defined

jakubkoci commented 4 years ago

@japrescott That's because while creating this repo I wanted to rename IndyBridge to IndySdk but did it only partially, my bad. We need to rename it in both index.js and Java module. iOS expect the correct IndySdk name.

Regarding the missing import rn-indy-sdk/ios/IndySdk-Bridging-Header.h, it's probably bug and your PR would be welcome. Thanks for pointing it out.

jakubkoci commented 4 years ago

I've made a PR #10 with renaming.

jakubkoci commented 3 years ago

It should be solved by #10. This repo is being archived. Issues will be managed in the new repository indy-sdk-react-native.