我尝试使用Hyperloop将openALPR iOS模块集成到Titanium应用程序:https://github.com/yasirmturk/openalpr-swift
我通过cocoapods成功安装了它,但现在我已经陷入了如何使用它的困境。 我有这段代码:
var openALPR = require("OpenALPRSwift");
var oaScanner = openALPR.OAScanner("eu");
但它会引发错误:
openALPR.OAScanner is not a function. (In 'openALPR.OAScanner(\"eu\")', 'openALPR.OAScanner' is undefined)
我的Podfile配置如下:
install! 'cocoapods',
:integrate_targets => false
platform :ios, '9.0'
use_frameworks!
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method,
:verify_no_static_framework_transitive_dependencies) {}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
phase_name = 'Headers'
target.build_phases.each do |phase|
if (phase.display_name.include? phase_name)
target.build_phases.unshift(phase).uniq! unless
target.build_phases.first == phase
end
end
end
end
target 'ALPRproject' do
#pod 'OpenALPRSwift', '~> 1.0.0'
pod 'OpenALPRSwift', :git =>
'https://github.com/yasirmturk/openalpr-swift.git', :tag => 'v1.0.0'
end
请帮助如何使它工作。 谢谢你的回复 最好的祝福, 玛丽安