尝试使用 RestKit 时出现 Apple Mach-O 链接器错误
Apple Mach-O Linker Error when trying to use RestKit
我安装了cocoapods,如下图
Analyzing dependencies
Downloading dependencies
Using ISO8601DateFormatterValueTransformer (0.6.1)
Using RKValueTransformers (1.1.3)
Using RestKit (0.27.0)
Using SOCKit (1.1)
Using TransitionKit (2.2.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 5 total pods installed.
另外我在 'other linker flags' 里面放了 '-ObjC' 和 '$(inherited)' 还有
${PODS_ROOT}/Headers/Public/AFNetworking
${PODS_ROOT}/Headers/Public/Bolts
${PODS_ROOT}/Headers/Public/ISO8601DateFormatterValueTransformer
${PODS_ROOT}/Headers/Public/RKValueTransformers
${PODS_ROOT}/Headers/Public/RestKit
${PODS_ROOT}/Headers/Public/SOCKit
${PODS_ROOT}/Headers/Public
已经在 'Header Search Path' 内,所有非递归。每次我尝试 运行 项目时,它都会给我 'linker command failed with exit code 1 (use -v to see invocation)'。而且当我将它们更改为递归时, 'linker command failed with exit code 1 (use -v to see invocation)' 发生了。播客文件是
platform :ios, '10.2'
target 'Fpace' do
pod 'RestKit'
end
您要打开 Xcode 项目 或 工作区 吗?您必须始终在 CocoaPods based projects 中使用 *.workspace
文件。
在您的特定情况下,应该是 Fpace.workspace
捆绑包。
我安装了cocoapods,如下图
Analyzing dependencies
Downloading dependencies
Using ISO8601DateFormatterValueTransformer (0.6.1)
Using RKValueTransformers (1.1.3)
Using RestKit (0.27.0)
Using SOCKit (1.1)
Using TransitionKit (2.2.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 5 total pods installed.
另外我在 'other linker flags' 里面放了 '-ObjC' 和 '$(inherited)' 还有
${PODS_ROOT}/Headers/Public/AFNetworking
${PODS_ROOT}/Headers/Public/Bolts
${PODS_ROOT}/Headers/Public/ISO8601DateFormatterValueTransformer
${PODS_ROOT}/Headers/Public/RKValueTransformers
${PODS_ROOT}/Headers/Public/RestKit
${PODS_ROOT}/Headers/Public/SOCKit
${PODS_ROOT}/Headers/Public
已经在 'Header Search Path' 内,所有非递归。每次我尝试 运行 项目时,它都会给我 'linker command failed with exit code 1 (use -v to see invocation)'。而且当我将它们更改为递归时, 'linker command failed with exit code 1 (use -v to see invocation)' 发生了。播客文件是
platform :ios, '10.2'
target 'Fpace' do
pod 'RestKit'
end
您要打开 Xcode 项目 或 工作区 吗?您必须始终在 CocoaPods based projects 中使用 *.workspace
文件。
在您的特定情况下,应该是 Fpace.workspace
捆绑包。