Ios 在使用GoogleMaps.framework进行Xcode 5单元测试时,出现了许多编译错误

Ios 在使用GoogleMaps.framework进行Xcode 5单元测试时,出现了许多编译错误,ios,objective-c,xcode,unit-testing,xcode5,Ios,Objective C,Xcode,Unit Testing,Xcode5,我正在使用XCTest框架对我的应用程序进行单元测试。该应用程序包括GoogleMaps.framework,我已经能够将该框架本身添加到测试目标中,但我收到了许多令人难以置信的编译错误。我确信我遗漏了一些简单的东西,但我还没有找到解决办法。我还遵循了许多其他与类似问题相关的帖子的许多方向:,举几个例子。我相信(但不是肯定的)在将框架的资源包与测试目标联系起来时存在一个问题 错误是“架构x86_64的未定义符号”或“架构armv7s的未定义符号”,具体取决于我是在模拟器上运行测试还是在实际设备上

我正在使用XCTest框架对我的应用程序进行单元测试。该应用程序包括GoogleMaps.framework,我已经能够将该框架本身添加到测试目标中,但我收到了许多令人难以置信的编译错误。我确信我遗漏了一些简单的东西,但我还没有找到解决办法。我还遵循了许多其他与类似问题相关的帖子的许多方向:,举几个例子。我相信(但不是肯定的)在将框架的资源包与测试目标联系起来时存在一个问题

错误是“架构x86_64的未定义符号”或“架构armv7s的未定义符号”,具体取决于我是在模拟器上运行测试还是在实际设备上运行测试

以下是我选择产品>测试时XCode给我的信息:

Ld /Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-    exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator/GuardlyTwoTests.xctest/GuardlyTwoTests normal x86_64
cd /Users/fitzgeraldsimran/Documents/iOS/Guardly_2/guardly-iphone-2
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode51-DP2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode51-DP2.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode51-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode51-DP2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator -F/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator -F/Applications/Xcode51-DP2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode51-DP2.app/Contents/Developer/Library/Frameworks -F/Users/fitzgeraldsimran/Documents/iOS/Guardly_2/guardly-iphone-2 -filelist /Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Intermediates/GuardlyTwo.build/Debug-iphonesimulator/GuardlyTwoTests.build/Objects-normal/x86_64/GuardlyTwoTests.LinkFileList -bundle_loader /Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator/GuardlyTwo.app/GuardlyTwo -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework QuartzCore -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework GoogleMaps -framework XCTest -framework CoreData -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Intermediates/GuardlyTwo.build/Debug-iphonesimulator/GuardlyTwoTests.build/Objects-normal/x86_64/GuardlyTwoTests_dependency_info.dat -o /Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator/GuardlyTwoTests.xctest/GuardlyTwoTests

Undefined symbols for architecture x86_64:
"_CGImageSourceCreateImageAtIndex", referenced from:
  _GMSCreateCGImageWithData in GoogleMaps(GMMImageSupport.o)
"_CGImageSourceCreateWithDataProvider", referenced from:
  _GMSCreateCGImageWithData in GoogleMaps(GMMImageSupport.o)
"_GLKMatrix3Identity", referenced from:
  gmscore::vector::GLLineGroup::SetTransform(gmscore::math::Matrix4f const&,    gmscore::base::reffed_ptr<gmscore::vector::Camera> const&) in GoogleMaps(GLLineGroup.o)
  gmscore::vector::GLAlphaOnlyTextureShaderProgram::GLAlphaOnlyTextureShaderProgram(bool) in GoogleMaps(GLBasicShaderState.o)
  gmscore::renderer::TextureState::TextureState(unsigned int) in GoogleMaps(TextureState.o)
  gmscore::renderer::TextureState::TextureState(unsigned int) in GoogleMaps(TextureState.o)
  gmscore::renderer::TextureState::TextureState(gmscore::base::reffed_ptr<gmscore::renderer::ImageData> const&) in GoogleMaps(TextureState.o)
  gmscore::renderer::TextureState::TextureState(gmscore::base::reffed_ptr<gmscore::renderer::ImageData> const&, gmscore::renderer::TextureState::TextureUnit) in GoogleMaps(TextureState.o)
  gmscore::renderer::TextureState::TextureState(gmscore::base::reffed_ptr<gmscore::renderer::ImageData> const&, gmscore::renderer::TextureState::TextureUnit, bool, gmscore::renderer::TextureState::Filter, gmscore::renderer::TextureState::Filter) in GoogleMaps(TextureState.o)
  ...
