我已将私有框架添加到我的项目中。当我在DEVICE中构建时|释放一切正常,我可以ldid -S该应用程序,它可以在我的设备上成功启动。
I have added Private Frameworks To my project. When I build in DEVICE | RELEASE everything works fine and I am able to ldid -S the application and it successfully launches on my device.
但是,当尝试在模拟器中进行构建和运行时,我得到了错误没有这样的文件或目录,如下所示:(我也得到两次错误,这也很奇怪。)
However, when trying to BUILD AND GO in Simulator, I get the error "No such file or directory" as indicated below: (I also get the error twice which is strange too.)
Line Location HomeProfileViewController.h:10: error: BluetoothManager/BluetoothManager.h: No such file or directory以下是我目前拥有的项目和构建设置,也许有人会发现一个错误并告诉我,那真是太棒了!
Below are the project and build settings that I currently have, maybe someone can find a mistake and let me know, that would be awesome!
项目设置:
PRIVATE_HEADERS_FOLDER_PATH = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" PUBLIC_HEADERS_FOLDER_PATH = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" USER_HEADER_SEARCH_PATHS = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" OTHER_CFLAGS = "-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include-I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include-F/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks-DMAC_OS_X_VERSION_MAX_ALLOWED=1050"目标构建设置:
PRIVATE_HEADERS_FOLDER_PATH = "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks" FRAMEWORK_SEARCH_PATHS = "$(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks" USER_HEADER_SEARCH_PATHS = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include/**" OTHER_CFLAGS = "-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include-I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include-F/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks-DMAC_OS_X_VERSION_MAX_ALLOWED=1050"注意:路径中的引号实际上不在我的项目中,因此我将它们放在了位置,以便站点将它们的语法更好。
Note: The quotation marks in the paths aren't actually in my project, I put them in so the site will syntax them better.
Cydia
Cydia
推荐答案实际上,对于SDK 3.0+,确保二进制文件和标头位于PrivateFrameworks文件夹中,如以下示例所示: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework
Actually, for SDK 3.0+, make sure that binaries and headers are in the PrivateFrameworks folder like the following example: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework
二进制文件和头文件必须在此目录下,头文件必须在/ Headers下,例如: / Developer / Platforms / iPhoneOS .platform / Developer / SDKs / iPhoneOS3.0.sdk / System / Library / PrivateFrameworks / BluetoothManager.framework / Headers / BluetoothManager.h
Binaries and Header files must be under this directory, headers must be under /Headers, for example: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework/Headers/BluetoothManager.h
然后使用这些语句,您将需要专用标头:
then use these statements where you will need the private headers:
#if TARGET_IPHONE_SIMULATOR //This is where you put code for simulator #else //Private functions will go here! #endif现在您可以从上面列出的第一个目录添加私有框架,并且您可以构建模拟器并为设备构建!在设备/模拟器之间切换时,您不必添加/删除框架!
NOW you can add the private framework from the first directory listed above, and you can build and go for simulator, and build for device! YOu wont have to add/delete frameworks when switching between device/simulator!
更多推荐
错误:iPhone专用框架“没有此类文件或目录”
发布评论