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

WeScan does not build on iOS17 as per Xcode Beta -- WeScan says they no longer support cocoapods but there are other ways to update-- #146

Closed
espbee opened this issue Sep 3, 2023 · 10 comments

Comments

@espbee
Copy link
Contributor

espbee commented Sep 3, 2023

The message from Xcode as if fails to build the app:

'''
ImageScannerController.swift
Stored properties cannot be marked unavailable with '@available'
'''

There are 4 such messages.

WeScan has updated to address this-- they're at 3.0.0-beta.1 now, which should solve this issues. However I can't get this edge_detection lib to update WeScan: it stays on 1.7 always, using it as a trunk dependency.

I asked about updating trunk dependencies at WeScan but they said:

<<Hi @espbee, we unfortunately do not support CocoaPods for our repositories anymore. You can use it as a manual addition to your project or use Swift Package Manager.>>

@sawankumarbundelkhandi or anyone-- do you have a sense of how to address this? I can work on it but this is not really my wheelhouse yet. Seems this lib will stop working totally in iOS17.

Thanks.

@espbee espbee changed the title WeScan does not build on iOS17 as per Xcode Beta WeScan does not build on iOS17 as per Xcode Beta -- WeScan says they no longer support cocoapods but there are other ways to update-- Sep 4, 2023
@sawankumarbundelkhandi
Copy link
Owner

sawankumarbundelkhandi commented Sep 4, 2023

I believe first this needs to happen - flutter/flutter#33850 and flutter/flutter#126005. Since WeScan is now using SPM and flutter doesn't support it yet. There is nothing that can be done for this issue.

@espbee
Copy link
Contributor Author

espbee commented Sep 4, 2023

@sawankumarbundelkhandi what about the manual install option that they also mentioned? i don't claim to know if it's possible or how it goes at this point, but i'm willing to try. or do you know already that it can't be done?

Also this looks promising, from the same thread that you link above?
flutter/flutter#33850 (comment)

If you like I can look into this over the next couple of days. Again though, if you know it's not possible, let me know-- ?

@espbee
Copy link
Contributor Author

espbee commented Sep 5, 2023

Though I guess it involves individual package users doing things with XCode and this lib on a regular basis. I'm trying it anyway. Will report if it works but yes, I guess you're right that it's not a widely applicable solution that would work upon pubspec integration.

EDIT:
For what it's worth I'm shifting to a manual cropper for now. When I find the time I'd love to work on getting Open CV to work more directly. If anyone knows otherwise, let me know but-- it seems that this lib will no longer work for ios once 17 comes out later this month?

@giapnhgc
Copy link
Contributor

giapnhgc commented Sep 25, 2023

Hi, I got the same problems when build on Xcode 15. Then I fixed it.
Although it is only a temporary solution, it was successful when updating Wescan 3.0.0 and running on XCode 15.
I haven't tested on iOS 17 so I don't know if edge_detection can be opened on iOS 17 devices or not. You can try it out. Hope it can be of some help.

First, I forked the edge_detection project, then downloaded the wescan 3.0.0 source in the edge_detection/ios/WeScan-3.0.0 folder.
Next step create a file WeScan.podspec in the WeScan-3.0.0 folder with the content below:

Pod::Spec.new do |spec|
  spec.name             = 'WeScan'
  spec.version          = '3.0.0'
  spec.summary          = 'Document Scanning Made Easy for iOS'
  spec.description      = 'WeScan makes it easy to add scanning functionalities to your iOS app! It\'s modelled after UIImagePickerController, which makes it a breeze to use.'

  spec.homepage         = 'https://github.com/WeTransfer/WeScan'
  spec.license          = { :type => 'MIT', :file => 'LICENSE' }
  spec.authors           = {
    'Boris Emorine' => '[email protected]',
    'Antoine van der Lee' => '[email protected]'
  }
  spec.source           = { :git => 'https://github.com/WeTransfer/WeScan.git', :tag => "#{spec.version}" }
  spec.social_media_url = 'https://twitter.com/WeTransfer'

  spec.swift_version = '5.0'
  spec.ios.deployment_target = '13.0'
  spec.source_files = 'Sources/WeScan/**/*.{h,m,swift}'
  spec.resources = 'Sources/WeScan/**/*.{strings,png}'
end

You can clone this link below and add to pubspec.yaml
https://github.com/giapnhgc/edge_detection.git

edge_detection:
    git:
      url: https://github.com/giapnhgc/edge_detection.git

In the example folder or in your project that uses edge_detection, you need to add this line to your Podfile:
pod 'WeScan', :path => '.symlinks/plugins/edge_detection/ios/WeScan-3.0.0'
=>

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'WeScan', :path => '.symlinks/plugins/edge_detection/ios/WeScan-3.0.0'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

Now run flutter clean, flutter pub get, cd ios, pod install
Screenshot 2023-09-25 at 14 04 50

Finally, run and build your project to test.

@sawankumarbundelkhandi
Copy link
Owner

@giapnhgc thanks for all the work you have done. Once i get the confirmation it's working from any of the user I will merge this PR.

@sawankumarbundelkhandi
Copy link
Owner

@espbee,

Kindly request your assistance with the testing of the recent implementation by @giapnhgc
Follow the comments and instructions provided by @giapnhgc here - #146 (comment)

Your testing and feedback is needed in ensuring the successful merge of this new implementation. Thank you for your help.

@espbee
Copy link
Contributor Author

espbee commented Sep 25, 2023

@sawankumarbundelkhandi i'll check it out as soon as i can, hopefully tomorrow nyc time.

@espbee
Copy link
Contributor Author

espbee commented Sep 26, 2023

@sawankumarbundelkhandi can confirm that this fix works. builds on xcode 15 and runs on ios17 without issue. @giapnhgc thanks a ton for doing this.

@sawankumarbundelkhandi
Copy link
Owner

thanks for testing and confirm @espbee I will go ahead and merge the code.

@giapnhgc thank you again for all the work.

@giapnhgc
Copy link
Contributor

My pleasure.

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

No branches or pull requests

3 participants