iOS项目集成PayFort SDK时无法导入对应库的问题求助
Hey there, sorry to hear you're hitting a snag while integrating the PayFort iOS SDK—let's break down the possible fixes to get you back on track:
Double-check your SDK file imports
Make sure you've dragged all the required.frameworkfiles from the PayFort SDK package into your project. When importing, don't forget to tick the "Copy items if needed" box to ensure the files are actually copied into your project directory, not just referenced. Then head toTarget > General > Frameworks, Libraries, and Embedded Contentto confirm each framework is set to eitherEmbed & Signor the appropriate status as per the SDK docs.Verify Build Settings configurations
- Go to
Target > Build Settings > Framework Search Pathsand add the directory where your PayFort SDK frameworks are stored. Using a recursive path like$(PROJECT_DIR)/YourSDKDirectory/**can help Xcode locate the files correctly. - Ensure the
Allow Non-modular Includes in Framework Modulesoption is set toYES—this is a common fix for older SDKs that don't fully support modular imports.
- Go to
Fix your import syntax
If you're working in a Swift project, confirm you've set up a bridging header (if needed) and added the PayFort umbrella header import:#import <PayFortSDK/PayFortSDK.h>. For pure Objective-C projects, double-check that your import statement matches the docs—sometimes typos or incorrect framework naming can block proper imports.Clear cache and rebuild
Xcode's cached data can cause weird import errors. Try:- Pressing
Cmd + Shift + Kto clean the project - Deleting your Derived Data folder (found in Xcode > Preferences > Locations > Derived Data)
- Rebuilding the project with
Cmd + B
- Pressing
Check version compatibility
Ensure your Xcode version is compatible with the v2.8 PayFort SDK. Older Xcode versions might not support the framework's syntax or features, so updating Xcode (if possible) could resolve the issue.
内容的提问来源于stack exchange,提问作者mrs.bassim

