CordovaError:否定承诺,但没有错误:“命令:

时间:2019-10-14 07:36:54

标签: swift xcode cordova

背景

  • Xcode版本11.1
  • 在安瓜尔开发的项目
  • 仅使用cordova CLI为iOS iPAD生成内部版本
  • 该应用只能在iPad设备上使用

步骤:

在mac终端实例上运行此命令

sudo cordova构建ios

OR

sudo cordova build ios --buildFlag =“-UseModernBuildSystem = 0”

遇到错误

我得到的实际结果:

构建项目:/Users/ac/Downloads/Cordova/projects/TabProject/platforms/ios/TabApp.xcworkspace     配置:调试     平台:模拟器 从命令行构建设置:     CONFIGURATION_BUILD_DIR = /用户/ ac / Downloads / Cordova / projects / TabProject / platforms / ios / build / emulator     SDKROOT = iphonesimulator13.1     SHARED_PRECOMPS_DIR = /用户/ ac / Downloads / Cordova / projects / InviteTabProject / platforms / ios / build / sharedpch

来自配置文件'/Users/ac/Downloads/Cordova/projects/TabProject/platforms/ios/cordova/build-debug.xcconfig'的构建设置:     CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES =是     CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/ $(PROJECT_NAME)/权利-$(CONFIGURATION).plist     CODE_SIGN_IDENTITY = iPhone开发人员     ENABLE_BITCODE =否     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

xcodebuild:错误:找不到与提供的目标说明符匹配的目标:         {平台:iOS Simulator,操作系统:最新,名称:iPhone 11 Pro Max}

Available destinations for the "InviteTabApp" scheme:
    { platform:iOS Simulator, id:60F220FB-8A96-47FC-9151-49424F7ACD16, OS:9.0, name:iPad 2 }
    { platform:iOS Simulator, id:DAD00D9C-6147-4E55-A35C-2B94D36F4DF4, OS:9.0, name:iPad Air }
    { platform:iOS Simulator, id:6C143FB5-9DC5-4DFC-9B2E-0CC7CC6D5EF9, OS:13.1, name:iPad Air (3rd generation) }
    { platform:iOS Simulator, id:000D0612-6879-4A9D-8508-A5932C5E0007, OS:9.0, name:iPad Air 2 }
    { platform:iOS Simulator, id:D3FAE4AF-F472-438F-99CF-D41EB0EE4662, OS:13.1, name:iPad Pro (9.7-inch) }
    { platform:iOS Simulator, id:D3EC08A7-1690-4934-BF49-A788CC67609C, OS:13.1, name:iPad Pro (11-inch) }
    { platform:iOS Simulator, id:989159C3-CF94-40D9-8FDF-EF4E2B096426, OS:13.1, name:iPad Pro (12.9-inch) (3rd generation) }
    { platform:iOS Simulator, id:7F48ADCE-9E3F-4907-AD76-06E726ED93A6, OS:9.0, name:iPad Retina }

Ineligible destinations for the "TabApp" scheme:
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }

CordovaError:承诺被拒绝,没有错误:'错误代码70,命令:带有args的xcodebuild:-xcconfig,/ Users / ac / Downloads / Cordova / projects / InviteTabProject / platforms / ios / cordova / build-debug.xcconfig ,-workspace,TabApp.xcworkspace,-scheme,TabApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform = iOS Simulator,名称= iPhone 11 Pro Max,版本号,CONFIGURATION_BUILD_DIR = / Users / ac / Downloads / Cordova / projects / TabProject / platforms / ios / build / emulator,SHARED_PRECOMPS_DIR = / Users / ac / Downloads / Cordova / projects / TabProject / platforms / ios / build / sharedpch'     在cli.catch.err(/ usr / local / lib / node_modules / cordova / bin / cordova:30:15)     在process.internalTickCallback(internal / process / next_tick.js:77:7)

实际结果:

构建应该成功生成。

1 个答案:

答案 0 :(得分:0)

检查您的Cordova版本。 尝试更新您的Cordova版本高于7.1.0,然后重写build.json。 Cordova Doc iOS build.json