【问题标题】:Ionic Cordova won't emulate iOS - No scripts found for hookIonic Cordova 不会模拟 iOS - 没有找到钩子的脚本
【发布时间】:2018-10-04 14:44:18
【问题描述】:

我正在尝试使用 Ionic 构建 iOS 应用程序。我使用过 Ionic 1 和 3,两者都出现同样的错误。当我尝试运行 ionic cordova emulate ios --verbose 时,出现以下错误:

Updating Storyboard image set contents.json
This app does not have additional resource files defined
Prepared iOS project successfully
No scripts found for hook "after_prepare".
Building for iPhone XS Max Simulator
Building project: /Users/Jackson/Desktop/Capstone/research_app/todo/platforms/ios/todo.xcworkspace
    Configuration: Debug
    Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/Jackson/Desktop/Capstone/research_app/todo/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.0
    SHARED_PRECOMPS_DIR = /Users/Jackson/Desktop/Capstone/research_app/todo/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/Jackson/Desktop/Capstone/research_app/todo/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

No scripts found for hook "before_deploy".
No target specified for emulator. Deploying to iPhone-XS-Max, 12.0 simulator
/Users/Jackson/Desktop/Capstone/research_app/todo/platforms/ios/build/emulator/todo.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova.

        cordova emulate ios --verbose exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
  ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
  ionic:cli-framework:utils:process onBeforeExit handler: running 2 functions +0ms
  ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +40ms

【问题讨论】:

    标签: cordova ionic-framework ionic3


    【解决方案1】:
    No scripts found for hook "after_prepare".
    

    这不是错误消息,只是日志消息:

    实际的错误信息是:

    /Users/Jackson/Desktop/Capstone/research_app/todo/platforms/ios/build/emulator/todo.app/Info.plist file not found.

    但它具有误导性。实际问题是cordova-ios@4目前与默认使用的Xcode 10中的新构建系统不兼容。

    请参阅this answer 以获得解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-09
      • 1970-01-01
      • 1970-01-01
      • 2020-08-29
      • 2019-10-10
      • 2020-07-15
      • 2019-08-06
      相关资源
      最近更新 更多