Ypimagepicker: Xcode 12 bugs and errors

Created on 18 Sep 2020  Â·  13Comments  Â·  Source: Yummypets/YPImagePicker

Most helpful comment

It help for me:
pod 'YPImagePicker', :git => 'https://github.com/Yummypets/YPImagePicker.git'
pod 'PryntTrimmerView', :git => 'https://github.com/HHK1/PryntTrimmerView.git'
use_frameworks!

All 13 comments

Would you accept any PR on this? Possibly with the temporary workaround mentioned?

@M-I-N In 96bf9abe615cb24e39240f9d7305d7f3ed76f4ff there are changes, but you still wouldn't be able to build, because Stevia and PryntTrimmerView needs to be updated.
Waiting for @s4cha. He told, that would be available next monday.

@NikKovIos , yes I've sorted that issue with PryntTrimmerView (as they have already fixed HHK1
/PryntTrimmerView#70
). Using with cocoapods works fine from my side. Here is the working version if you would like to take a look.

Please update the podspec file asap.

Please notice that trying to build the current pod with xcode 12 in one of my projects gave me weird errors that did not point the this pod, and after trying to remove pod one by one it turned out a problem with this pod.

The weird errors pointed to other pods that build successfully with this pod removed and said one of the following for each error:
Command MergeSwiftModule failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code

I have a problem:
Cannot convert value of type 'CMTime' to type 'NSValue' in coercion
my pod:
pod 'YPImagePicker'
use_frameworks!

@maestrovsmaster temporary point to master branch and update version for PryntTrimmerView worked for me.
You can try update your pod file like this:

  pod 'YPImagePicker', :git => 'https://github.com/Yummypets/YPImagePicker.git'
  pod 'PryntTrimmerView', '~> 4.0.2'

after pod reinstall i have a problem with PryntTrimmerView:

[!] CocoaPods could not find compatible versions for pod "PryntTrimmerView":
In Podfile:
PryntTrimmerView (~> 4.0.2)

YPImagePicker (from `https://github.com/Yummypets/YPImagePicker.git`) was resolved to 4.3.1, which depends on
  PryntTrimmerView (~> 4.0.0)

None of your spec sources contain a spec satisfying the dependencies: PryntTrimmerView (~> 4.0.2), PryntTrimmerView (~> 4.0.0).

It help for me:
pod 'YPImagePicker', :git => 'https://github.com/Yummypets/YPImagePicker.git'
pod 'PryntTrimmerView', :git => 'https://github.com/HHK1/PryntTrimmerView.git'
use_frameworks!

@NikKovIos back from holiday fully charged to tackled these nasty build issues. I should have time to take a look tomorrow and will keep you guys posted.

@NikKovIos running
carthage update Stevia --platform iOS
carthage update PryntTrimmerView --platform iOS
Which rebuilds the dependencies locally (with Xcode 12)
fixed the build for me. Does this work on your side ?

@s4cha i get the error

Here is the log

carthage update --platform iOS                           1 ↵  2614  00:34:53
*** Checking out PryntTrimmerView at "4.0.2"
*** Checking out Stevia at "4.7.3"
*** xcodebuild output can be found in /var/folders/6d/7wvyp7p176lf1cpd0gxhbt900000gn/T/carthage-xcodebuild.zBJ1PU.log
*** Downloading PryntTrimmerView.framework binary at "Xcode 12 support"
*** Downloading Stevia.framework binary at "Xcode 11.2.1 & Swift 5.1.2"
***  Skipped installing PryntTrimmerView.framework binary due to the error:
    "Incompatible Swift version - framework was built with 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53) and the local version is 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)."

    Falling back to building from the source
***  Skipped installing Stevia.framework binary due to the error:
    "Incompatible Swift version - framework was built with 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9) and the local version is 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)."

    Falling back to building from the source
*** Building scheme "PryntTrimmerView" in PryntTrimmerViewExample.xcworkspace
Build Failed
    Task failed with exit code 1:
    /usr/bin/xcrun lipo -create /Users/nikkov/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/PryntTrimmerView/4.0.2/Build/Intermediates.noindex/ArchiveIntermediates/PryntTrimmerView/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/PryntTrimmerView.framework/PryntTrimmerView /Users/nikkov/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/PryntTrimmerView/4.0.2/Build/Products/Release-iphonesimulator/PryntTrimmerView.framework/PryntTrimmerView -output /Users/nikkov/r/YPImagePicker/Carthage/Build/iOS/PryntTrimmerView.framework/PryntTrimmerView

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/6d/7wvyp7p176lf1cpd0gxhbt900000gn/T/carthage-xcodebuild.zBJ1PU.log

Let's remove carthage dependencies and leave only cocoapods. For now we duplicate carthage and pod dependencies.

Also error: /r/YPImagePicker/YPImagePickerExample/YPImagePickerExample.xcodeproj Building for iOS Simulator, but the linked and embedded framework 'PryntTrimmerView.framework' was built for iOS.
And after import Stevia the error Module compiled with Swift 5.2.2 cannot be imported by the Swift 5.3 compiler: /r/YPImagePicker/Carthage/Build/iOS/Stevia.framework/Modules/Stevia.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

@NikKovIos the Carthage build should be fixed with this PR, if you can take a look : https://github.com/Yummypets/YPImagePicker/pull/571

Also, although this is not a very popular opinion, and now that SPM handles embedded resources, I'd be all for using SPM only and ditching the other package managers. Apple's way is the way. Handling multiple managers takes up half of our time which would be way more useful fixing actual bugs and improving the tool. Anyway I'm going to experiment SPM support on a branch for now :)

For all the people ready to take the leap to Swift Package Manager, a beta version is available here:
package https://github.com/Yummypets/YPImagePicker branch spm.
This should work perfectly with Xcode 12. Let me know how this goes for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nickeyzzz picture nickeyzzz  Â·  6Comments

StackHelp picture StackHelp  Â·  4Comments

kerimsener picture kerimsener  Â·  6Comments

AndreiBoariu picture AndreiBoariu  Â·  5Comments

esabunor picture esabunor  Â·  5Comments