"_GLKMatrix4Identity", referenced from:
  -[GMSGLVectorTile applyTransform:camera:] in GoogleMaps(GMSGLVectorTile.o)
  (anonymous namespace)::PointsBehavior::Commit(gmscore::renderer::EntityRenderer*) in     GoogleMaps(GMSPointsEntityProvider.o)
  (anonymous namespace)::StickerBehavior::Commit(gmscore::renderer::EntityRenderer*) in GoogleMaps(GMSStickersEntityProvider.o)
  (anonymous namespace)::GLTileUpdaterBehavior::UpdateAndTransformTile(objc_object*) in GoogleMaps(GMSTilesEntityProvider.o)
  (anonymous namespace)::BubbleBehavior::Commit(gmscore::renderer::EntityRenderer*) in GoogleMaps(GMSBubbleEntityProvider.o)
  gmscore::streetview::Panorama::Panorama(int, int, int, int, int, int) in GoogleMaps(Panorama.o)
  gmscore::vector::UpdateMyLocationBehavior::Commit(gmscore::renderer::EntityRenderer*) in GoogleMaps(GLMyLocation.o)
  ...
"_GLKMatrix4Invert", referenced from:
  gmscore::streetview::Camera::Unproject(gmscore::math::Vector2f const&, bool*) const in GoogleMaps(Camera-B046EE312980DB98.o)
  gmscore::vector::Camera::UpdateInternals() in GoogleMaps(Camera-3E3856CABC8A9C74.o)
  gmscore::renderer::Camera3D::SetTransform(gmscore::math::Matrix4f const&) in GoogleMaps(Camera3D.o)
  gmscore::renderer::Camera3D::Transform() in GoogleMaps(Camera3D.o)
  non-virtual thunk to gmscore::renderer::Camera3D::Transform() in GoogleMaps(Camera3D.o)
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
  std::__1::enable_if<__is_forward_iterator<gmscore::model::ModelTriangle2D*>::value, void>::type std::__1::vector<gmscore::model::ModelTriangle2D, std::__1::allocator<gmscore::model::ModelTriangle2D> >::assign<gmscore::model::ModelTriangle2D*>(gmscore::model::ModelTriangle2D*, gmscore::model::ModelTriangle2D*) in GoogleMaps(GMSArea.o)
  std::__1::vector<gmscore::model::ModelTriangle2D, 
