【问题标题】:AppDelegate.m : Build input file cannot be found for IOS build/run-iosAppDelegate.m:无法为 IOS build/run-ios 找到构建输入文件
【发布时间】:2023-01-30 23:58:36
【问题描述】:

在 React Native 0.68.0 app/Monterey 12.4/Xcode 13 上安装 MS 代码推送模块失败后,react-native run-ios 开始抛出错误:

Build input file cannot be found: '/Users/macair/Documents/code/js/xyz_app6/ios/xyz_app6/AppDelegate.m'

这是 AppDelegate.m:

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>

@property (nonatomic, strong) UIWindow *window;

@end

上述相同的错误也出现在 Xcode 构建中。这似乎是 IOS 的常见问题,但在线解决方案似乎不适用于我的应用程序。 Xcode 下的项目有 AppDelegate.m 并且未更改(更改已删除)。这里缺少什么?

【问题讨论】:

  • Xcode 的版本?另外,确保运行pod deintegrate & pod install

标签: react-native


【解决方案1】:

AppDelegate.m里面的project.pbxproj全部改成AppDelegate.mm(一个让人忍不住想去看的文件)。

【讨论】:

    猜你喜欢
    • 2017-11-22
    • 2019-04-12
    • 2022-09-29
    • 2020-02-03
    • 2022-12-02
    • 1970-01-01
    • 2020-09-01
    • 2019-10-24
    • 1970-01-01
    相关资源
    最近更新 更多