Cocoapods框架和SwiftUI预览

Cocoapods框架和SwiftUI预览,swiftui,cocoapods,swiftui-previews,Swiftui,Cocoapods,Swiftui Previews,知道为什么在使用Cocoapods并使用它们构建自定义模块时SwiftUI预览不起作用吗 我已经用Podfile、podspec、targetforios创建了模块。在这里,我放置了应用程序使用的可重用视图。但在开发此类视图时,我无法使用SwiftUI预览在开发过程中预览此视图。我每次都被迫重建应用程序 难道不能在Cocoapods模块/框架中使用预览吗 更新 我已经用Xcode 12创建了一个最简单的框架项目,只添加了一个包含Hello World文本的简单视图,它还可以无限加载,不会显示 R

知道为什么在使用Cocoapods并使用它们构建自定义模块时SwiftUI预览不起作用吗

我已经用Podfile、podspec、targetforios创建了模块。在这里,我放置了应用程序使用的可重用视图。但在开发此类视图时,我无法使用SwiftUI预览在开发过程中预览此视图。我每次都被迫重建应用程序

难道不能在Cocoapods模块/框架中使用预览吗

更新

我已经用Xcode 12创建了一个最简单的框架项目,只添加了一个包含Hello World文本的简单视图,它还可以无限加载,不会显示

RemoteHumanReadableError: Failed to update preview.

Error encountered when sending 'previewInstances' message to agent.

==================================

|  RemoteHumanReadableError
|  
|  LoadingError: failed to load library at path "/Users/m.ziobro/Library/Developer/Xcode/DerivedData/XYZ-bfixqpagwltsdkajsbtktpcwiouc/Build/Intermediates.noindex/Previews/XYZ/Products/Debug-iphonesimulator/XYZ.framework/XYZ": Optional(dlopen(/Users/m.ziobro/Library/Developer/Xcode/DerivedData/XYZ-bfixqpagwltsdkajsbtktpcwiouc/Build/Intermediates.noindex/Previews/XYZ/Products/Debug-iphonesimulator/XYZ.framework/XYZ, 0): no suitable image found.  Did find:
|   /Users/m.ziobro/Library/Developer/Xcode/DerivedData/XYZ-bfixqpagwltsdkajsbtktpcwiouc/Build/Intermediates.noindex/Previews/XYZ/Products/Debug-iphonesimulator/XYZ.framework/XYZ: mach-o, but wrong architecture
|   /Users/m.ziobro/Library/Developer/Xcode/DerivedData/XYZ-bfixqpagwltsdkajsbtktpcwiouc/Build/Intermediates.noindex/Previews/XYZ/Products/Debug-iphonesimulator/XYZ.framework/XYZ: mach-o, but wrong architecture
|   /Users/m.ziobro/Library/Developer/Xcode/DerivedData/XYZ-bfixqpagwltsdkajsbtktpcwiouc/Build/Intermediates.noindex/Previews/XYZ/Products/Debug-iphonesimulator/XYZ.framework/XYZ: mach-o, but wrong architecture)