guoyingtao / Mantis

An iOS Image cropping library, which mimics the Photo App written in Swift.
MIT License
926 stars 183 forks source link

Trouble with the Swift Example #338

Closed EzequielAdrianM closed 1 year ago

EzequielAdrianM commented 1 year ago

I am trying to execute the Mantis cropper sample project for SwiftUI but it fails in ImageCropper.swift at the following line:

cropViewController.delegate = context.coordinator

Xcode says: Cannot assign value of type ImageCropper.Coordinator to type (any CropViewControllerDelegate)?

When I comment out that line, the app builds but the Crop and Cancel buttons of the cropper do nothing.

Mantis version: 2.14.1

Any clues would be of great help.

guoyingtao commented 1 year ago

@EzequielAdrianM What is your Xcode version?

EzequielAdrianM commented 1 year ago

Xcode 15.0 beta 5

guoyingtao commented 1 year ago

Can you try a formal Xcode 15.0 (not beta)? Maybe rerun pod install too. I am using 15.0 (15A240d) and haven't seen the issue yet.

EzequielAdrianM commented 1 year ago

It was an issue of mine. I was accidentally redeclaring the delegate somewhere else in the code. Thanks for your time!