-
+
diff --git a/_site/ios/tutorial.html b/_site/ios/tutorial.html
index 859b5742..cde5ebb0 100644
--- a/_site/ios/tutorial.html
+++ b/_site/ios/tutorial.html
@@ -7,7 +7,7 @@
iOS SDK Tutorial (Pre-release) | Blockstack
-
+
@@ -17,9 +17,9 @@
-
+
+{"url":"https://docs.blockstack.org/ios/tutorial.html","headline":"iOS SDK Tutorial (Pre-release)","dateModified":"2018-10-22T10:20:43-07:00","datePublished":"2018-10-22T10:20:43-07:00","author":{"@type":"Person","name":"Blockstack"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/ios/tutorial.html"},"description":"iOS SDK Tutorial (Pre-release)","@type":"BlogPosting","@context":"http://schema.org"}
@@ -195,13 +195,13 @@
-
+
Edit this page on Github
- w Oct 17, 2018
+ w Oct 22, 2018
@@ -292,9 +292,10 @@ Depending on your network connection, this can take between 15-30 minutes.
Before you begin, verify you have installed
npm
using the
which
command to
verify.
-
$ which npm
+$ which npm
/usr/local/bin/npm
-
+
+
If you don’t find npm
in your system, install
it .
@@ -310,14 +311,16 @@ use libraries from the community in your project.
incapability between Cocoapods and XCode. Before starting the tutorial, confirm
you have installed CocoaPods.
-
$ pod --version
+$ pod --version
1.6.0.beta.1
-
+
+
If you don’t have the CocoaPods beta version, install it:
-
sudo gem install cocoapods -v 1.6.0.beta.1
-
+
sudo gem install cocoapods -v 1.6.0.beta.1
+
+
Use npm to install Yeoman and the Blockstack App Generator
@@ -329,14 +332,16 @@ existing projects.
Install Yeoman.
-
+
Install the Blockstack application generator.
- npm install -g generator-blockstack
-
+ npm install -g generator-blockstack
+
+
Build the Blockstack hello-world
@@ -353,24 +358,27 @@ modify the
hello-world
to interact with t
Create a hello-blockstack
directory.
-
+ mkdir hello-blockstack
+
+
Change into your new directory.
-
+
Use Yeoman and the Blockstack application generator to create your initial hello-blockstack
application.
-
+
You should see several interactive prompts.
- $ yo blockstack:react
+ $ yo blockstack:react
==========================================================================
We are constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time ?
@@ -379,8 +387,8 @@ modify the hello-world
to interact with t
_-----_ ╭──────────────────────────╮
| | │ Welcome to the │
- |--( o) -- | │ Blockstack app │
- ` --------- ´ │ generator! │
+ |--( o) --| │ Blockstack app │
+ ` ---------´ │ generator! │
( _´U` _ ) ╰──────────────────────────╯
/___A___\ /
| ~ |
@@ -388,26 +396,28 @@ modify the hello-world
to interact with t
´ ` |° ´ Y `
? Are you ready to build a Blockstack app in React? ( Y/n)
-
+
+
Respond to the prompts to populate the initial app.
After the process completes successfully, you see a prompt similar to the following:
- [ fsevents] Success:
+ [ fsevents] Success:
"/Users/theuser/repos/hello-blockstack/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"
is installed via remote npm notice created a lockfile as package-lock.json.
You should commit this file. added 1060 packages in 26.901s
-
+
+
Run the initial application.
- npm start
+ npm start
- > hello-blockstack@0.0.0 start /Users/moxiegirl/repos/hello-blockstack
- > webpack-dev-server
+ > hello-blockstack@0.0.0 start /Users/moxiegirl/repos/hello-blockstack
+ > webpack-dev-server
Project is running at http://localhost:8080/
webpack output is served from /
@@ -424,7 +434,8 @@ modify the hello-world
to interact with t
[ 2] ( webpack) /buildin/global.js 509 bytes { 0} [ built]
[ 3] ( webpack) /buildin/module.js 517 bytes { 0} [ built]
webpack: Compiled successfully.
-
+
+
At this point, the browser is running a Blockstack server on your local host.
@@ -469,8 +480,9 @@ application directory.
Create a public
directory.
-
+
Use the touch
command to add a redirect endpoint to your application.
@@ -478,13 +490,14 @@ application directory.
This endpoint on the web version of your app will redirect iOS users back
to your mobile app.
- $ touch public/redirect.html
-
+ $ touch public/redirect.html
+
+
Open redirect.html
and add code to the endpoint.
- <!DOCTYPE html>
+ <!DOCTYPE html>
<html>
<head>
<title> Hello, Blockstack!</title>
@@ -500,7 +513,8 @@ to your mobile app.
<body>
</body>
</html>
-
+
+
Blockstack apps are identified by their domain names. The endpoint will
receive a get request with the query parameter authResponse=XXXX
and
@@ -564,14 +578,16 @@ lines after.
Navigate to and change directory into the root of your project directory.
- $ cd hello - blockstack - ios
-
+ $ cd hello - blockstack - ios
+
+
Create a Podfile.
-
+
The command creates a Podfile
in the directory.
@@ -579,7 +595,7 @@ lines after.
Add a line stating the Blockstack dependency.
- # Uncomment the next line to define a global platform for your project
+ # Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'hello-blockstack-ios' do
@@ -594,7 +610,8 @@ target 'hello-blockstack-ios' do
# Pods for testing
end
end
-
+
+
Save and close the Podfile
.
@@ -607,7 +624,7 @@ end
Initialize the project with Cocoapods.
- $ pod install
+ $ pod install
Analyzing dependencies
Downloading dependencies
Installing Blockstack (0.2.0)
@@ -620,18 +637,20 @@ end
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
[!] Automatically assigning platform `ios` with version `11.4` on target `hello-blockstack-ios` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
-
+
+
This command creates a number of files
Review the files that the pod
installation created:
- $ ls
- Podfile hello-blockstack-ios hello-blockstack-iosTests
+ $ ls
+Podfile hello-blockstack-ios hello-blockstack-iosTests
Podfile.lock hello-blockstack-ios.xcodeproj
Pods hello-blockstack-ios.xcworkspace
-
+
+
Start XCode and choose Open another project .
@@ -707,7 +726,7 @@ the user back to your iOS app. In this example, you use <scenes>
element with the following:
- <scenes>
+ <scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
@@ -741,16 +760,18 @@ the user back to your iOS app. In this example, you use
+
+
Immediately after scenes but before the close of the </document>
tag add the following <resources>
.
- <resources>
+ <resources>
<image name= "Image" width= "64" height= "64" />
</resources>
</document>
-
+
+
Choose Run > Run app in the emulator.
@@ -777,7 +798,7 @@ functionality to your code.
Within the <viewController>
element, replace the existing <view>
subelement with the following:
- <view key= "view" contentMode= "scaleToFill" id= "8bC-Xf-vdC" >
+ <view key= "view" contentMode= "scaleToFill" id= "8bC-Xf-vdC" >
<rect key= "frame" x= "0.0" y= "0.0" width= "375" height= "667" />
<autoresizingMask key= "autoresizingMask" widthSizable= "YES" heightSizable= "YES" />
<subviews>
@@ -817,7 +838,8 @@ functionality to your code.
</constraints>
<viewLayoutGuide key= "safeArea" id= "6Tk-OE-BBY" />
</view>
-
+
+
@@ -849,19 +871,21 @@ functionality to your code.
When you are done, your ‘ViewController’ file contains the following variables:
-
class ViewController : UIViewController {
+ class ViewController : UIViewController {
@IBOutlet var nameLabel : UILabel !
@IBOutlet var signInButton : UIButton !
-
+
+
And XCode has added two outlines to the Main.storyboard
source.
-
<connections>
+ <connections>
<outlet property= "nameLabel" destination= "9eE-ZS-LU9" id= "Ahv-Te-ZZo" />
<outlet property= "signInButton" destination= "Lfp-KX-BDb" id= "yef-Jj-uPt" />
</connections>
-
+
+
Your connectors will have their own destination
and id
values.
@@ -885,17 +909,18 @@ this application in your mobile add for now. In XCode, do the following;
Add an import both for Blockstack
and for SafariServices
.
- import UIKit
+ import UIKit
import Blockstack
import SafariServices
-
+
+
Just before the didReceiveMemoryWarning
function a private updateUI()
function.
This function takes care of loading the user data from Blockstack.
- private func updateUI () {
+ private func updateUI () {
DispatchQueue . main . async {
if Blockstack . shared . isSignedIn () {
// Read user profile data
@@ -913,7 +938,8 @@ this application in your mobile add for now. In XCode, do the following;
}
}
}
-
+
+
The function uses the Blockstack.shared.isSignedIn()
method to determine if
the user is already logged into Blockstack or not. It then uses the
@@ -923,12 +949,13 @@ the application display with the username.
Replace the content of the viewDidLoad()
function so that it calls this private function.
- override func viewDidLoad () {
+ override func viewDidLoad () {
super . viewDidLoad ()
// Do any additional setup after loading the view, typically from a nib.
self . updateUI ()
}
-
+
+
Create a ‘signIn()’ function that handles both sign in and out.
@@ -936,7 +963,7 @@ the application display with the username.
The function uses the Blockstack.shared.signIn()
and
Blockstack.shared.signOut()
methods to sign the user into the application.
- @IBAction func signIn ( _ sender : UIButton ) {
+ @IBAction func signIn ( _ sender : UIButton ) {
if Blockstack . shared . isSignedIn () {
print ( "Currently signed in so signing out." )
Blockstack . shared . signOut ()
@@ -959,7 +986,8 @@ the application display with the username.
}
}
-
+
+
diff --git a/_site/news/index.html b/_site/news/index.html
index 1f633457..344e46f8 100644
--- a/_site/news/index.html
+++ b/_site/news/index.html
@@ -7,7 +7,7 @@
News | Blockstack
-
+
@@ -17,7 +17,7 @@
+{"url":"https://docs.blockstack.org/news/","headline":"News","author":{"@type":"Person","name":"Blockstack"},"description":"Docs","@type":"WebPage","@context":"http://schema.org"}
diff --git a/_site/thanks/index.html b/_site/thanks/index.html
index 8fa6ae24..eaa1eaa2 100644
--- a/_site/thanks/index.html
+++ b/_site/thanks/index.html
@@ -7,7 +7,7 @@
Thanks | Blockstack
-
+
@@ -17,7 +17,7 @@
+{"url":"https://docs.blockstack.org/thanks/","headline":"Thanks","author":{"@type":"Person","name":"Blockstack"},"description":"Docs","@type":"WebPage","@context":"http://schema.org"}
diff --git a/_storage/gaia_redirect.md b/_storage/gaia_redirect.md
new file mode 100644
index 00000000..95187481
--- /dev/null
+++ b/_storage/gaia_redirect.md
@@ -0,0 +1,5 @@
+---
+title: Storage with Gaia
+layout: externalurl
+redirect_url: https://github.com/blockstack/gaia
+---