Skip to content

Commit 8027031

Browse files
Merge pull request #249 from matter-labs/baldyash/webview
Closes #202
2 parents 156d7b9 + 8e2c0ae commit 8027031

File tree

29 files changed

+69985
-8
lines changed

29 files changed

+69985
-8
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ playground.xcworkspace
4646
# you should judge for yourself, the pros and cons are mentioned at:
4747
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
4848
#
49-
#Pods/
49+
Pods/
50+
Example/web3swiftBrowser/Pods
5051

5152
# Carthage
5253
#

Example/web3swiftBrowser/Podfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
platform :ios, '12.0'
2+
3+
target 'web3swiftBrowser' do
4+
use_frameworks!
5+
pod 'web3swift', :path => '../../'
6+
end

Example/web3swiftBrowser/Podfile.lock

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
PODS:
2+
- BigInt (4.0.0)
3+
- CryptoSwift (1.0.0)
4+
- PromiseKit (6.8.5):
5+
- PromiseKit/CorePromise (= 6.8.5)
6+
- PromiseKit/Foundation (= 6.8.5)
7+
- PromiseKit/UIKit (= 6.8.5)
8+
- PromiseKit/CorePromise (6.8.5)
9+
- PromiseKit/Foundation (6.8.5):
10+
- PromiseKit/CorePromise
11+
- PromiseKit/UIKit (6.8.5):
12+
- PromiseKit/CorePromise
13+
- secp256k1.c (0.1.2)
14+
- Starscream (3.1.1)
15+
- web3swift (2.2.1):
16+
- BigInt (~> 4.0)
17+
- CryptoSwift (~> 1.0.0)
18+
- PromiseKit (~> 6.8.4)
19+
- secp256k1.c (~> 0.1)
20+
- Starscream (~> 3.1.0)
21+
22+
DEPENDENCIES:
23+
- web3swift (from `../../`)
24+
25+
SPEC REPOS:
26+
trunk:
27+
- BigInt
28+
- CryptoSwift
29+
- PromiseKit
30+
- secp256k1.c
31+
- Starscream
32+
33+
EXTERNAL SOURCES:
34+
web3swift:
35+
:path: "../../"
36+
37+
SPEC CHECKSUMS:
38+
BigInt: 2aad1a9942dc932ec8b84290d2c564a3d76f97ab
39+
CryptoSwift: d81eeaa59dc5a8d03720fe919a6fd07b51f7439f
40+
PromiseKit: 9616b0afef31eae56ab9ce044c8ec2b8612a15cd
41+
secp256k1.c: db47b726585d80f027423682eb369729e61b3b20
42+
Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0
43+
web3swift: 8e869c9b8748d8a7ef75e422993433d06701056f
44+
45+
PODFILE CHECKSUM: 0fdcb66c1e21400e017387d14550cd6ae5ef8aaa
46+
47+
COCOAPODS: 1.8.4

Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.pbxproj

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

Example/web3swiftBrowser/web3swiftBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/web3swiftBrowser/web3swiftBrowser.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
//
2+
// AppDelegate.swift
3+
// web3swiftBrowser
4+
//
5+
// Created by Alexander Vlasov on 07.01.2018.
6+
// Copyright © 2018 Alexander Vlasov. All rights reserved.
7+
//
8+
9+
import UIKit
10+
import CoreData
11+
12+
@UIApplicationMain
13+
class AppDelegate: UIResponder, UIApplicationDelegate {
14+
15+
var window: UIWindow?
16+
17+
18+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
19+
// Override point for customization after application launch.
20+
return true
21+
}
22+
23+
func applicationWillResignActive(_ application: UIApplication) {
24+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25+
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
26+
}
27+
28+
func applicationDidEnterBackground(_ application: UIApplication) {
29+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31+
}
32+
33+
func applicationWillEnterForeground(_ application: UIApplication) {
34+
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
35+
}
36+
37+
func applicationDidBecomeActive(_ application: UIApplication) {
38+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39+
}
40+
41+
func applicationWillTerminate(_ application: UIApplication) {
42+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43+
// Saves changes in the application's managed object context before the application terminates.
44+
self.saveContext()
45+
}
46+
47+
// MARK: - Core Data stack
48+
49+
lazy var persistentContainer: NSPersistentContainer = {
50+
/*
51+
The persistent container for the application. This implementation
52+
creates and returns a container, having loaded the store for the
53+
application to it. This property is optional since there are legitimate
54+
error conditions that could cause the creation of the store to fail.
55+
*/
56+
let container = NSPersistentContainer(name: "web3swiftBrowser")
57+
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
58+
if let error = error as NSError? {
59+
// Replace this implementation with code to handle the error appropriately.
60+
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
61+
62+
/*
63+
Typical reasons for an error here include:
64+
* The parent directory does not exist, cannot be created, or disallows writing.
65+
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
66+
* The device is out of space.
67+
* The store could not be migrated to the current model version.
68+
Check the error message to determine what the actual problem was.
69+
*/
70+
fatalError("Unresolved error \(error), \(error.userInfo)")
71+
}
72+
})
73+
return container
74+
}()
75+
76+
// MARK: - Core Data Saving support
77+
78+
func saveContext () {
79+
let context = persistentContainer.viewContext
80+
if context.hasChanges {
81+
do {
82+
try context.save()
83+
} catch {
84+
// Replace this implementation with code to handle the error appropriately.
85+
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
86+
let nserror = error as NSError
87+
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
88+
}
89+
}
90+
}
91+
92+
}
93+
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"size" : "29x29",
16+
"scale" : "2x"
17+
},
18+
{
19+
"idiom" : "iphone",
20+
"size" : "29x29",
21+
"scale" : "3x"
22+
},
23+
{
24+
"idiom" : "iphone",
25+
"size" : "40x40",
26+
"scale" : "2x"
27+
},
28+
{
29+
"idiom" : "iphone",
30+
"size" : "40x40",
31+
"scale" : "3x"
32+
},
33+
{
34+
"idiom" : "iphone",
35+
"size" : "60x60",
36+
"scale" : "2x"
37+
},
38+
{
39+
"idiom" : "iphone",
40+
"size" : "60x60",
41+
"scale" : "3x"
42+
},
43+
{
44+
"idiom" : "ipad",
45+
"size" : "20x20",
46+
"scale" : "1x"
47+
},
48+
{
49+
"idiom" : "ipad",
50+
"size" : "20x20",
51+
"scale" : "2x"
52+
},
53+
{
54+
"idiom" : "ipad",
55+
"size" : "29x29",
56+
"scale" : "1x"
57+
},
58+
{
59+
"idiom" : "ipad",
60+
"size" : "29x29",
61+
"scale" : "2x"
62+
},
63+
{
64+
"idiom" : "ipad",
65+
"size" : "40x40",
66+
"scale" : "1x"
67+
},
68+
{
69+
"idiom" : "ipad",
70+
"size" : "40x40",
71+
"scale" : "2x"
72+
},
73+
{
74+
"idiom" : "ipad",
75+
"size" : "76x76",
76+
"scale" : "1x"
77+
},
78+
{
79+
"idiom" : "ipad",
80+
"size" : "76x76",
81+
"scale" : "2x"
82+
},
83+
{
84+
"idiom" : "ipad",
85+
"size" : "83.5x83.5",
86+
"scale" : "2x"
87+
},
88+
{
89+
"idiom" : "ios-marketing",
90+
"size" : "1024x1024",
91+
"scale" : "1x"
92+
}
93+
],
94+
"info" : {
95+
"version" : 1,
96+
"author" : "xcode"
97+
}
98+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>

0 commit comments

Comments
 (0)