Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
xcode_project: chatExample/simpleChat.xcodeproj # path to your xcodeproj folder
xcode_scheme: simpleChat
xcode_project: chatExample/ETHRadar.xcodeproj # path to your xcodeproj folder
xcode_scheme: ETHRadar
osx_image: xcode8
script: xcodebuild -destination "platform=iOS Simulator,name=iPhone 6,OS=10.0" -scheme "simpleChat" -project "chatExample/simpleChat.xcodeproj" build test
script: xcodebuild -destination "platform=iOS Simulator,name=iPhone 7" -scheme "ETHRadar" -project "chatExample/ETHRadar.xcodeproj" build test
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# chatExample
[![Build Status](https://travis-ci.org/wolffan/chatExample.svg?branch=master)](https://travis-ci.org/wolffan/chatExample)
Example of a chat conversation UI
# ETHRadar
[![Build Status](https://travis-ci.org/wolffan/chatExample.svg?branch=argent)](https://travis-ci.org/wolffan/chatExample)
Example ETH and token Radar

No dependenceis are needed to run the project.
Tests will run with CMD+U
To Run UI tests, access the file and manually run tests, UI tests fail on command line execution
Overall architecture:

Router that handles all dependencies and controllers.
Controllers talk to extending Router methods in order to not have hidden dependencies between them
Cells have viewModel to abstract the presentation logic from Controller and Cell
Cell has viewModel to abstract the presentation logic from Controller and Cell
Data is fetched and injected through Repositories with different protocols so each class has only the data it needs.
Binary file added chatExample/.DS_Store
Binary file not shown.
Binary file added chatExample/Assets.xcassets/.DS_Store
Binary file not shown.
65 changes: 0 additions & 65 deletions chatExample/Assets.xcassets/AppIcon.appiconset/Contents.json

This file was deleted.

Binary file not shown.
Binary file not shown.
21 changes: 0 additions & 21 deletions chatExample/Assets.xcassets/icon.imageset/Contents.json

This file was deleted.

Binary file not shown.
22 changes: 0 additions & 22 deletions chatExample/Assets.xcassets/logout.imageset/Contents.json

This file was deleted.

Binary file not shown.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CD4D6AB21DBD1DA000643DBF"
BuildableName = "simpleChat.app"
BlueprintName = "simpleChat"
ReferencedContainer = "container:simpleChat.xcodeproj">
BuildableName = "ETHRadar.app"
BlueprintName = "ETHRadar"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -26,36 +26,57 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CD4D6AC61DBD1DA000643DBF"
BuildableName = "simpleChatTests.xctest"
BlueprintName = "simpleChatTests"
ReferencedContainer = "container:simpleChat.xcodeproj">
BlueprintIdentifier = "2D5C0F9620342B5C002D5140"
BuildableName = "ETHRadarTests.xctest"
BlueprintName = "ETHRadarTests"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CD4D6AD11DBD1DA000643DBF"
BuildableName = "simpleChatUITests.xctest"
BlueprintName = "simpleChatUITests"
ReferencedContainer = "container:simpleChat.xcodeproj">
BuildableName = "ETHRadarUITests.xctest"
BlueprintName = "ETHRadarUITests"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D5C0F9620342B5C002D5140"
BuildableName = "ETHRadarTests.xctest"
BlueprintName = "ETHRadarTests"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2DBC434020344314000F4558"
BuildableName = "ETHRadarTesting.xctest"
BlueprintName = "ETHRadarTesting"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CD4D6AB21DBD1DA000643DBF"
BuildableName = "simpleChat.app"
BlueprintName = "simpleChat"
ReferencedContainer = "container:simpleChat.xcodeproj">
BuildableName = "ETHRadar.app"
BlueprintName = "ETHRadar"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -65,6 +86,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -76,9 +98,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CD4D6AB21DBD1DA000643DBF"
BuildableName = "simpleChat.app"
BlueprintName = "simpleChat"
ReferencedContainer = "container:simpleChat.xcodeproj">
BuildableName = "ETHRadar.app"
BlueprintName = "ETHRadar"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
Expand All @@ -102,9 +124,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CD4D6AB21DBD1DA000643DBF"
BuildableName = "simpleChat.app"
BlueprintName = "simpleChat"
ReferencedContainer = "container:simpleChat.xcodeproj">
BuildableName = "ETHRadar.app"
BlueprintName = "ETHRadar"
ReferencedContainer = "container:ETHRadar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
File renamed without changes.
53 changes: 53 additions & 0 deletions chatExample/ETHRadar/Coins.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//
// Coins.swift
// ETHRadar
//
// Created by Raimon Lapuente Ferran on 14/02/2018.
// Copyright © 2018 Raimon Lapuente. All rights reserved.
//

import Foundation

// coins info

enum Coins: String {
case GNT
case REP
case OMG
case ETH

func fullName() -> String {
switch self {
case .GNT: return "Golem"
case .REP: return "Augur"
case .OMG: return "OmniseGo"
case .ETH: return "Ethereum"
}
}

func address() -> String {
switch self {
case .GNT: return "0xa74476443119A942dE498590Fe1f2454d7D4aC0d"
case .REP: return "0xe94327d07fc17907b4db788e5adf2ed424addff6"
case .OMG: return "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07"
case .ETH: return "0x082d3e0f04664b65127876e9A05e2183451c792a"
}
}

func rateString() -> String {
return self.rawValue+"_"+"eth"
}

func rateURL() -> String {
return "https://shapeshift.io/rate/\(self.rateString())"
}

func tokenURL() -> String {
switch self {
case .ETH:
return "https://api.etherscan.io/api?module=account&action=balance&address=\(self.address())&tag=latest&apikey=\(DataRepository.EtherscanAPIKey)"
default:
return "https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=\(self.address())&address=\(DataRepository.address)&tag=latest&apikey=\(DataRepository.EtherscanAPIKey)"
}
}
}
Loading