ionic cordova build ios --emulator 不显示失败或成功构建
ionic cordova build ios --emulator dont show fail or success build
我刚刚将 Xcode 更新到版本 10.0 (10A255),它也在我的 macBook 上运行。之后我使用命令
sudo ionic cordova build ios --emulator --prod
然后它开始正常构建,但构建似乎永远不会结束,因为这个过程永远不会 return "Build Failed" 或 "Build successful"。它显然突然结束,这是终端的输出:
Running app-scripts build: --prod --platform ios --target cordova
[16:09:56] build prod started ...
[16:09:56] clean started ...
[16:09:56] clean finished in 3 ms
[16:09:56] copy started ...
[16:09:57] deeplinks started ...
[16:09:58] deeplinks finished in 1.52 s
[16:09:58] ngc started ...
[16:10:27] ngc finished in 28.76 s
[16:10:27] preprocess started ...
[16:10:27] preprocess finished in less than 1 ms
[16:10:27] webpack started ...
[16:10:27] copy finished in 31.56 s
[16:14:50] webpack finished in 263.50 s
[16:14:50] uglify started ...
[16:14:50] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[16:14:53] sass finished in 2.58 s
[16:14:53] cleancss started ...
[16:14:57] cleancss finished in 3.72 s
[16:15:51] uglify finished in 60.77 s
[16:15:51] postprocess started ...
[16:15:51] postprocess finished in 190 ms
[16:15:51] lint started ...
[16:15:51] build prod finished in 355.49 s
> cordova build ios --emulator
Building for iPhone XS Max Simulator
Building project: /Users/usuariomac/WebServer/AppIonicOMT/platforms/ios/OpenMyTab.xcworkspace
Configuration: Debug
Platform: emulator
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/usuariomac/WebServer/AppIonicOMT/platforms/ios/build/emulator
SDKROOT = iphonesimulator12.0
SHARED_PRECOMPS_DIR = /Users/usuariomac/WebServer/AppIonicOMT/platforms/ios/build/sharedpch
Build settings from configuration file '/Users/usuariomac/WebServer/AppIonicOMT/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
[16:16:41] lint finished in 49.36 s
在此之前我的项目构建正常。
我尝试使用命令
将目标更改为以前的 iOS 版本
ionic cordova build ios --emulator --target "iPhone-X, 11.0" --prod
但是没有用。在这个问题上最奇怪的是,如果我从 Xcode 构建应用程序,它 'apparently' 会采用我在应用程序中所做的更改。所以,这是我的离子信息:
cli 包:(/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
全局包:
cordova (Cordova CLI) : 8.0.0
本地包:
@ionic/app-scripts : 3.1.11
Cordova Platforms : android 6.3.0 ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
系统:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v8.6.0
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
环境变量:
ANDROID_HOME : /Users/usuariomac/Library/Android/sdk
杂项:
backend : pro
知道发生了什么事吗?
提前致谢!
这里也是同样的问题
HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/包括""$(BUILT_PRODUCTS_DIR)"
OTHER_LDFLAGS = -ObjC
SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/桥接-Header.h
我试过
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
它可以工作,但是在生成 .ipa 文件之后...该文件无法安装在设备上,在 Xcode
中显示下一个弹出窗口
the entitlements specified in your application’s code signing entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xe8008016).
所以我找到了 post 并尝试了 XCode 中的下一个配置。
Go to Xcode and open the project generated then navigate -> File -> Workspace Settings -> Build System and select "Legacy Build System"
然后我再次尝试没有构建标志的构建命令并且像以前一样工作。
希望对您有所帮助!
我刚刚将 Xcode 更新到版本 10.0 (10A255),它也在我的 macBook 上运行。之后我使用命令
sudo ionic cordova build ios --emulator --prod
然后它开始正常构建,但构建似乎永远不会结束,因为这个过程永远不会 return "Build Failed" 或 "Build successful"。它显然突然结束,这是终端的输出:
Running app-scripts build: --prod --platform ios --target cordova
[16:09:56] build prod started ...
[16:09:56] clean started ...
[16:09:56] clean finished in 3 ms
[16:09:56] copy started ...
[16:09:57] deeplinks started ...
[16:09:58] deeplinks finished in 1.52 s
[16:09:58] ngc started ...
[16:10:27] ngc finished in 28.76 s
[16:10:27] preprocess started ...
[16:10:27] preprocess finished in less than 1 ms
[16:10:27] webpack started ...
[16:10:27] copy finished in 31.56 s
[16:14:50] webpack finished in 263.50 s
[16:14:50] uglify started ...
[16:14:50] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[16:14:53] sass finished in 2.58 s
[16:14:53] cleancss started ...
[16:14:57] cleancss finished in 3.72 s
[16:15:51] uglify finished in 60.77 s
[16:15:51] postprocess started ...
[16:15:51] postprocess finished in 190 ms
[16:15:51] lint started ...
[16:15:51] build prod finished in 355.49 s
> cordova build ios --emulator
Building for iPhone XS Max Simulator
Building project: /Users/usuariomac/WebServer/AppIonicOMT/platforms/ios/OpenMyTab.xcworkspace
Configuration: Debug
Platform: emulator
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/usuariomac/WebServer/AppIonicOMT/platforms/ios/build/emulator
SDKROOT = iphonesimulator12.0
SHARED_PRECOMPS_DIR = /Users/usuariomac/WebServer/AppIonicOMT/platforms/ios/build/sharedpch
Build settings from configuration file '/Users/usuariomac/WebServer/AppIonicOMT/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
[16:16:41] lint finished in 49.36 s
在此之前我的项目构建正常。 我尝试使用命令
将目标更改为以前的 iOS 版本ionic cordova build ios --emulator --target "iPhone-X, 11.0" --prod
但是没有用。在这个问题上最奇怪的是,如果我从 Xcode 构建应用程序,它 'apparently' 会采用我在应用程序中所做的更改。所以,这是我的离子信息:
cli 包:(/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
全局包:
cordova (Cordova CLI) : 8.0.0
本地包:
@ionic/app-scripts : 3.1.11
Cordova Platforms : android 6.3.0 ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
系统:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v8.6.0
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
环境变量:
ANDROID_HOME : /Users/usuariomac/Library/Android/sdk
杂项:
backend : pro
知道发生了什么事吗? 提前致谢!
这里也是同样的问题
HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/包括""$(BUILT_PRODUCTS_DIR)" OTHER_LDFLAGS = -ObjC SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/桥接-Header.h
我试过
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
它可以工作,但是在生成 .ipa 文件之后...该文件无法安装在设备上,在 Xcode
中显示下一个弹出窗口the entitlements specified in your application’s code signing entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xe8008016).
所以我找到了
Go to Xcode and open the project generated then navigate -> File -> Workspace Settings -> Build System and select "Legacy Build System"
然后我再次尝试没有构建标志的构建命令并且像以前一样工作。
希望对您有所帮助!