简体   繁体   English

MyClass不可用:找不到此类的Swift声明

[英]MyClass is unavailable: cannot find Swift declaration for this class

I am building a custom framework in swift.I have builded the framework for all the architecture. 我正在迅速构建一个自定义框架。我已经为所有架构构建了框架。 I am using Debug-Universal build in my sample app. 我在示例应用程序中使用Debug-Uni​​versal构建。 Now when I run the app, It works fine in the simulator but while running on the device, I am getting the error Breeze is unavailable: cannot find Swift declaration for this class 现在,当我运行该应用程序时,它在模拟器中可以正常运行,但是在设备上运行时,我收到错误提示: Breeze不可用:找不到此类的Swift声明 在此处输入图片说明

When I am using Release-Universal it is giving No such Module BreezeSDK 当我使用通用发行版时, 没有给出这样的模块BreezeSDK

在此处输入图片说明

Follow these steps after creating the universal binaries: 按照创建通用二进制代码后下列步骤操作:

Before lipo , you are building .framework packages for the individual architectures. lipo之前,您正在为各个体系结构构建.framework软件包。

For each package: 对于每个包装:

  1. Traverse to abc.framework/Modules/abc 遍历到abc.framework/Modules/abc
  2. Copy files .swiftdoc 复制文件.swiftdoc
  3. Go into universal abc 进入universal abc
  4. Traverse to abc.framework/Modules/abc 遍历到abc.framework/Modules/abc
  5. Paste the files you copied in step 2 粘贴您在步骤2中复制的文件

Repeat these steps for all architectures. 对所有体系结构重复这些步骤。

Finally your universal framework package path abc.framework/Modules/abc.swiftmodule/ should contain those files: 最后,通用框架包路径abc.framework/Modules/abc.swiftmodule/应该包含以下文件:

  • arm.swiftdoc swiftdoc
  • arm.swiftmodule arm.swift模块
  • arm64.swiftdoc arm64.swiftdoc
  • arm64.swiftmodule arm64.swiftmodule
  • i386.swiftdoc i386.swiftdoc
  • i386.swiftmodule i386.swiftmodule
  • x86_64.swiftdoc x86_64.swiftdoc
  • x86_64.swiftmodule x86_64.swiftmodule

The Swift compiler needs swiftmodule map files for each architecture. Swift编译器需要每种架构的swiftmodule映射文件。

Follow these steps 跟着这些步骤

  1. Download Bareeze SDK. 下载Bareeze SDK。
  2. Drag and add Breeze.xcodeproj to your project. 将Breeze.xcodeproj拖放到您的项目中。
  3. Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. 接下来,在项目浏览器中选择应用程序项目(蓝色项目图标)以导航到目标配置窗口,并在侧栏中的“目标”标题下选择应用程序目标。
  4. In the tab bar at the top of that window, open the "General" panel. 在该窗口顶部的标签栏中,打开“常规”面板。
  5. Click on the + button under the "Embedded Binaries" section. 单击“嵌入式二进制文件”部分下的+按钮。
  6. Select the top Breeze.framework 选择顶部的Breeze.framework

Hope this might solve the issue. 希望这可以解决问题。

暂无
暂无

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

相关问题 &#39;MyClass&#39;不可用:找不到此类的Swift声明 - 模拟器 - 'MyClass' is unavailable: cannot find Swift declaration for this class - Simulator 桥接标题问题 - &#39;MyClass&#39;不可用:无法找到此类的Swift声明 - Bridging Header issue - 'MyClass' is unavailable: cannot find Swift declaration for this class 在iPhone 4s(iOS 9.3)上构建应用程序时出现错误-“类不可用:找不到该类的Swift声明” - Error - “Class is unavailable : Cannot find Swift declaration for this class”, while building app on iPhone 4s (iOS 9.3) (Class)不可用:仅在iPhone &lt;= 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 继承自MyClass:UIViewController导致错误&#39;无法找到接口声明&#39; - Inheriting from MyClass : UIViewController causes error 'Cannot find interface declaration' Swift:找不到协议声明 - Swift: Cannot find protocol declaration 找不到我班上的协议声明 - Cannot Find Protocol Declaration for my class swift.h找不到Swift类 - swift.h Cannot Find Swift Class Swift错误:“无法找到'SKScene'的接口声明,超类” - Swift error: “Cannot find interface declaration for 'SKScene', superclass of” Swift和ObjC网桥-找不到“ WKNavigationDelegate”的协议声明 - Swift & ObjC bridge - cannot find protocol declaration for “WKNavigationDelegate”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM