最近,我想将写好的项目文件放在cocoapods上供别人使用,我的项目文件包含第三方静态库,libEZOpenSDK.a,pod lib lint操作错误,因为这个库不支持模拟器架构。
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_EZDeviceInfo", referenced from:
objc-class-ref in Camera_TZYOPHomePageViewController.o
"_OBJC_CLASS_$_EZOpenSDK", referenced from:
objc-class-ref in Camera_TZYHistoryRecordViewController.o
objc-class-ref in Camera_TZYOPFunctionsSDK.o
objc-class-ref in Camera_TZYOPHomePageViewController.o
objc-class-ref in Camera_TZYSettingViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/yuancong/Library/Developer/Xcode/DerivedData/App-fmvnjejbnyymigeawgsdeaxjbfki/Build/Intermediates/Pods.build/Release-iphonesimulator/Cameara_TZYEZFunctions.build/Objects-normal/x86_64/Cameara_TZYEZFunctions normal x86_64
Ld /Users/yuancong/Library/Developer/Xcode/DerivedData/App-fmvnjejbnyymigeawgsdeaxjbfki/Build/Intermediates/Pods.build/Release-iphonesimulator/Cameara_TZYEZFunctions.build/Objects-normal/i386/Cameara_TZYEZFunctions normal i386
(2 failures)
Podspec需要设置什么?或者有没有办法修改这个库的架构?
注意:我没有此库的源代码。
最好有任何方法来修改库支持模拟器架构,谢谢。
通过lipo -info查看有关该库的信息:
yuancongdeiMac:~ yuancong$ lipo -info /Users/yuancong/Desktop/iOS_v4.4.0.build20170320/SDK/libEZOpenSDK.a
Architectures in the fat file: /Users/yuancong/Desktop/iOS_v4.4.0.build20170320/SDK/libEZOpenSDK.a are: armv7 arm64
yuancongdeiMac:~ yuancong$
以下是我的podspec文件配置:
Pod::Spec.new do |s|
s.name = 'Cameara_TZYEZFunctions'
s.version = '0.1.0'
s.summary = 'Cameara_TZYEZFunctions.'
s.description = <<-DESC
Cameara_TZYEZFunctions podspec.
DESC
s.homepage = 'https://github.com/tencheer2017/Cameara_TZYEZFunctions'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'tencheer2017' => 'stevenzhu@tencheer.com.cn' }
s.source = { :git => 'https://github.com/tencheer2017/Cameara_TZYEZFunctions.git', :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.source_files = 'Cameara_TZYEZFunctions/Classes/**/*','Cameara_TZYEZFunctions/sdk/openssl/include/openssl/*.h','Cameara_TZYEZFunctions/sdk/SDK/include/TestLib/*.h'
s.resources = ['Cameara_TZYEZFunctions/Camera_TZYResources/images/**/*.png','Cameara_TZYEZFunctions/Camera_TZYResources/xib/*.xib','Cameara_TZYEZFunctions/Camera_TZYResources/storyboard/*.storyboard','Cameara_TZYEZFunctions/Camera_TZYResources/other/**/*.strings']
s.public_header_files = 'Cameara_TZYEZFunctions/Classes/**/*.h','Cameara_TZYEZFunctions/sdk/openssl/include/openssl/*.h','Cameara_TZYEZFunctions/sdk/SDK/include/TestLib/*.h'
s.frameworks = 'CoreMedia', 'AudioToolbox','VideoToolbox','GLKit','OpenAL','MobileCoreServices','SystemConfiguration','CoreTelephony','AVFoundation'
s.libraries = 'stdc++.6.0.9', 'c++','iconv.2.4.0'
s.vendored_libraries = 'Cameara_TZYEZFunctions/sdk/SDK/libEZOpenSDK.a','Cameara_TZYEZFunctions/sdk/openssl/lib/libssl.a','Cameara_TZYEZFunctions/sdk/openssl/lib/libcrypto.a'
s.dependency 'AFNetworking'
s.dependency 'Toast'
s.dependency 'ZASwitch'
end