1

尝试使用提供的文档安装 Hyperledger Indy。

当我尝试安装它时,我收到消息

[!] Error installing libindy-objc
[!] /usr/bin/curl -f -L -o /var/folders/fy/jxn6l3m16938_yg6gldn1c9w0000gn/T/d20191009-64232-45n38a/file.zip https://repo.sovrin.org/ios/libindy/stable/indy-objc/1.10.0/libindy-objc.zip --create-dirs --netrc-optional --retry 2
curl: (22) The requested URL returned error: 404 

如果我得到该 URL,则没有文件...如果我用...更新我的 pod

来源' https://github.com/hyperledger/indy-sdk.git '

target 'Koncordant' do
  pod 'libindy'
  pod 'libindy-objc' , '~> 1.8.2'
end

它将安装

4

1 回答 1

1
  1. 在 Podfile 中的“#platform”行正下方,复制粘贴下面的代码。

    source 'https://github.com/CocoaPods/Specs.git'
    source 'https://github.com/hyperledger/indy-sdk.git'
    
  2. 在“use_frameworks!”下方的“目标”内,复制粘贴到代码下方。

    pod 'libindy'
    pod 'libindy-objc', '~> 1.8.2'
    
  3. 从项目路径中的终端运行“pod install”。

  4. 打开“.xcworkspace”,而不是“.xcodeproj”。

  5. 在 xcode 中添加一个 swift 文件。Xcode 会自动提示输入“Bridging Header”,添加它(如果您的基础项目在 swift 中,则添加一个 obj-c 文件。我不知道这一步背后的原因,但否则会给出运行时错误)。

  6. 在要调用 Indy API 的文件中导入钱包标头。

    #import <Indy/Indy.h>
    
  7. 调用 Indy 方法。

    [[IndyWallet sharedInstance] createWallet...];
    
于 2020-03-19T16:49:47.097 回答