首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >空白应用程序调试生成失败-找不到/Info.plist文件

空白应用程序调试生成失败-找不到/Info.plist文件
EN

Stack Overflow用户
提问于 2018-10-01 04:27:28
回答 6查看 12.1K关注 0票数 12

在更大的上下文中,我转而创建一个空白项目并运行构建命令。同样的错误:

代码语言:javascript
复制
ionic start myApp blank
cd myApp
ionic cordova run ios --debug --target="iPhone-8"  --consolelogs



ionic-app-scripts build --target cordova --platform ios
[11:39:29]  ionic-app-scripts 3.2.0 
[11:39:29]  build dev started ... 
[11:39:30]  clean started ... 
[11:39:30]  clean finished in 1 ms 
[11:39:30]  copy started ... 
[11:39:30]  deeplinks started ... 
[11:39:30]  deeplinks finished in 15 ms 
[11:39:30]  transpile started ... 
[11:39:33]  transpile finished in 3.16 s 
[11:39:33]  preprocess started ... 
[11:39:33]  preprocess finished in 1 ms 
[11:39:33]  webpack started ... 
[11:39:33]  copy finished in 3.31 s 
[11:39:37]  webpack finished in 4.35 s 
[11:39:37]  sass started ... 
[11:39:38]  sass finished in 1.27 s 
[11:39:38]  postprocess started ... 
[11:39:38]  postprocess finished in 10 ms 
[11:39:38]  lint started ... 
[11:39:38]  build dev finished in 8.92 s 
[11:39:41]  lint finished in 2.65 s 
> cordova run ios --debug --target iPhone-8
Building for iPhone 8 Simulator
Building project: /myApp/platforms/ios/myApp.xcworkspace
    Configuration: Debug
    Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = 
/myApp/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.0
    SHARED_PRECOMPS_DIR = 
/myApp/platforms/ios/build/sharedpch

Build settings from configuration file '
/myApp/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    OTHER_LDFLAGS = -ObjC
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

/myApp/platforms/ios/build/emulator/myApp.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova.

        cordova run ios --debug --target iPhone-8 exited with exit code 1.

        Re-running this command with the --verbose flag may provide more 
        information.

ionic --version
4.1.2
cordova --version
8.0.0 & @latest 8.1.1
XCode Version 10.0 (10A255) + build tools
macOS 10.13.6 - High Sierra. Mojave on a different machine fails the same.

如果有人好奇的话,路径会被调整。

-

连同@DaveAlden的回答,这就是我如何让它恢复到没有虫子的肝脏:

ionic cordova platform remove ios sudo npm install -g ionic@3.20.0 ionic cordova platform add ios open platform/ios/MyApp.xcworkspace

按照指示返回到遗留构建系统(如在https://github.com/apache/cordova-ios/issues/407上)

运行我的构建脚本,不使用--buildFlag='-UseModernBuildSystem=0'

EN

回答 6

Stack Overflow用户

回答已采纳

发布于 2018-10-01 09:23:20

造成此问题的原因是Xcode 10包含一个新的构建系统,该系统目前与cordova-ios@4 - 请看这里不兼容。

现在的解决方案是使用--buildFlag='-UseModernBuildSystem=0'选项运行Cordova,以指示Xcode使用旧的构建系统,例如:

代码语言:javascript
复制
 cordova run ios --debug --target "iPhone-8" --buildFlag='-UseModernBuildSystem=0'

更新:为了我自己的方便,我用一个shell脚本包装了它:

代码语言:javascript
复制
#!/bin/bash
# Adds build flag to make cordova-ios@4 work with Xcode 10
cordova "$@" --buildFlag='-UseModernBuildSystem=0'

我将它保存在一个名为cordova-xcode10的文件中,确保它在路径中并使其可执行(chmod a+x cordova-xcode10),然后我就可以这样做了:

代码语言:javascript
复制
cordova-xcode10 run ios --target "iPhone-8"

它将与Xcode 10一起工作。

票数 38
EN

Stack Overflow用户

发布于 2019-01-26 10:34:09

这个问题是由Xcode 10引起的,我用两种方法解决了这个问题。

  1. 离子cordova构建ios --构建国旗=“-UseModernBuildSystem=0”
  2. 在项目根目录上创建一个build.json文件。

在build.json中编写下面的代码。

代码语言:javascript
复制
{
    "ios": {
        "debug": {
            "buildFlag": ["-UseModernBuildSystem=0"]
        },
        "release": {
            "buildFlag": ["-UseModernBuildSystem=0"]
        }
    }
}

之后,您可以运行这些命令,而不会出现任何错误。

  • ionic cordova build ios
  • ionic cordova run ios
  • ionic cordova run ios --target="iPhone-6s" -l
票数 7
EN

Stack Overflow用户

发布于 2019-02-20 04:03:22

这对我来说很管用

代码语言:javascript
复制
Open your workspace file, then File --> WorkSpace Settings

In shared Workspace settings, choose Build System: Legacy Build System.

Then run ionic cordova run -l

来源(最后评论):https://forum.ionicframework.com/t/fresh-ionic-fails-to-emulate-ios-12-info-plist-file-not-found/142291

更新

我刚发现Cordova IOS 5.0.0发布了。https://cordova.apache.org/announcements/2019/02/09/cordova-ios-release-5.0.0.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52584550

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档