This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from 4alltecnologia/develop
Develop
- Loading branch information
Showing
94 changed files
with
3,489 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: objective-c | ||
osx_image: xcode10.2 | ||
xcode_project: UtilitiesCore.xcodeproj | ||
xcode_scheme: UtilitiesCore | ||
xcode_destination: platform=iOS Simulator,OS=12.2,name=iPhone X | ||
before_install: | ||
- brew install swiftlint | ||
- swiftlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# ios-utilities | ||
# ios-utilities [![swift version](https://img.shields.io/badge/swift-5-orange.svg)](https://swift.org) [![xcode version](https://img.shields.io/badge/Xcode-10.2-blue.svg)](https://developer.apple.com/xcode) [![carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) | ||
|
||
We are happy to announce the iOS Utilities Core, this framework comes to encapsulate all common code among the projects at 4All (https://4all.com) | ||
|
||
#[Documentation](https://github.com/4alltecnologia/ios-utilities/docs/index.html) | ||
#[Documentation](https://4alltecnologia.github.io/ios-utilities/) | ||
|
||
# Rules for contribution | ||
- All commits need to be 100% tested. | ||
- All comments and code must be in english. | ||
- Always create documentation in every function. (iOS default documentation) | ||
- All PRs need to have "develop" as target branch. | ||
- For a PR to be approved, it needs to have at least 2 developers approval and every discussion needs to be solved. | ||
- If you have a suggestion but no time to implement, please open an issue. Feel free to submit the solution to any open issue, always remember to assign yourself to the issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Decode+Extension.swift | ||
// UtilitiesCore | ||
// | ||
// Created by Felipe Dias Pereira on 13/06/19. | ||
// Copyright © 2019 4all. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension JSONDecoder.DateDecodingStrategy { | ||
static let customISO8601 = custom { | ||
let container = try $0.singleValueContainer() | ||
let string = try container.decode(String.self) | ||
if let date = Formatter.iso8601.date(from: string) ?? Formatter.iso8601noFS.date(from: string) { | ||
return date | ||
} | ||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "Invalid date: \(string)") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Encodable+Extensions.swift | ||
// UtilitiesCore | ||
// | ||
// Created by Felipe Dias Pereira on 13/06/19. | ||
// Copyright © 2019 4all. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension JSONEncoder.DateEncodingStrategy { | ||
static let customISO8601 = custom { | ||
var container = $1.singleValueContainer() | ||
try container.encode(Formatter.iso8601.string(from: $0)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.