You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode 9.3集成Parrot SDK3遇文件存在却提示“File not found”求助

Fixing "File not found" Error with Parrot SDK3 in Xcode Swift/Objective-C Project

Hey there, let's work through this frustrating "File not found" issue you're hitting with the Parrot SDK3. I’ve dealt with similar headaches when integrating precompiled Objective-C SDKs into Swift projects, so here are some actionable steps to resolve it:

  • Double-check your Header Search Paths
    Even if you’re sure the path is correct, Xcode can be picky about how it resolves paths. Head to your project’s Build Settings, search for Header Search Paths, and make sure the path to the SDK’s header files is added here. Use $(SRCROOT) to anchor relative paths (e.g., $(SRCROOT)/ParrotSDK/Headers) and set the path to recursive so Xcode scans all subfolders. Don’t overlook typos—capitalization errors or missing slashes will break this on macOS.

  • Confirm the SDK is properly embedded
    Precompiled frameworks need to be embedded in your target to be recognized. Go to your target’s General tab, under Frameworks, Libraries, and Embedded Content. The Parrot SDK framework should be listed here, set to Embed & Sign (or Embed Without Signing if it’s already signed by Parrot). If it’s missing, click the + button to add it from your project files.

  • Troubleshoot module map issues
    Many precompiled Objective-C SDKs rely on module maps for Xcode to recognize them. If the SDK includes a module.modulemap file, ensure it’s in the right location relative to the headers, and add its parent folder to Build Settings > Import Paths.
    If there’s no module map, you can create one manually: make a file named module.modulemap in the SDK’s headers folder with this template, adjusting the header name to match your file:

    module ParrotSDK {
        header "YourTargetHeader.h"
        export *
    }
    

    Then add the folder containing this module map to Header Search Paths as a recursive entry.

  • Adjust bridging header settings (even for Objective-C files)
    Even though you’re importing into an Objective-C file, a misconfigured bridging header (used for Swift-ObjC interop) can cause unexpected path issues. Verify your bridging header path is correct in Build Settings > Objective-C Bridging Header, and make sure it doesn’t have invalid imports. You can also try importing the header using the module syntax if the SDK supports it: #import <ParrotSDK/YourHeader.h> instead of a relative path.

  • Wipe Derived Data completely
    Xcode’s cached data often holds onto old path references. Go to Xcode > Settings > Locations, click the arrow next to Derived Data, and delete the entire folder for your project. Restart Xcode and do a full rebuild—this clears way more cache than the standard Product > Clean Build Folder.

  • Check file permissions
    It’s easy to miss, but restricted file permissions can block Xcode from accessing the SDK files. Right-click the SDK framework in your project navigator, select Show in Finder, then press Cmd+I to open file info. Ensure your user account has read access under Sharing & Permissions—adjust it if needed.

Hopefully one of these steps gets the SDK importing correctly for you!

内容的提问来源于stack exchange,提问作者user74

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:33:45