Closed Semty closed 6 years ago
You can add following command to your pod file if you're using Cocoapods as a dependency manager:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'TesseractOCRiOS'
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
header_phase = target.build_phases().select do |phase|
phase.is_a? Xcodeproj::Project::PBXHeadersBuildPhase
end.first
duplicated_header_files = header_phase.files.select do |file|
file.display_name == 'config_auto.h'
end
duplicated_header_files.each do |file|
header_phase.remove_build_file file
end
end
end
end
Just noticed that this script also has the code to disable ENABLE_BITCODE
. Just remove that part if that wasn't what you needed.
@maniramezan It works. Thank you.
Hai @maniramezan , I use this library on podspecs... Got similar error when I run
pod repo push *****
Did you have any clue to put your code on podspecs file?
@adytzs Not sure how that'd be. If you can share your podspecs here or share the sample code, I might be able to help
`Pod::Spec.new do |s|
s.name = "MyLib"
s.version = "0.1.219"
s.summary = "Utilities Library"
s.homepage = "****"
s.license = { :type => 'Copyright (C) 2016 by ', :text => <<-LICENSE
Internal Library, Only Product allowed to use this library
LICENSE
}
s.author = { "Yogi" => "
s.platform = :ios, '7.1' s.requires_arc = true s.ios.deployment_target = '7.1'
s.source_files = 'MyLib/Library//*.{h,m}' s.resources = ["MyLib/Library/*/.{xib,bundle}","MyLib/Library//*.xcassets","MyLib/Library//*.otf","MyLib/Library/*/.xcdatamodeld", "MyLib/Library//Currency"]
s.dependency "AFNetworking", "~> 3.1.0" s.dependency "SDWebImage", "~> 3.8.2" s.dependency "AWSS3" s.dependency "AWSCognito" s.dependency "TesseractOCRiOS", "~> 4.0.0" s.dependency "FBSDKCoreKit", "~> 4.19.0" s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => "$(SRCROOT)/Pods/**" }
s.frameworks = 'UIKit', 'CoreText', 'Foundation' s.module_name = 'MyLib' end`
I just add TesseractOCRiOS on pod specs, If I remove it, it is working. Fyi: If i use xcode 9.xxx, it is working, after upgrading to xcode 10.xxx, it is not working anymore...
Thank you
Issue was discussed here: https://github.com/tesseract-ocr/tesseract/issues/1524 I don't have this issue when I use https://github.com/msgrizz/TesseractOCRSDKiOS So it could be solved by changing project setting (not sure what setting) Since I'm using TesseractOCRiOS in a library (https://github.com/evermeer/PassportScanner) I don't want to use the podfile change solution. It should just work. So for now I have switched to TesseractOCRSDKiOS
I got the same issue did Any one found the solution of it?!
I have such problem during building my project in Xcode 10 Beta: