SwiftOCR icon indicating copy to clipboard operation
SwiftOCR copied to clipboard

Swift 3 issue.

Open dipkasyap opened this issue 7 years ago • 6 comments

screen shot 2017-04-24 at 11 30 24 am

dipkasyap avatar Apr 24 '17 05:04 dipkasyap

yeah i am getting the same issue no help around here

ghost avatar May 12 '17 10:05 ghost

@lonealpha @dipkasyap

try adding this to the very end of your Podfile

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end

Also, validate that your Swift Language Version in Build Settings of your target is set to Swift 3

andyyhope avatar Jun 26 '17 04:06 andyyhope

Swift language version in which target? Should I be fiddling with the CocoaPods targets or the targets for my project?

AdrianBinDC avatar Oct 16 '17 20:10 AdrianBinDC

Or you could use this which should only affect the Swift versions of this pod and GPUImage which it depends on, leaving any other pods as they are for Swift 4:

post_install do |installer|
        myTargets = ['SwiftOCR', 'GPUImage']

        installer.pods_project.targets.each do |target|
                if myTargets.include? target.name
                        target.build_configurations.each do |config|
                                config.build_settings['SWIFT_VERSION'] = '3.2'
                        end
                end
        end
end

dsmailes avatar Oct 27 '17 16:10 dsmailes

screen shot 2017-11-23 at 10 29 29 pm screen shot 2017-11-23 at 10 32 04 pm Unable to build the app (Xoce 8.3.3) Swift 3 - Please send us the sample pod file to use for swift 3

karapurakesh avatar Nov 23 '17 16:11 karapurakesh

Commit ffae067bf7e9dc67645e4ec8b1e2e02c8e796965 updated everything to the Swift 4 syntax. You could use the commit before that (b7391228983d894d1ef133dc747b9191fd0237e4) by specifying the commit in your Podfile:

pod 'SwiftOCR', :git => 'https://github.com/garnele007/SwiftOCR', :commit => 'b7391228983d894d1ef133dc747b9191fd0237e4'

spotlightishere avatar Feb 06 '18 03:02 spotlightishere