• <bdo id='JVa58'></bdo><ul id='JVa58'></ul>
    1. <i id='JVa58'><tr id='JVa58'><dt id='JVa58'><q id='JVa58'><span id='JVa58'><b id='JVa58'><form id='JVa58'><ins id='JVa58'></ins><ul id='JVa58'></ul><sub id='JVa58'></sub></form><legend id='JVa58'></legend><bdo id='JVa58'><pre id='JVa58'><center id='JVa58'></center></pre></bdo></b><th id='JVa58'></th></span></q></dt></tr></i><div id='JVa58'><tfoot id='JVa58'></tfoot><dl id='JVa58'><fieldset id='JVa58'></fieldset></dl></div>

      <tfoot id='JVa58'></tfoot>
      <legend id='JVa58'><style id='JVa58'><dir id='JVa58'><q id='JVa58'></q></dir></style></legend>

      <small id='JVa58'></small><noframes id='JVa58'>

      XCTest.framework 构建错误

      时间:2023-05-18
    2. <legend id='lVnNd'><style id='lVnNd'><dir id='lVnNd'><q id='lVnNd'></q></dir></style></legend>
          • <tfoot id='lVnNd'></tfoot>

            <small id='lVnNd'></small><noframes id='lVnNd'>

                <tbody id='lVnNd'></tbody>
              <i id='lVnNd'><tr id='lVnNd'><dt id='lVnNd'><q id='lVnNd'><span id='lVnNd'><b id='lVnNd'><form id='lVnNd'><ins id='lVnNd'></ins><ul id='lVnNd'></ul><sub id='lVnNd'></sub></form><legend id='lVnNd'></legend><bdo id='lVnNd'><pre id='lVnNd'><center id='lVnNd'></center></pre></bdo></b><th id='lVnNd'></th></span></q></dt></tr></i><div id='lVnNd'><tfoot id='lVnNd'></tfoot><dl id='lVnNd'><fieldset id='lVnNd'></fieldset></dl></div>
                <bdo id='lVnNd'></bdo><ul id='lVnNd'></ul>
                本文介绍了XCTest.framework 构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我在我的应用程序中使用 DropBox Core API,因此,我必须包含 XCTest 框架,因为当我没有添加 XCTest 框架时,我的应用程序无法连接到 Dropbox,但是当我添加框架,在为模拟器构建时出现错误.我的代码没有任何问题!这是错误:

                I am using the DropBox Core API in my app and therefore, I must include the XCTest framework, because, when I haven't added the XCTest framework, my app can't connect to dropbox, however when I do add the framework, I get an error while building for the simulator. There is nothing wrong with my code! Here is the error:

                Ld /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator/SnapDrop!.app/SnapDrop! normal i386
                    cd "/Users/Zach/Desktop/SnapDrop!"
                    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
                    setenv PATH "/Applications/Xcode5-DP6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode5-DP6.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
                    /Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode5-DP6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator -F/Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator -F/Users/Zach/Downloads/dropbox-ios-sdk-1.3.5 -F/Users/Zach/Downloads/dropbox-ios-sync-sdk-1-1.1.0 -F/Applications/Xcode5-DP6.app/Contents/Developer/Library/Frameworks -F/Users/Zach/Desktop -filelist /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Intermediates/SnapDrop!.build/Debug-iphonesimulator/SnapDrop!.build/Objects-normal/i386/SnapDrop!.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework iAd -framework AssetsLibrary -framework QuartzCore -framework SystemConfiguration -framework Security -framework CFNetwork -framework XCTest -framework Dropbox -framework DropboxSDK -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Intermediates/SnapDrop!.build/Debug-iphonesimulator/SnapDrop!.build/Objects-normal/i386/SnapDrop!_dependency_info.dat -o /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator/SnapDrop!.app/SnapDrop!
                
                ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode5-DP6.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386
                clang: error: linker command failed with exit code 1 (use -v to see invocation)
                

                我该怎么办?如果我的框架损坏了,你能告诉我如何重新安装它吗?我试过删除并重新安装 Xcode,但没有成功.

                What should I do? If my framework is corrupt, can you tell me how to reinstall it? I have tried deleting and reinstalling Xcode with no luck.

                推荐答案

                我同意 Mike Weller 的观点.您可能不应该在您的实际应用程序代码中链接 XCTest 框架.删除 XCTest 框架.查看链接器错误并删除引用框架的内容.清洗,冲洗,重复.

                I agree with Mike Weller. You should probably not be linking against the XCTest framework in your actual app code. Remove XCTest framework. Look at the linker errors and remove things that are referencing the framework. Wash, rinse, repeat.

                如果你有一个测试目标,那就不同了.在从 SenTestKit 迁移到 XCTest 的过程中很容易发生的情况是框架搜索路径错误,这会导致链接到 Mac OS X 框架而不是 iOS 框架.这行不通.

                If you have a test target, that is different. What can easily happen during the migration from SenTestKit to XCTest is having the wrong framework search path which causes linking against the Mac OS X framework instead of the iOS framework. This doesn't work.

                查看正确的框架搜索路径设置的简单方法是创建一个虚拟项目,打开测试目标的构建设置,然后过滤框架搜索路径".

                An easy way to see what the correct framework search path settings are is to create a dummy project, open the build settings for the Tests target and then filter for "Framework Search Path."

                我认为正确的原版路径是:

                I think the correct vanilla paths are:

                $(SDKROOT)/Developer/Library/Frameworks     (non-recursive)
                $(inherited)                                (non-recursive)
                $(DEVELOPER_FRAMEWORKS_DIR)                 (non-recursive)
                

                这篇关于XCTest.framework 构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:格式错误或损坏的 AST 文件 下一篇:框架的私有模块映射

                相关文章

                <i id='fAeXn'><tr id='fAeXn'><dt id='fAeXn'><q id='fAeXn'><span id='fAeXn'><b id='fAeXn'><form id='fAeXn'><ins id='fAeXn'></ins><ul id='fAeXn'></ul><sub id='fAeXn'></sub></form><legend id='fAeXn'></legend><bdo id='fAeXn'><pre id='fAeXn'><center id='fAeXn'></center></pre></bdo></b><th id='fAeXn'></th></span></q></dt></tr></i><div id='fAeXn'><tfoot id='fAeXn'></tfoot><dl id='fAeXn'><fieldset id='fAeXn'></fieldset></dl></div>

                <tfoot id='fAeXn'></tfoot>

                1. <small id='fAeXn'></small><noframes id='fAeXn'>

                    <legend id='fAeXn'><style id='fAeXn'><dir id='fAeXn'><q id='fAeXn'></q></dir></style></legend>
                    • <bdo id='fAeXn'></bdo><ul id='fAeXn'></ul>