使用模块接口的桥接标头是不支持的当我尝试构建项目时,会发生这种错误,其中包括Swift和Objective-C代码的组合。以前,一切都很好,但是在更新后,构建失败了此错误。 关于我的项目的详细信息:
MyFramework-Bridging-Header.h
Defines Module
YES
I验证了桥接标头在
Product > Clean Build Folder
构建设置中正确引用。
i用模块地图和伞状标头替换了桥接标头。这是我目前的设置:umbrella标头(
Objective-C Bridging Header
):MyFrameworkName.h
模块地图(
#import <Foundation/Foundation.h>
// Public headers
#import "GeneratedPluginRegistrant.h"
#import "Flutter.h"
#import "FlutterPlugin.h"
module.modulemap
I卸下了桥接标头,并在构建设置中添加了
framework module MyFrameworkName {
umbrella header "MyFrameworkName.h"
export *
module * { export * }
}
路径。
设置设置为Module Map File
.。
尽管有这些更改,但我现在遇到一个新错误:Defines Module
更改后的新错误:
最初的错误在更新为MacOS 15.3和Xcode 16.2?
之后会发生原始错误错误?使用模块地图和雨伞标头时,我可以如何解决
YES
additional信息:
XCODE版本:
flutter not found on AppDelegate
flutter not found on AppDelegate
GeneratedPluginRegistrant.h
#import <Flutter/Flutter.h>
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
FlutterViewController *controller = (FlutterViewController *)self.window.rootViewController;
[GeneratedPluginRegistrant registerWithRegistry:controller];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
Defines Module
YES
Module Map File
:(空)任何有关如何解决此问题的帮助或指导将不胜感激!
在更新到$(SRCROOT)/path/to/module.modulemap
从Objective-C Bridging Header
firebase_messaging
^14.6.9
从^15.0.0
到firebase_core