M13Checkbox icon indicating copy to clipboard operation
M13Checkbox copied to clipboard

Cannot compile in Xcode 10.2

Open mxie1563 opened this issue 5 years ago • 7 comments

Have a lot error related to (NS)String class: .../Pods/M13Checkbox/Sources/M13CheckboxAnimationGenerator.swift:38:69: Type 'String' has no member 'easeIn' .../Pods/M13Checkbox/Sources/M13CheckboxAnimationGenerator.swift:43:69: Type 'String' has no member 'easeOut' .../Pods/M13Checkbox/Sources/Managers/M13CheckboxBounceController.swift:93:37: Type 'String' has no member 'round'; did you mean 'count'? .../Pods/M13Checkbox/Sources/M13CheckboxAnimationGenerator.swift:184:30: Type 'CAMediaTimingFillMode' (aka 'NSString') has no member 'forwards'

mxie1563 avatar Apr 19 '19 15:04 mxie1563

resolved by replacing all the implicit .round, .forwards, .backwards with explicit kCA constant values:

replace: markLayer.lineCap = .round markLayer.lineJoin = .round with markLayer.lineCap = kCALineCapRound markLayer.lineJoin = kCALineJoinRound

replace animation.fillMode = CAMediaTimingFillMode.forwards animation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) with animation.fillMode = kCAFillModeForwards animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)

.... Throughout the project.

mxie1563 avatar Apr 19 '19 17:04 mxie1563

@mxie1563 Did you run pod update after updating to 10.2?

BradPatras avatar Apr 23 '19 14:04 BradPatras

@BradPatras I did. However, the compile didn't work until I unlocked and made these changes I mentioned above.

mxie1563 avatar Apr 23 '19 14:04 mxie1563

@mxie1563 What version of swift are you using with your project? And do you have a swift version explicitly stated in your Podfile?

BradPatras avatar Apr 23 '19 15:04 BradPatras

@BradPatras The project is specified for swift 4. In the Podfile, there is no swift version specified:

source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0'

use_frameworks!

mxie1563 avatar Apr 23 '19 16:04 mxie1563

i have the same issue, have it fixed yet ?

LeXuanKhanh avatar Jan 13 '20 03:01 LeXuanKhanh

@LeXuanKhanh If you've already updated your project to swift 4 and made sure you're targeting the latest version of the M13Checkbox, you could add something like this to the bottom of your podfile and specify a swift version for the M13Checkbox. https://github.com/groue/GRDB.swift/issues/410#issuecomment-419735680

BradPatras avatar Jan 13 '20 16:01 BradPatras