EurekaCommunity/SplitRow

Cocoapods support

prajapatirukesh opened this issue ยท 8 comments

I have all the requirements as mentioned but still i cannot use SplitRow in my project.

There is no Cocoapod yet. Unfortunately Iโ€˜m not familiar with the Pod creation process.

Feel free to submit a pull request Iโ€˜ll happily apply it.

PS: please ne aware that this Row is based upon a Eureka fork till this pull request is merged:

xmartlabs/Eureka#1338

Thanks for sharing your code with the community, this is exactly what I am looking for. I need it to be on CocoaPods though. I am willing to work on the code to put this in CocoaPods & submit a pull request if it's still something that needs to be done.

@kamerc your welcome! Cocoapods support is still missing, I'll happily merge a pull request. So feel free to give it a shot! ๐Ÿ‘

ok, I'm working on it

I have been doing some research and am currently stuck on next steps. Anyone in the EurekaCommunity @github/EurekaCommunity familiar with this process? Most of the instructions I have found have been how to create a new CocoaPod project from scratch. In this case, an XCode project already exists and that project is not already using CocoaPods to depend on Eureka (so there is no xcodeworkspace, etc.). I started to go down the path of converting the project to use CocoaPods and then determined that step was unnecessary. For example TokenRow isn't doing this and it is available as a CocoaPod. So I eventually found this helpful stackoverflow post so I decided to go back to the original project and just add this spec file. However, I am not able to get past this command $ pod spec lint SplitRow.podspec due to a bunch of Eureka Errors that I am pasting below.


 -> SplitRow (1.0.0)
    - WARN  | [iOS] swift: The validator used Swift 3.2 by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_version` attribute in your podspec. Note that usage of the `--swift-version` parameter or a `.swift-version` file is now deprecated.
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/Common/FieldRow.swift:230:104: error: type 'NSAttributedStringKey' (aka 'NSString') has no member 'foregroundColor'
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/Common/FieldRow.swift:356:47: error: argument labels '(rawValue:)' do not match any available overloads
    - NOTE  | [iOS] xcodebuild:  Eureka/Source/Rows/Common/FieldRow.swift:356:47: note: overloads for 'UILayoutPriority' exist with these partially matching parameter lists: (_bits: FPIEEE32), (string: String), (from: Decoder), (S), (bitPattern: UInt32), (floatLiteral: Float), (_builtinIntegerLiteral: Int2048), (integerLiteral: Int64), (_builtinFloatLiteral: FPIEEE80), (exactly: T), (UInt8), (exactly: UInt8), (Int8), (exactly: Int8), (UInt16), (exactly: UInt16), (Int16), (exactly: Int16), (UInt32), (exactly: UInt32), (Int32), (exactly: Int32), (UInt64), (exactly: UInt64), (Int64), (exactly: Int64), (UInt), (exactly: UInt), (Int), (exactly: Int), (Float), (exactly: Float), (Double), (exactly: Double), (Float80), (exactly: Float80), (CGFloat), (NSNumber), (truncating: NSNumber), (exactly: NSNumber)
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/Common/FieldRow.swift:357:61: error: argument labels '(rawValue:)' do not match any available overloads
    - NOTE  | [iOS] xcodebuild:  Eureka/Source/Rows/Common/FieldRow.swift:357:61: note: overloads for 'UILayoutPriority' exist with these partially matching parameter lists: (_bits: FPIEEE32), (string: String), (from: Decoder), (S), (bitPattern: UInt32), (floatLiteral: Float), (_builtinIntegerLiteral: Int2048), (integerLiteral: Int64), (_builtinFloatLiteral: FPIEEE80), (exactly: T), (UInt8), (exactly: UInt8), (Int8), (exactly: Int8), (UInt16), (exactly: UInt16), (Int16), (exactly: Int16), (UInt32), (exactly: UInt32), (Int32), (exactly: Int32), (UInt64), (exactly: UInt64), (Int64), (exactly: Int64), (UInt), (exactly: UInt), (Int), (exactly: Int), (Float), (exactly: Float), (Double), (exactly: Double), (Float80), (exactly: Float80), (CGFloat), (NSNumber), (truncating: NSNumber), (exactly: NSNumber)
    - WARN  | [iOS] xcodebuild:  Eureka/Source/Rows/Common/GenericMultipleSelectorRow.swift:79:45: warning: cast from 'UIViewController' to unrelated type 'MultipleSelectorViewController<GenericMultipleSelectorRow<T, Cell>>' always fails
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/SegmentedRow.swift:43:52: error: argument labels '(rawValue:)' do not match any available overloads
    - NOTE  | [iOS] xcodebuild:  Eureka/Source/Rows/SegmentedRow.swift:43:52: note: overloads for 'UILayoutPriority' exist with these partially matching parameter lists: (_bits: FPIEEE32), (string: String), (from: Decoder), (S), (bitPattern: UInt32), (floatLiteral: Float), (_builtinIntegerLiteral: Int2048), (integerLiteral: Int64), (_builtinFloatLiteral: FPIEEE80), (exactly: T), (UInt8), (exactly: UInt8), (Int8), (exactly: Int8), (UInt16), (exactly: UInt16), (Int16), (exactly: Int16), (UInt32), (exactly: UInt32), (Int32), (exactly: Int32), (UInt64), (exactly: UInt64), (Int64), (exactly: Int64), (UInt), (exactly: UInt), (Int), (exactly: Int), (Float), (exactly: Float), (Double), (exactly: Double), (Float80), (exactly: Float80), (CGFloat), (NSNumber), (truncating: NSNumber), (exactly: NSNumber)
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/SegmentedRow.swift:48:52: error: argument labels '(rawValue:)' do not match any available overloads
    - NOTE  | [iOS] xcodebuild:  Eureka/Source/Rows/SegmentedRow.swift:48:52: note: overloads for 'UILayoutPriority' exist with these partially matching parameter lists: (_bits: FPIEEE32), (string: String), (from: Decoder), (S), (bitPattern: UInt32), (floatLiteral: Float), (_builtinIntegerLiteral: Int2048), (integerLiteral: Int64), (_builtinFloatLiteral: FPIEEE80), (exactly: T), (UInt8), (exactly: UInt8), (Int8), (exactly: Int8), (UInt16), (exactly: UInt16), (Int16), (exactly: Int16), (UInt32), (exactly: UInt32), (Int32), (exactly: Int32), (UInt64), (exactly: UInt64), (Int64), (exactly: Int64), (UInt), (exactly: UInt), (Int), (exactly: Int), (Float), (exactly: Float), (Double), (exactly: Double), (Float80), (exactly: Float80), (CGFloat), (NSNumber), (truncating: NSNumber), (exactly: NSNumber)
    - WARN  | [iOS] xcodebuild:  Eureka/Source/Rows/Controllers/SelectorAlertController.swift:50:20: warning: cast from 'RowOf<AlertOptionsRow.Cell.Value>!' to unrelated type 'AlertOptionsRow' always fails
    - WARN  | [iOS] xcodebuild:  Eureka/Source/Rows/Common/SelectorRow.swift:82:45: warning: cast from 'UIViewController' to unrelated type 'SelectorViewController<SelectorRow<Cell>>' always fails
    - WARN  | [iOS] xcodebuild:  Eureka/Source/Rows/Controllers/SelectorViewController.swift:201:47: warning: cast from 'Section' to unrelated type 'SelectableSection<Row>' always fails
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/SliderRow.swift:66:50: error: argument labels '(rawValue:)' do not match any available overloads
    - NOTE  | [iOS] xcodebuild:  Eureka/Source/Rows/SliderRow.swift:66:50: note: overloads for 'UILayoutPriority' exist with these partially matching parameter lists: (_bits: FPIEEE32), (string: String), (from: Decoder), (S), (bitPattern: UInt32), (floatLiteral: Float), (_builtinIntegerLiteral: Int2048), (integerLiteral: Int64), (_builtinFloatLiteral: FPIEEE80), (exactly: T), (UInt8), (exactly: UInt8), (Int8), (exactly: Int8), (UInt16), (exactly: UInt16), (Int16), (exactly: Int16), (UInt32), (exactly: UInt32), (Int32), (exactly: Int32), (UInt64), (exactly: UInt64), (Int64), (exactly: Int64), (UInt), (exactly: UInt), (Int), (exactly: Int), (Float), (exactly: Float), (Double), (exactly: Double), (Float80), (exactly: Float80), (CGFloat), (NSNumber), (truncating: NSNumber), (exactly: NSNumber)
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/SliderRow.swift:78:46: error: argument labels '(rawValue:)' do not match any available overloads
    - NOTE  | [iOS] xcodebuild:  Eureka/Source/Rows/SliderRow.swift:78:46: note: overloads for 'UILayoutPriority' exist with these partially matching parameter lists: (_bits: FPIEEE32), (string: String), (from: Decoder), (S), (bitPattern: UInt32), (floatLiteral: Float), (_builtinIntegerLiteral: Int2048), (integerLiteral: Int64), (_builtinFloatLiteral: FPIEEE80), (exactly: T), (UInt8), (exactly: UInt8), (Int8), (exactly: Int8), (UInt16), (exactly: UInt16), (Int16), (exactly: Int16), (UInt32), (exactly: UInt32), (Int32), (exactly: Int32), (UInt64), (exactly: UInt64), (Int64), (exactly: Int64), (UInt), (exactly: UInt), (Int), (exactly: Int), (Float), (exactly: Float), (Double), (exactly: Double), (Float80), (exactly: Float80), (CGFloat), (NSNumber), (truncating: NSNumber), (exactly: NSNumber)
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/SliderRow.swift:111:61: error: type 'UILayoutPriority' (aka 'Float') has no member 'defaultHigh'
    - ERROR | [iOS] xcodebuild:  Eureka/Source/Rows/SliderRow.swift:112:61: error: type 'UILayoutPriority' (aka 'Float') has no member 'defaultHigh'

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 10 errors and 5 warnings.

Here is the PodSpec:

Pod::Spec.new do |s|
  s.name         = "SplitRow"
  s.version      = "1.0.0"
  s.summary      = "A row for Eureka to put two rows side by side into the same UITableViewCell."
  s.homepage     = "https://github.com/EurekaCommunity/SplitRow"
  s.license      = { :type => "MIT", :file => "LICENSE" }
  s.author       = "Marco Betschart"
  s.social_media_url   = "https://twitter.com/EurekaCommunity"
  s.platform     = :ios, "9.0"
  s.source       = { :git => "https://github.com/EurekaCommunity/SplitRow.git", :tag => "#{s.version}" }
  s.source_files  = "SplitRow/**/*.{swift}"
  s.frameworks = "UIKit", "Foundation"
  s.requires_arc = true
  s.dependency "Eureka", "~> 4.0"
end

Hopefully someone more familiar with the Pod process will have a suggestion. @mtnbarreto

I finally figured out a solution, pull request has been submitted.

just merged the pull request and created a new tag 1.1.0. SplitRow now officially supports Cocoapods ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

Thank you so much for your contribution @kamerc !!!