Ld/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug iphonesimulator/GuardlyTwoTests.xctest/GuardlyTwoTests正常x86_64
cd/Users/fitzgeraldsimran/Documents/iOS/Guardly_2/Guardly-iphone-2
导出IPHONEOS_部署_目标=7.0
export PATH=“/Applications/Xcode51-DP2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode51-DP2.app/Contents/Developer/usr/bin:/usr/sbin:/sbin”
/Applications/Xcode51-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-arch x86_64-bundle-isysroot/Applications/Xcode51-DP2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk-L/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator-F/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator-F/Applications/Xcode51-DP2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/Library/Frameworks-F/Applications/Xcode51-DP2.app/Contents/Developer/Library/Frameworks-F/Users/fitzgeraldsimran/Documents/iOS/guarly\u 2/guarly-iphone-2-文件列表/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Intermediates/GuardlyTwo.Build/Debug-iphonesimulator/GuardlyTwoTests.Build/Objects-normal/x86_64/GuardlyTwoTests.LinkFileList-bundle\u加载器/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiozzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator/GuardlyTwo.app/GuardlyTwo-Xlinker-objc_-abi版本-Xlinker 2-objc-framework-QuartzCore-fobjc-arc-fobjc-link-runtime-Xlinker-no-no-implicit_-dylibs-mios-version=7.0-framework谷歌地图框架XCTEST-框架CORIDATA-框架UIKITE——框架基础-LPODS-XLIKER -依赖性信息-XLIKER/Users/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Intermediates/GuardlyTwo.Build/Debug-iphonesimulator/GuardlyTwoTests.Build/Objects-normal/x86_64/GuardlyTwoTests\u dependency\u info.dat-o/用户/fitzgeraldsimran/Library/Developer/Xcode/DerivedData/GuardlyTwo-exkiohzzsvdhtddmpgulwtyrytvy/Build/Products/Debug-iphonesimulator/GuardlyTwoTests.xctest/GuardlyTwoTests
架构x86_64的未定义符号:
“\u CGImageSourceCreateImageAtIndex”,引用自:
_GMSCreateCGImageWithData in GoogleMaps(GMMImageSupport.o)
“\u CGImageSourceCreateWithDataProvider”,引用自:
_GMSCreateCGImageWithData in GoogleMaps(GMMImageSupport.o)
“GLKMatrix3Identity”,引用自:
谷歌地图(GLLineGroup.o)中的gmscore::vector::GLLineGroup::SetTransform(gmscore::math::Matrix4f const&,gmscore::base::reffed_ptr const&)
谷歌地图(GLBasicShaderState.o)中的gmscore::vector::GLAlphaOnlyTextureShaderProgram::GLAlphaOnlyTextureShaderProgram(bool)
谷歌地图(TextureState.o)中的gmscore::renderer::TextureEstate::TextureEstate(unsigned int)
谷歌地图(TextureState.o)中的gmscore::renderer::TextureEstate::TextureEstate(unsigned int)
谷歌地图(TextureState.o)中的gmscore::renderer::TextureState::TextureState(gmscore::base::reffed_ptr const&)
谷歌地图(TextureState.o)中的gmscore::renderer::TextureState::TextureState(gmscore::base::reffedptrconst&,gmscore::renderer::TextureState::TextureUnit)
谷歌地图(TextureState.o)中的gmscore::renderer::TextureState::TextureState::TextureUnit、bool、gmscore::renderer::TextureState::Filter、gmscore::renderer::TextureState::Filter
...
“GLKMatrix4Identity”,引用自:
-谷歌地图(GMSGLVectorTile.o)中的[GMSGLVectorTile applyTransform:camera:]
(匿名命名空间)::Google地图中的PointsBehavior::Commit(gmscore::renderer::EntityRenderer*)(GMSPointsEntityProvider.o)
(匿名命名空间)::Google地图中的StickerBehavior::Commit(gmscore::renderer::EntityRenderer*)(gmsstickerEntityProvider.o)
(匿名名称空间)::谷歌地图(gmstileEntityProvider.o)中的gltileUpdateBehavior::updateAndTransferMTile(objc_object*)
(匿名命名空间)::GoogleMaps中的BubbleBehavior::Commit(gmscore::renderer::EntityRenderer*)(gmsbubleEntityProvider.o)
谷歌地图(Panorama.o)中的全景(int,int,int,int,int,int)
Google地图(GLMyLocation.o)中的gmscore::vector::UpdateMyLocationBehavior::Commit(gmscore::renderer::EntityRenderer*)
...
“GLKMatrix4Invert”,引用自:
谷歌地图(Camera-b046ee31298db98.o)中的gmscore::streetview::Camera::Unproject(gmscore::math::Vector2f const&,bool*)const
谷歌地图中的gmscore::vector::Camera::UpdateInternals()(Camera-3E3856CABC8A9C74.o)
谷歌地图(Camera3D.o)中的gmscore::renderer::Camera3D::SetTransform(gmscore::math::Matrix4f const&)
谷歌地图中的gmscore::renderer::Camera3D::Transform()(Camera3D.o)
到gmscore::renderer::Cam的非虚拟thunk
#import <XCTest/XCTest.h> 
#import "MyAppDelegate.h"

@interface MyAppTests : XCTestCase

@end

@implementation MyAppTests

- (void)setUp
{
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown
{
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testGoogleMapsAPI
{
    XCTAssertEqual(YES, [[MyAppDelegate appDelegate] activateGoogleMapsAPI], @"Google API    should return YES");
}

@end