Skip to content

Commit 50ed93a

Browse files
ddhar-hwmalaw-hw
authored andcommitted
Release 1.0.0-beta04 (#156)
*Added support for Create Transfer Funds *Added support for Objective-C
1 parent 1d89019 commit 50ed93a

File tree

305 files changed

+23656
-1438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+23656
-1438
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,16 @@ playground.xcworkspace
5252
#
5353
# Add this line if you want to avoid checking in source code from Carthage dependencies.
5454
# Carthage/Checkouts
55+
Cartfile.resolved
5556
Carthage/
57+
# !/Carthage/Build/.Hippolyte.version
58+
# !/Carthage/Build/.swifter.version
59+
# !/Carthage/Build/iOS/Hippolyte.framework
60+
# !/Carthage/Build/iOS/Swifter.framework
61+
62+
# Fastlane
63+
fastlane/README.md
64+
fastlane/report.xml
65+
66+
# Gem
67+
Gemfile.lock

.slather.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ coverage_service: coveralls
22
xcodeproj: HyperwalletUISDK.xcodeproj
33
scheme: HyperwalletUISDK
44
ignore:
5-
- Tests/*
65
- UITests/*
76
- Demo/*
8-
- Sources/Resources/*
9-
- Sources/Extensions/*
10-
- Sources/Generics/*
11-
- Sources/Localization/*
12-
- Sources/Helper/*
13-
- Sources/View/*
14-
- Sources/TransferMethod/*Controller.swift
15-
- Sources/TransferMethod/*Cell.swift
16-
- Sources/TransferMethod/AddTransferMethodSectionData.swift
17-
- Sources/Receipt/*Controller.swift
18-
- Sources/Receipt/*Cell.swift
19-
- Sources/HyperwalletUI.swift
7+
- TransferMethod/Sources/AddTransferMethodSectionData.swift
8+
- "*/Sources/Resources/*"
9+
- "*/Sources/Localization/*"
10+
- "*/Sources/Helper/*"
11+
- "*/Sources/View/*"
12+
- "*/Sources/*Controller.swift"
13+
- "*/Sources/*Cell.swift"
14+
- "*/Sources/*HyperwalletUI.swift"
15+
- "*/Sources/Extensions/*"
16+
- "*/Tests/*"
17+
- "*/Sources/Helper/*"
18+
- "*/Sources/Coordinators/*"
19+
- Common/Sources/HyperwalletCoordinatorTypes.swift

.travis.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
language: swift
2-
osx_image: xcode10.2
2+
osx_image: xcode10.3
33
os: osx
44
branches:
55
only:
66
- /.*/
7-
# cache:
8-
# directories:
9-
# - Carthage
7+
cache:
8+
directories:
9+
- Carthage/Build/
1010
env:
1111
global:
1212
- LC_CTYPE=en_US.UTF-8
@@ -28,9 +28,11 @@ before_install:
2828
# List all emulator available
2929
- xcrun simctl list
3030
# Update the brew and build dependencies tools
31-
- brew outdated carthage || brew upgrade carthage
31+
# - brew outdated carthage || brew upgrade carthage
3232
- Carthage update --platform iOS --cache-builds
3333
- gem i slather
34+
# Install build output formatting tool
35+
- gem install xcpretty
3436
# Force to update the Swiftlint to the last stable version
3537
- brew outdated swiftlint || brew upgrade swiftlint
3638
# Print the booted emulator
@@ -48,11 +50,12 @@ script: |
4850
xcodebuild -enableCodeCoverage "$code_coverage" clean build test -project "$PROJECT" \
4951
-scheme "$scheme" \
5052
-destination "$destination" \
51-
-configuration "$configuration" ONLY_ACTIVE_ARCH="$only_active_arch" ENABLE_TESTABILITY=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
53+
-configuration "$configuration" ONLY_ACTIVE_ARCH="$only_active_arch" ENABLE_TESTABILITY=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \
54+
| xcpretty
5255
5356
# Lint - Add `--strict` to fail for warning and violation
54-
swiftlint lint --reporter json
57+
swiftlint lint --quiet --reporter json
5558
after_success:
5659
if [ "$code_coverage" == "YES" ]; then
5760
slather;
58-
fi
61+
fi

CHANGELOG.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
Changelog
22
=========
33

4-
[1.0.0-beta01](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta01)
4+
[1.0.0-beta04](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta04)
55
-------------------
6-
- Initial beta release of Hyperwallet UI SDK for iOS. This beta release has the following functionality:
7-
* UI components to create Bank Account and Bank Card for United States (USD)
8-
* UI components to list and deactivate accounts
9-
6+
- Added support for Create Transfer Funds
7+
- Added support for Objective-C
8+
9+
[1.0.0-beta03](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta03)
10+
-------------------
11+
- Enhancements to Add Transfer Method
12+
- Added support to the following:
13+
* List Prepaid Card Receipts
14+
* List User Receipts
1015

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

16-
17-
[1.0.0-beta03](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta03)
21+
[1.0.0-beta01](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta01)
1822
-------------------
19-
- Enhancements to Add Transfer Method
20-
- Added support to the following:
21-
* List Prepaid Card Receipts
22-
* List User Receipts
23+
- Initial beta release of Hyperwallet UI SDK for iOS. This beta release has the following functionality:
24+
* UI components to create Bank Account and Bank Card for United States (USD)
25+
* UI components to list and deactivate accounts

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta03"
1+
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta05"

Cartfile.private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "JanGorman/Hippolyte" "0.6.0"
1+
github "JanGorman/Hippolyte" "0.8.0"
22
github "httpswift/swifter" "1.4.6"

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "JanGorman/Hippolyte" "0.6.0"
1+
github "JanGorman/Hippolyte" "0.8.0"
22
github "httpswift/swifter" "1.4.6"
3-
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta03"
3+
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta05"

Common/Sources/Common.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright 2018 - Present Hyperwallet
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5+
// and associated documentation files (the "Software"), to deal in the Software without restriction,
6+
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
7+
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all copies or
11+
// substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
14+
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
19+
#import <UIKit/UIKit.h>
20+
21+
//! Project version number for Common.
22+
FOUNDATION_EXPORT double CommonVersionNumber;
23+
24+
//! Project version string for Common.
25+
FOUNDATION_EXPORT const unsigned char CommonVersionString[];
26+
27+
// In this header, you should import all the public headers of your framework using statements like #import <Common/PublicHeader.h>
28+
29+

Common/Sources/Extensions/Array.swift

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// Copyright 2018 - Present Hyperwallet
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5+
// and associated documentation files (the "Software"), to deal in the Software without restriction,
6+
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
7+
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all copies or
11+
// substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
14+
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
19+
import Foundation
20+
21+
/// The Array extension
22+
public extension Array {
23+
/// A Boolean value indicating whether the collection is not empty.
24+
var isNotEmpty: Bool {
25+
return !self.isEmpty
26+
}
27+
28+
/// Check if the current index is the last element in this array
29+
func isLast(index: Int) -> Bool {
30+
return index == endIndex - 1
31+
}
32+
33+
/// A safe way to check if element exists in this array
34+
///
35+
/// - Parameter index: the index of an element
36+
subscript(safe index: Index) -> Element? {
37+
return indices.contains(index) ? self[index] : nil
38+
}
39+
}

Common/Sources/Extensions/Date.swift

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
//
2+
// Copyright 2018 - Present Hyperwallet
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5+
// and associated documentation files (the "Software"), to deal in the Software without restriction,
6+
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
7+
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all copies or
11+
// substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
14+
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
19+
import Foundation
20+
21+
/// The Date extension
22+
public extension Date {
23+
/// The Date type format
24+
///
25+
/// - date: The yMMMd format
26+
/// - dateTime: The yMMMEdjm format
27+
enum DateFormatMode {
28+
/// - date: The yMMMd format
29+
case date
30+
/// - dateTime: The yMMMEdjm format
31+
case dateTime
32+
}
33+
34+
/// Formats date to string
35+
///
36+
/// - Parameter dateFormat: format of the date
37+
/// - Returns: formatted date in string
38+
func formatDateToString(dateFormat: String) -> String {
39+
let dateFormatter = DateFormatter()
40+
dateFormatter.dateFormat = dateFormat
41+
return dateFormatter.string(from: self)
42+
}
43+
44+
/// Returns 1st day of the month
45+
///
46+
/// - Returns: 1st day of the month
47+
func firstDayOfMonth() -> Date {
48+
let calendar = Calendar.current
49+
let components = calendar.dateComponents([.year, .month], from: self)
50+
return calendar.date(from: components)!
51+
}
52+
53+
/// Format date
54+
///
55+
/// - Parameter formatMode: format date/datetime
56+
/// - Returns: formatted date
57+
func format(for formatMode: DateFormatMode) -> String {
58+
switch formatMode {
59+
case .date:
60+
return Date.dateFormatterOnlyDate.string(from: self)
61+
62+
case .dateTime:
63+
return Date.dateFormatterDateAndTime.string(from: self)
64+
}
65+
}
66+
67+
private static let dateFormatterOnlyDate: DateFormatter = {
68+
let formatter = DateFormatter()
69+
formatter.setLocalizedDateFormatFromTemplate("yMMMd")
70+
formatter.formattingContext = .beginningOfSentence
71+
return formatter
72+
}()
73+
74+
private static let dateFormatterDateAndTime: DateFormatter = {
75+
let formatter = DateFormatter()
76+
formatter.setLocalizedDateFormatFromTemplate("yMMMEdjm")
77+
formatter.formattingContext = .beginningOfSentence
78+
return formatter
79+
}()
80+
}

0 commit comments

Comments
 (0)