ios启动私有链查询区块信息
为什么80%的码农都做不了架构师?>>>
一、新建一个ios swift项目
二、下载并安装CocoaPods.app-1.5.2.tar.bz2
https://github.com/CocoaPods/CocoaPods-app/releases/download/1.5.2/CocoaPods.app-1.5.2.tar.bz2
三、通过pod安装geth插件
$ cd /Users/shijun/Desktop/iosWorkspace/BlockChain
$ pod init
生成Podfile文件,并修改内容
target 'BlockChain' do
pod 'Geth', '1.8.12' #加这行
use_frameworks!
target 'BlockChainTests' do
pod 'Geth', '1.8.12' #加这行
inherit! :search_paths
end
target 'BlockChainUITests' do
pod 'Geth', '1.8.12' #加这行
inherit! :search_paths
end
end
$ pod install
========================================
Analyzing dependencies
Downloading dependencies
Installing Geth (1.8.12)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `BlockChain.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
[!] Automatically assigning platform `ios` with version `11.4` on target `BlockChain` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
========================================
四、ios代码
创建新帐号
========================================
import Geth
let keyStorePath = "/Users/shijun/Desktop/blockChain/ethereum/private/data0/keystore"
print("keyStorePath: \(keyStorePath)")
let keyStoreManager = GethNewKeyStore(keyStorePath, GethLightScryptN, GethLightScryptP)
let account = try! keyStoreManager?.newAccount("password")
let address = account?.getAddress().getHex()
print("address: \(address!)")
let url = account?.getURL()
print("url: \(url!)")
========================================
四、问题汇总
1、真机build faile
解决:all + Combined ,搜索bitcode,enable bitcode讲yes修改为no
========================================
转载于:https://my.oschina.net/duojin/blog/1842946
ios启动私有链查询区块信息相关推荐
- 【iOS】通过bundleId查询应用信息
Constructing Searches Lookup Examples Understanding Search Results 根据 bundle ID 获取 App Store 的 App 信 ...
- 区块链,使用 Go-Ethereum 搭建以太坊私有链
1.什么是Ethereum(以太坊) 以太坊(Ethereum)并不是一个机构,而是一款能够在区块链上实现智能合约.开源的底层系统,以太坊从诞生到2017年5月,短短3年半时间,全球已有200多个以太 ...
- 创建启动geth私有链
一.二进制安装geth 1\下载安装geth(二进制包):wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux ...
- Ethereum Bootstrap 以太坊本地私有链开发环境搭建
通过本文所述方法和项目中的脚本,我们可以快速的搭建好自己的私链进行开发测试. 仓库中包含的工具有: 一个测试账户导入脚本,在首次部署时将五个测试账户私钥导入以太坊节点. 一个genesis.json配 ...
- 以太坊学习路线——(一)私有链搭建与基本操作
这篇博客演示的基本操作系统环境是CentOS 7,参考书籍:以太坊开发实战--以太坊关键技术与案例分析 第五章(吴寿鹤.冯翔.刘涛.周广益 著). 文章结构: 一.geth客户端安装 二.搭建一个 ...
- 以太坊钱包开发-下载、编译 go-ethereum,搭建 eth 私有链
下载 $ mkdir -p $GOPATH/src/github.com/ethereum $ cd $GOPATH/src/github.com/ethereum $ git clone https ...
- 以太坊搭建私有链(非常详细!!!)(一)
我的系统:CentOS7 64位 环境需要:Go 1.9以上版本 geth工具 WARN [11-04|09:34:47.411] System clock seems off by -10h15m4 ...
- 以太坊系列(二)---Ubuntu20.04安装以太坊开发环境并建立私有链
目录 安装版本说明 环境搭建 搭建以太坊 安装Nodejs 安装Solidity 安装Truffle 以太坊开发 安装版本说明 Ubuntu版本:20.04 Ethereum版本:1.10.1-sta ...
- docker 搭建以太坊私有链搭建
最近区块链,火得不行,身边也有朋友准备玩这个,说是搭了一个星期,没有把环境搭建起来,叫我帮忙看看环境怎么搭建 于是我找到了官方的地址 https://github.com/ethereum/go-et ...
最新文章
- 【Ping】unix - ping命令的退出状态
- 文件共享服务器连接数问题,共享服务器上连接数量的设置
- 流行的开源数据挖掘tool
- jzoj5701-[gdoi2018day2]谈笑风生【莫比乌斯反演,二分,最短路】
- java timezone_Java TimeZone getDSTSavings()方法与示例
- 【UI/UX】浅谈Spin框
- 通过Ajax异步请求数据
- Linq在路上(序)
- 木其工作室(专业程序代写服务)[转]学写块设备驱动(三)----踢开IO调度器,自己处理bio(下)...
- python用时间戳给文件命名规则_关于时间戳:python复制文件但保持原始
- 快速突破面试算法之字符串表篇
- 爱发php企业发卡网源码_企业级发卡平台源码,界面友好,支付通道齐全,运营级发卡平台源码...
- JavaScript(6):回调函数
- 搜狗高速浏览器主页被篡改怎么办 搜狗浏览器中恢复被篡改主页的方法
- 与机器对话,阿里达摩院挑战新一代人机对话技术
- Watching the English:英国社会阶层攀爬指南?
- 阿里云服务器的登录方法
- SLAM④----李群与李代数
- 勇者斗恶龙(The Dragon of Loowater, UVa 11292)
- 科技型中小企业认定标准