在模拟器正常工作时在设备上安装应用程序时"Error failed to import bridging header"



我是iOS新手,我来自Android背景。我已经阅读了很多关于这个问题的文章,但我无法解决这个问题。

我的问题是该应用程序在 iPhone 模拟器上运行良好,但在设备上运行时,它会给我以下错误 -

error: 'AFNetworking.h' file not found
#import "AFNetworking.h"
        ^
<unknown>:0: error: failed to import bridging header ‘path/to/project/<main project directory>/projectName-Bridging-Header.h'

更新:

platform :ios, '7.0'
use_frameworks!
target 'SomeTarget' do
pod 'AFNetworking'
pod 'MSDynamicsDrawerViewController'
pod 'KRLCollectionViewGridLayout', '~> 0.2.0'
pod 'Canvas'
pod 'MBProgressHUD'
pod 'RBMenu'
pod 'RKTabView'
pod 'AHTabBarController'
pod 'Fabric'
pod 'Crashlytics'

end

我的桥接头文件

   #import "AFNetworking.h"
#import "UIKit+AFNetworking.h"
#import "MSDynamicsDrawerStyler.h"
#import "KRLCollectionViewGridLayout.h"
#import "Canvas.h"
#import "MBProgressHUD.h"
#import "UIScrollView+TwitterCover.h"
#import "A3ParallaxScrollView.h"
#import "ParallaxHeaderView.h"
#import "UIImage+ImageEffects.h"
#import "SGFocusImageFrame.h"
#import "RBMenu.h"
#import "ILBarButtonItem.h"
#import "CMPopTipView.h"
#import "RKTabView.h"
#import "AHTabBarController.h"
#import "UIViewController+MJPopupViewController.h"
#import "NSString+FontAwesome.h"
#import “KMAccordionTableViewController.h"
#import <Crashlytics/Crashlytics.h>

你能指出我现在遇到的问题吗?为什么它在模拟器上运行良好,而不是在实际设备上运行良好?

这可能会对某人有所帮助。

我通过用递归将标题搜索路径的条目添加到"${PODS_ROOT}/"来解决此问题。感谢 lostInTransit 指出此属性。

可以在项目目标的"生成设置"下找到"页眉搜索路径"。

相关内容

最新更新