简体   繁体   English

为什么我不能为某些特定的iOS模拟器构建?

[英]Why can't I build for some specific iOS simulators?

I have an app working with my own framework. 我有一个使用我自己的框架的应用程序。 I made the framework build for i386 as well as arm and everything is fine. 我为i386做了框架构建以及arm,一切都很好。 My app used to run on every simulators and is available on the store. 我的应用程序曾经在每个模拟器上运行,并且可以在商店中使用。

Now, for some reason, i can't run my app on some simulators. 现在,出于某种原因,我无法在某些模拟器上运行我的应用程序。 The simulators that work : 有效的模拟器:

  • iPhone 4s iPhone 4s
  • iPhone 5 iphone 5
  • iPad 2 iPad 2
  • iPad Retina iPad Retina

The simulators that doesn't work : 无效的模拟器:

  • iPhone 5S iPhone 5S
  • iPhone 6 iPhone 6
  • iPhone 6S iPhone 6S
  • iPad Air iPad Air
  • Resizable iPhone 可调整大小的iPhone
  • Resizable iPad 可调整大小的iPad

The error is that a *.h file from my framework in not found. 错误是找不到我框架中的* .h文件。

I'd like to know what can prevent this file from being found, or rather what search path is not used with some simulators. 我想知道什么可以阻止找到这个文件,或者更确切地说某些模拟器没有使用什么搜索路径。 There must be some project/target property that screws with those simulator types, except that i can't find any that would make a difference. 必须有一些项目/目标属性与这些模拟器类型拧紧,除了我找不到任何会产生影响的。

In my code i've searched for any kind of difference i would make, but they are just about iOS version regarding UI components. 在我的代码中,我搜索了我会做出的任何差异,但它们只是关于UI组件的iOS版本。 I also use TARGET_IPHONE_SIMULATOR but it should not make any difference between simulators. 我也使用TARGET_IPHONE_SIMULATOR但它不应该在模拟器之间有任何区别。

FYI, my app version nows include Watch Kit. 仅供参考,我的应用程序版本包括Watch Kit。 It's working on the Apple Watch as well as on the Apple Watch simulator attached to the iPhone 5 (external display). 它正在Apple Watch以及连接到iPhone 5(外部显示器)的Apple Watch模拟器上运行。 It may be related... 它可能是相关的......

Any help much appreciated! 任何帮助非常感谢!

Edit: The full error description: 编辑:完整的错误说明:

/Users/me/sources/myApp/iOS/trunk/include/someFile.h:18:10: 'dir/someOtherFile.h' file not found /Users/me/sources/myApp/iOS/trunk/include/someFile.h:18:10:'dir / someOtherFile.h'文件未找到

Edit: Header files in all targets: 编辑:所有目标中的头文件:

My framework and every files that include any .h of my framework are only part of the myApp, i took care not adding any reference in myApp.watchkit or myApp.watchkitextension 我的框架和包含我的框架的任何.h的每个文件都只是myApp的一部分,我注意不要在myApp.watchkit或myApp.watchkitextension中添加任何引用

Edit: Solutions tried: 编辑:解决方案:

  • Xcode restart Xcode重启
  • Reboot 重启
  • +Alt+Shift+K + Alt + Shift的+ K
  • Delete derived data 删除派生数据

Edit: 64-bits: 编辑:64位:

I use some paths like that in the project file: $(FRAMEWORK_SEARCH_PATHS)frameworkName_$(CURRENT_ARCH).framework/Versions/A/Headers For example, it refers to '/searchPathFolder/frameworkName_i386.framework/...' when i build for simulators. 我在项目文件中使用了类似的路径: $(FRAMEWORK_SEARCH_PATHS)frameworkName_$(CURRENT_ARCH).framework/Versions/A/Headers例如,当我构建时,它引用'/searchPathFolder/frameworkName_i386.framework / ...'模拟器。

Solved. 解决了。 The issue came from my framework that for some reason wasn't build for 64 bits simulator versions. 问题来自我的框架,由于某种原因,它不是为64位模拟器版本构建的。

For everything to work fine, the project needs 4 versions of the framework: x86 (32 bits simulator), x64 (64 bits simulator), armv7 (32 bits device) and arm64 (64 bits device). 为了使一切工作正常,该项目需要4个版本的框架: x86 (32位模拟器), x64 (64位模拟器), armv7 (32位器件)和arm64 (64位器件)。

Then with project properties, unnecessary frameworks are simply ignored at build time: 然后使用项目属性,在构建时忽略不必要的框架:

ignoring file myFramework_i386.framework/myFramework_i386, file was built for archive which is not the architecture being linked (arm64)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 升级我的Mac后,无法再为iOS模拟器构建 - Can't build for iOS simulators any more after upgrading my mac 我现在从Mac中删除了所有IOS模拟器,我无法添加任何一个 - I removed all the IOS simulators from my mac now I can't add any one Xcode 10.1找不到或创建iOS模拟器 - Xcode 10.1 Can't Find or Create iOS Simulators 如何从构建目标中删除模拟器? - How can I remove the simulators from my build targets? 为某些iOS模拟器构建CocoaPods库错误 - CocoaPods libraries errors building for some iOS simulators Xcode 9.3.1 组件列表为空,无法下载 iOS 10 模拟器 - Xcode 9.3.1 components list empty, can't download iOS 10 simulators 架构x86_64的未定义符号-我可以在设备上构建和运行,但不能在模拟器上运行 - Undefined symbols for architecture x86_64 - I can build and run on devices, but not for simulators 无法在特定的 ios 设备中安装我的 Adhoc ios 构建(iPhone XS - iOS 14.2) - Can't install my Adhoc ios build in a specific ios Device (iPhone XS - iOS 14.2) 如何在我的iOS模拟器上自动安装自定义CA根证书以进行测试? - How can I automatically install a custom CA root certificate on my iOS simulators for testing? 这是 IOS 模拟器 12.1 和 12.4 的空列表。 我怎样才能重新安装它们? - Here is the Empty List of IOS simulators 12.1 and 12.4. How can I install them back?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM