Kiwi については以下のインストール手順通り。
で、AFNetworking を使うので Podfile を以下のように変更。
platform :ios, '5.1'
pod 'AFNetworking', '1.1.0'
target :NSRemoteJsonObjectTests, :exclusive => true do
pod 'Kiwi'
end
Test 時に以下のエラーが。
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithName", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_SCNetworkReachabilityGetFlags", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[AFHTTPClient stopMonitoringNetworkReachability] in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_UTTypeCopyPreferredTagWithClass", referenced from:
_AFContentTypeForPathExtension in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
_AFContentTypeForPathExtension in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_kUTTagClassFilenameExtension", referenced from:
_AFContentTypeForPathExtension in libNSRemoteJsonObject.a(AFHTTPClient.o)
"_kUTTagClassMIMEType", referenced from:
_AFContentTypeForPathExtension in libNSRemoteJsonObject.a(AFHTTPClient.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解決策としては、Test 用のターゲットの Build Phases -> Link Binary With Libraries に、MobileCoreServices.framework と SystemConfiguration.framework を追加することでエラーが回避できました。