简体   繁体   English

(Class)不可用:仅在iPhone <= 5模拟器,Generic iOS Device和Release Build上找不到此类的快速声明

[英](Class) is unavailable: cannot find swift declaration for this class ONLY for iPhone <= 5 simulator, Generic iOS Device and Release Build

I understand that many similiar questions have been asked in the past - however, none of them exactly applies to my situation. 我知道过去曾问过许多类似的问题-但是,这些问题都不完全适合我的情况。

I am using the AudioKit framework in my app. 我在我的应用程序中使用AudioKit框架。 I added the framework by copying the framework into the app directory and adding it to embedded binaries. 我通过将框架复制到app目录并将其添加到嵌入式二进制文件中来添加框架。 It runs perfectly on the iOS simulators after the iPhone 5 simulator (ie 5S plus). 它可以在iPhone 5模拟器(即5S plus)之后的iOS模拟器上完美运行。 However, when building for: earlier simulators; 但是,在构建时:早期的模拟器; Generic iOS Device; 通用iOS设备; and my device (which is an iPhone SE) I get the error (Class) is unavailable: cannot find swift declaration for this class where (Class) is every single AudioKit class in my code. 并且我的设备(是iPhone SE)出现错误(Class) is unavailable: cannot find swift declaration for this class其中(类)是我代码中的每个AudioKit类。

As per this answer I've checked the framework's Modules folder and the only files there are x86_64.swiftdoc and x86_64.swiftmodule . 按照这个答案,我检查了框架的Modules文件夹,唯一的文件是x86_64.swiftdocx86_64.swiftmodule As I understand, to build for a real iOS device I need an arm64.swiftmodule . 据我了解,要为真正的iOS设备构建,我需要arm64.swiftmodule However, I cannot figure out how to create this file/where to find it. 但是,我不知道如何创建此文件/在哪里可以找到它。

The linked question would suggest that I need to change the framework's deployment target, but I can't figure out how to change it (or even where the framework's deployment target is stated). 链接的问题将建议我需要更改框架的部署目标,但是我无法弄清楚如何更改框架(甚至说明框架的部署目标在何处)。

I have tried creating a new xCode project, building it from the start for Generic iOS device, then adding the AudioKit framework - but I still get the same errors. 我尝试创建一个新的xCode项目,从Generic iOS设备的开始就构建它,然后添加AudioKit框架-但我仍然遇到相同的错误。

Finally decided to give up trying to make it work. 最终决定放弃尝试使其工作。 Used Carthage instead - works perfectly. 改用二手迦太基-完美工作。 If anyone else has this issue - just use Carthage. 如果还有其他人遇到此问题,请使用迦太基。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM