Skip to content

Commit

Permalink
Release 1.0.0-beta04 (#156)
Browse files Browse the repository at this point in the history
*Added support for Create Transfer Funds
*Added support for Objective-C
  • Loading branch information
ddhar-hw authored and malaw-hw committed Oct 10, 2019
1 parent 1d89019 commit 50ed93a
Show file tree
Hide file tree
Showing 305 changed files with 23,656 additions and 1,438 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@ playground.xcworkspace
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Cartfile.resolved
Carthage/
# !/Carthage/Build/.Hippolyte.version
# !/Carthage/Build/.swifter.version
# !/Carthage/Build/iOS/Hippolyte.framework
# !/Carthage/Build/iOS/Swifter.framework

# Fastlane
fastlane/README.md
fastlane/report.xml

# Gem
Gemfile.lock
26 changes: 13 additions & 13 deletions .slather.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ coverage_service: coveralls
xcodeproj: HyperwalletUISDK.xcodeproj
scheme: HyperwalletUISDK
ignore:
- Tests/*
- UITests/*
- Demo/*
- Sources/Resources/*
- Sources/Extensions/*
- Sources/Generics/*
- Sources/Localization/*
- Sources/Helper/*
- Sources/View/*
- Sources/TransferMethod/*Controller.swift
- Sources/TransferMethod/*Cell.swift
- Sources/TransferMethod/AddTransferMethodSectionData.swift
- Sources/Receipt/*Controller.swift
- Sources/Receipt/*Cell.swift
- Sources/HyperwalletUI.swift
- TransferMethod/Sources/AddTransferMethodSectionData.swift
- "*/Sources/Resources/*"
- "*/Sources/Localization/*"
- "*/Sources/Helper/*"
- "*/Sources/View/*"
- "*/Sources/*Controller.swift"
- "*/Sources/*Cell.swift"
- "*/Sources/*HyperwalletUI.swift"
- "*/Sources/Extensions/*"
- "*/Tests/*"
- "*/Sources/Helper/*"
- "*/Sources/Coordinators/*"
- Common/Sources/HyperwalletCoordinatorTypes.swift
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: swift
osx_image: xcode10.2
osx_image: xcode10.3
os: osx
branches:
only:
- /.*/
# cache:
# directories:
# - Carthage
cache:
directories:
- Carthage/Build/
env:
global:
- LC_CTYPE=en_US.UTF-8
Expand All @@ -28,9 +28,11 @@ before_install:
# List all emulator available
- xcrun simctl list
# Update the brew and build dependencies tools
- brew outdated carthage || brew upgrade carthage
# - brew outdated carthage || brew upgrade carthage
- Carthage update --platform iOS --cache-builds
- gem i slather
# Install build output formatting tool
- gem install xcpretty
# Force to update the Swiftlint to the last stable version
- brew outdated swiftlint || brew upgrade swiftlint
# Print the booted emulator
Expand All @@ -48,11 +50,12 @@ script: |
xcodebuild -enableCodeCoverage "$code_coverage" clean build test -project "$PROJECT" \
-scheme "$scheme" \
-destination "$destination" \
-configuration "$configuration" ONLY_ACTIVE_ARCH="$only_active_arch" ENABLE_TESTABILITY=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
-configuration "$configuration" ONLY_ACTIVE_ARCH="$only_active_arch" ENABLE_TESTABILITY=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \
| xcpretty
# Lint - Add `--strict` to fail for warning and violation
swiftlint lint --reporter json
swiftlint lint --quiet --reporter json
after_success:
if [ "$code_coverage" == "YES" ]; then
slather;
fi
fi
25 changes: 14 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
Changelog
=========

[1.0.0-beta01](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta01)
[1.0.0-beta04](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta04)
-------------------
- Initial beta release of Hyperwallet UI SDK for iOS. This beta release has the following functionality:
* UI components to create Bank Account and Bank Card for United States (USD)
* UI components to list and deactivate accounts

- Added support for Create Transfer Funds
- Added support for Objective-C

[1.0.0-beta03](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta03)
-------------------
- Enhancements to Add Transfer Method
- Added support to the following:
* List Prepaid Card Receipts
* List User Receipts

[1.0.0-beta02](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta02)
-------------------
- Added PayPal as a Transfer method
- Defaulted in Transfer Method selection to country of User


[1.0.0-beta03](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta03)
[1.0.0-beta01](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta01)
-------------------
- Enhancements to Add Transfer Method
- Added support to the following:
* List Prepaid Card Receipts
* List User Receipts
- Initial beta release of Hyperwallet UI SDK for iOS. This beta release has the following functionality:
* UI components to create Bank Account and Bank Card for United States (USD)
* UI components to list and deactivate accounts
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta03"
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta05"
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "JanGorman/Hippolyte" "0.6.0"
github "JanGorman/Hippolyte" "0.8.0"
github "httpswift/swifter" "1.4.6"
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "JanGorman/Hippolyte" "0.6.0"
github "JanGorman/Hippolyte" "0.8.0"
github "httpswift/swifter" "1.4.6"
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta03"
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta05"
29 changes: 29 additions & 0 deletions Common/Sources/Common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// Copyright 2018 - Present Hyperwallet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#import <UIKit/UIKit.h>

//! Project version number for Common.
FOUNDATION_EXPORT double CommonVersionNumber;

//! Project version string for Common.
FOUNDATION_EXPORT const unsigned char CommonVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Common/PublicHeader.h>


39 changes: 39 additions & 0 deletions Common/Sources/Extensions/Array.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// Copyright 2018 - Present Hyperwallet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import Foundation

/// The Array extension
public extension Array {
/// A Boolean value indicating whether the collection is not empty.
var isNotEmpty: Bool {
return !self.isEmpty
}

/// Check if the current index is the last element in this array
func isLast(index: Int) -> Bool {
return index == endIndex - 1
}

/// A safe way to check if element exists in this array
///
/// - Parameter index: the index of an element
subscript(safe index: Index) -> Element? {
return indices.contains(index) ? self[index] : nil
}
}
80 changes: 80 additions & 0 deletions Common/Sources/Extensions/Date.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
//
// Copyright 2018 - Present Hyperwallet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import Foundation

/// The Date extension
public extension Date {
/// The Date type format
///
/// - date: The yMMMd format
/// - dateTime: The yMMMEdjm format
enum DateFormatMode {
/// - date: The yMMMd format
case date
/// - dateTime: The yMMMEdjm format
case dateTime
}

/// Formats date to string
///
/// - Parameter dateFormat: format of the date
/// - Returns: formatted date in string
func formatDateToString(dateFormat: String) -> String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = dateFormat
return dateFormatter.string(from: self)
}

/// Returns 1st day of the month
///
/// - Returns: 1st day of the month
func firstDayOfMonth() -> Date {
let calendar = Calendar.current
let components = calendar.dateComponents([.year, .month], from: self)
return calendar.date(from: components)!
}

/// Format date
///
/// - Parameter formatMode: format date/datetime
/// - Returns: formatted date
func format(for formatMode: DateFormatMode) -> String {
switch formatMode {
case .date:
return Date.dateFormatterOnlyDate.string(from: self)

case .dateTime:
return Date.dateFormatterDateAndTime.string(from: self)
}
}

private static let dateFormatterOnlyDate: DateFormatter = {
let formatter = DateFormatter()
formatter.setLocalizedDateFormatFromTemplate("yMMMd")
formatter.formattingContext = .beginningOfSentence
return formatter
}()

private static let dateFormatterDateAndTime: DateFormatter = {
let formatter = DateFormatter()
formatter.setLocalizedDateFormatFromTemplate("yMMMEdjm")
formatter.formattingContext = .beginningOfSentence
return formatter
}()
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import UIKit
import HyperwalletSDK

class GenericCell<ModelType>: UITableViewCell {
var item: ModelType!

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
extension HyperwalletCountry: GenericCellConfiguration {
public var title: String? {
return name
}

required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
public var value: String? {
return code
}
}
29 changes: 29 additions & 0 deletions Common/Sources/Extensions/HyperwalletCurrency.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// Copyright 2018 - Present Hyperwallet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import HyperwalletSDK

extension HyperwalletCurrency: GenericCellConfiguration {
public var title: String? {
return name
}

public var value: String? {
return code
}
}
Loading

0 comments on commit 50ed93a

Please sign in to comment.