Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ceeyang swift5.0 (Build fixes). #501

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Ceeyang swift5.0 (Build fixes). #501

wants to merge 5 commits into from

Conversation

Khalian
Copy link
Collaborator

@Khalian Khalian commented May 12, 2019

Checklist

  • New Extension
  • New Test
  • Changed more than one extension, but all changes are related
  • Trivial change (doesn't require changelog)

@Khalian Khalian changed the title Ceeyang swift5.0 Ceeyang swift5.0 (Build fixes). May 12, 2019
@Khalian
Copy link
Collaborator Author

Khalian commented May 12, 2019

Related to #499, with fixes on the build.

@Khalian Khalian mentioned this pull request May 12, 2019
4 tasks
This was referenced May 13, 2019
@EZSwiftExtensionsBot
Copy link

EZSwiftExtensionsBot commented May 14, 2019

23 Errors
🚫 Please, modify only one extension per pull request.
🚫 EZSwiftExtensionsTests/BoolTests.swift#L22: ambiguous use of ‘toggle()’
value.toggle()
🚫 EZSwiftExtensionsTests/NSAttributedStringTests.swift#L33: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
XCTAssertEqual(newAttributesSeen[NSAttributedStringKey.font] as! UIFont, UIFont.boldSystemFont(ofSize: UIFont.systemFontSize))
🚫 EZSwiftExtensionsTests/NSAttributedStringTests.swift#L44: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
XCTAssertEqual(newAttributesSeen[NSAttributedStringKey.underlineStyle] as! Int, NSUnderlineStyle.styleSingle.rawValue)
🚫 EZSwiftExtensionsTests/NSAttributedStringTests.swift#L55: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
XCTAssertEqual(newAttributesSeen[NSAttributedStringKey.font] as! UIFont, UIFont.italicSystemFont(ofSize: UIFont.systemFontSize))
🚫 EZSwiftExtensionsTests/NSAttributedStringTests.swift#L62: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
XCTAssertEqual(newAttributesSeen[NSAttributedStringKey.strikethroughStyle] as! NSNumber, NSNumber(value: NSUnderlineStyle.styleSingle.rawValue as Int))
🚫 EZSwiftExtensionsTests/NSAttributedStringTests.swift#L74: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
XCTAssertEqual(newAttributesSeen[NSAttributedStringKey.foregroundColor] as! UIColor, grayColor)
🚫 EZSwiftExtensionsTests/StringTests.swift#L376: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let boldResult = NSAttributedString(string: testString, attributes: [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize)])
🚫 EZSwiftExtensionsTests/StringTests.swift#L377: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let boldResult2 = NSAttributedString(string: testString2, attributes: [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize)])
🚫 EZSwiftExtensionsTests/StringTests.swift#L378: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let underlineResult = NSAttributedString(string: testString, attributes: [NSAttributedStringKey.underlineStyle: NSUnderlineStyle.styleSingle.rawValue])
🚫 EZSwiftExtensionsTests/StringTests.swift#L379: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let underlineResult2 = NSAttributedString(string: testString2, attributes: [NSAttributedStringKey.underlineStyle: NSUnderlineStyle.styleSingle.rawValue])
🚫 EZSwiftExtensionsTests/StringTests.swift#L381: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let italicResult = NSAttributedString(string: testString, attributes: [NSAttributedStringKey.font: UIFont.italicSystemFont(ofSize: UIFont.systemFontSize)])
🚫 EZSwiftExtensionsTests/StringTests.swift#L382: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let italicResult2 = NSAttributedString(string: testString2, attributes: [NSAttributedStringKey.font: UIFont.italicSystemFont(ofSize: UIFont.systemFontSize)])
🚫 EZSwiftExtensionsTests/StringTests.swift#L384: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let colorResult = NSAttributedString(string: testString, attributes: [NSAttributedStringKey.foregroundColor: UIColor.green])
🚫 EZSwiftExtensionsTests/StringTests.swift#L385: ‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
let colorResult2 = NSAttributedString(string: testString2, attributes: [NSAttributedStringKey.foregroundColor: UIColor.green])
🚫 EZSwiftExtensionsTests/DateTests.swift#L204: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedToday: TimePassed = today.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L208: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedFifteenYearsAgo: TimePassed = fifteenYearsAgo!.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L212: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedTwoMonthsAgo: TimePassed = twoMonthsAgo!.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L216: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedYesterday: TimePassed = yesterday!.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L220: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedSixHoursAgo: TimePassed = sixHoursAgo!.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L224: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedThirteenMinutesAgo: TimePassed = thirteenMinutesAgo!.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L228: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedFiveSecondsAgo: TimePassed = fiveSecondsAgo!.timePassed()
🚫 EZSwiftExtensionsTests/DateTests.swift#L232: cannot convert value of type ‘String’ to specified type ‘TimePassed’
let timePassedOneSecondAgo: TimePassed = oneSecondAgo!.timePassed()
57 Warnings
⚠️ Sources/DoubleExtensions.swift#L40: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "rounded(toPlaces:)")
⚠️ Sources/DoubleExtensions.swift#L46: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "round(toPlaces:)")
⚠️ Sources/DoubleExtensions.swift#L52: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "ceiled(toPlaces:)")
⚠️ Sources/DoubleExtensions.swift#L58: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "ceil(toPlaces:)")
⚠️ Sources/ArrayExtensions.swift#L233: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "containsType(of:)")
⚠️ Sources/ArrayExtensions.swift#L239: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "get(at:)")
⚠️ Sources/ArrayExtensions.swift#L245: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "testAll(is:)")
⚠️ Sources/ArrayExtensions.swift#L255: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "removeFirst(_:)")
⚠️ Sources/ArrayExtensions.swift#L266: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "insertFirst(_:)")
⚠️ Sources/ArrayExtensions.swift#L276: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "contains(_:)")
⚠️ Sources/ArrayExtensions.swift#L282: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "indexes(of:)")
⚠️ Sources/ArrayExtensions.swift#L288: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "lastIndex(_:)")
⚠️ Sources/ArrayExtensions.swift#L294: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "removeFirstObject(_:)")
⚠️ Sources/ArrayExtensions.swift#L307: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.6, renamed: "flatMap(_:)")
⚠️ Sources/ArrayExtensions.swift#L313: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.6, renamed: "forEachEnumerated(_:)")
⚠️ Sources/CGFloatExtensions.swift#L18: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "degreesToRadians")
⚠️ Sources/NSDictionaryExtensions.swift#L17: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8)
⚠️ Sources/NSDictionaryExtensions.swift#L28: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8)
⚠️ Sources/UIFontExtensions.swift#L99: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8)
⚠️ Sources/UIImageViewExtensions.swift#L106: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "image(url:)")
⚠️ Sources/UIImageViewExtensions.swift#L118: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "image(url:placeholder:)")
⚠️ Sources/UIImageViewExtensions.swift#L125: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8, renamed: "image(url:placeholderNamed:)")
⚠️ Sources/BundleExtensions.swift#L18: ‘public’ modifier is redundant for class method declared in a public extension
public class func loadNib(_ name: String, owner: AnyObject!) {
⚠️ Sources/BundleExtensions.swift#L24: ‘public’ modifier is redundant for class method declared in a public extension
public class func loadNib<T>(_ name: String) -> T? {
⚠️ Sources/ArrayExtensions.swift#L107: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
return array.testAll { self.index(of: $0) ?? -1 >= 0 }
⚠️ Sources/ArrayExtensions.swift#L112: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
return elements.testAll { self.index(of: $0) ?? -1 >= 0 }
⚠️ Sources/ArrayExtensions.swift#L117: ‘flatMap’ is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
return enumerated().flatMap { ($0.element == element) ? $0.offset : nil }
⚠️ Sources/ArrayExtensions.swift#L127: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
guard let index = index(of: element) else { return }
⚠️ Sources/ArrayExtensions.swift#L309: ‘flatMap’ is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
return flatMap { map($0) }
⚠️ Sources/FloatingPointExtensions.swift#L41: ‘4294967295’ is not exactly representable as ‘Float’; it becomes ‘4294967296’
return Float(arc4random()) / 0xFFFFFFFF
⚠️ Sources/CGFloatExtensions.swift#L55: ‘4294967295’ is not exactly representable as ‘Float’; it becomes ‘4294967296’
return CGFloat(Float(arc4random()) / 0xFFFFFFFF)
⚠️ Sources/StringExtensions.swift#L196: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.6, renamed: "isBlank")
⚠️ Sources/UIColoredView.swift#L13: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8)
⚠️ Sources/EZSwiftFunctions.swift#L81: platform condition appears to be testing for simulator environment; use ‘targetEnvironment(simulator)’ instead
#if (arch(i386) || arch(x86_64)) && os(iOS)
⚠️ Sources/EZSwiftFunctions.swift#L90: platform condition appears to be testing for simulator environment; use ‘targetEnvironment(simulator)’ instead
#if (arch(i386) || arch(x86_64)) && os(iOS)
⚠️ Sources/EZSwiftFunctions.swift#L268: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "DispatchQueue.main")
⚠️ Sources/EZSwiftFunctions.swift#L274: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "DispatchQueue.main")
⚠️ Sources/EZSwiftFunctions.swift#L281: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "DispatchQueue.global()")
⚠️ Sources/EZSwiftFunctions.swift#L287: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "DispatchQueue.global()")
⚠️ Sources/EZSwiftFunctions.swift#L293: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "DispatchQueue.global()")
⚠️ Sources/EZSwiftFunctions.swift#L299: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.7, renamed: "DispatchQueue.global()")
⚠️ Sources/UIViewControllerExtensions.swift#L283: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.9)
⚠️ Sources/NSDictionaryExtensions.swift#L18: ‘public’ modifier is redundant for initializer declared in a public extension
public convenience init ? (json: String) {
⚠️ Sources/NSDictionaryExtensions.swift#L29: ‘public’ modifier is redundant for instance method declared in a public extension
public func formatJSON() -> String? {
⚠️ Sources/IntExtensions.swift#L53: will never be executed
return -1; //out of bound
⚠️ EZSwiftExtensions/UIStackViewExtensions.swift#L27: Vertical Parameter Alignment Violation: Function parameters should be aligned vertically if they’re in multiple lines in a declaration. (vertical_parameter_alignment)
Linting 'CGRectExtensions.swift' (4/57)
⚠️ EZSwiftExtensionsTests/NSDictionaryTests.swift#L14: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8)
⚠️ EZSwiftExtensionsTests/NSDictionaryTests.swift#L22: unexpected version number in ‘available’ attribute for non-specific platform ‘*’
@available(*, deprecated: 1.8)
⚠️ EZSwiftExtensionsTests/DictionaryTests.swift#L65: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
XCTAssertNotNil(array.index(of: "TWO2"))
⚠️ EZSwiftExtensionsTests/DictionaryTests.swift#L66: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
XCTAssertNotNil(array.index(of: "FIVE5"))
⚠️ EZSwiftExtensionsTests/ArrayTests.swift#L274: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
if let i = shuffledArray.index(of: e) {
⚠️ EZSwiftExtensionsTests/ArrayTests.swift#L283: ‘index(of:)’ is deprecated: renamed to ‘firstIndex(of:)’
if let i = numberArray2.index(of: e) {
⚠️ /Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Build/Products/Debug-iphonesimulator/EZSwiftExtensions.framework/Headers/EZSwiftExtensions-Swift.h#L247: ‘UIWebView’ is deprecated: first deprecated in iOS 12.0 - No longer supported; please adopt WKWebView.
@interface BlockWebView : UIWebView <UIWebViewDelegate>
⚠️ /Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Build/Products/Debug-iphonesimulator/EZSwiftExtensions.framework/Headers/EZSwiftExtensions-Swift.h#L250: ‘UIWebView’ is deprecated: first deprecated in iOS 12.0 - No longer supported; please adopt WKWebView.
```

  • (void)webViewDidStartLoad:(UIWebView * _Nonnull)webView;
    ```
  • <
⚠️ /Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Build/Products/Debug-iphonesimulator/EZSwiftExtensions.framework/Headers/EZSwiftExtensions-Swift.h#L251: ‘UIWebView’ is deprecated: first deprecated in iOS 12.0 - No longer supported; please adopt WKWebView.
```

  • (void)webViewDidFinishLoad:(UIWebView * _Nonnull)webView;
    ```
  • <
⚠️ /Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Build/Products/Debug-iphonesimulator/EZSwiftExtensions.framework/Headers/EZSwiftExtensions-Swift.h#L252: ‘UIWebView’ is deprecated: first deprecated in iOS 12.0 - No longer supported; please adopt WKWebView.
```

  • (void)webView:(UIWebView * _Nonnull)webView didFailLoadWithError:(NSError * _Nonnull)error;
    ```
  • <
⚠️ /Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Build/Products/Debug-iphonesimulator/EZSwiftExtensions.framework/Headers/EZSwiftExtensions-Swift.h#L253: ‘UIWebView’ is deprecated: first deprecated in iOS 12.0 - No longer supported; please adopt WKWebView.
```

  • (BOOL)webView:(UIWebView * _Nonnull)webView shouldStartLoadWithRequest:(NSURLRequest * _Nonnull)request navigationType:(enum UIWebViewNavigationType)navigationType SWIFT_WARN_UNUSED_RESULT;
    ```
  • <

Generated by 🚫 Danger

@ceeyang
Copy link

ceeyang commented May 17, 2019

I will make a new Pull Request

@ceeyang
Copy link

ceeyang commented May 17, 2019

pod 'EZSwiftExtensions', :git => 'https://github.com/ceeyang/EZSwiftExtensions.git', :branch => 'Swift5.0'

Oleksii Pyvovarov and others added 2 commits December 24, 2019 21:39
* Surport Swift 5

* Update to swift5.0

---------

Co-authored-by: yxc <yangxichuan@lhwl2019.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants