gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:06:04 24 4
gpt4 key购买 nike

我是 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}/”添加一个Header Search Paths 条目 解决了这个问题。感谢lostInTransit用于指向此属性。

您可以在BuildSettings 下为您的项目目标找到Header Search Paths

关于ios - "Error failed to import bridging header"在设备上安装应用程序时模拟器工作正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36076480/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com