无法使用新的 Xcode 10 和 mac Mojave 构建 ionic 3 项目
Posted
技术标签:
【中文标题】无法使用新的 Xcode 10 和 mac Mojave 构建 ionic 3 项目【英文标题】:Can't build ionic 3 project with new Xcode 10 and mac Mojave 【发布时间】:2018-11-05 14:48:30 【问题描述】:该项目运行良好,但由于我更新了 xcode 10 和 mac mojaveOS 只是问题,android 工作正常。我已经添加了我在 github 上从 cordova link 看到的标志,但是这些都没有让我的项目运行,如果我在 xcode 上打开项目,它甚至都不会打开。就崩溃吧。
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
我的控制台日志(它在构建时停在这里)
Reading build config file:
Building for iPhone X Simulator
Building project: /Users/quanticosolutions/Desktop/myseg/mobile/platforms/ios/MyApp.xcworkspace
Configuration: Debug
Platform: emulator
Adding xcodebuildArg: -UseModernBuildSystem=0
User defaults from command line:
UseModernBuildSystem = 0
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/quanticosolutions/Desktop/myseg/mobile/platforms/ios/build/emulator
SDKROOT = iphonesimulator12.1
SHARED_PRECOMPS_DIR = /Users/quanticosolutions/Desktop/myseg/mobile/platforms/ios/build/sharedpch
Build settings from configuration file '/Users/quanticosolutions/Desktop/myseg/mobile/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
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_ROOT/OneSignal/iOS_SDK/OneSignalSDK/Framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "$PODS_ROOT/Headers/Public" "$PODS_ROOT/Headers/Public/OneSignal"
OTHER_CFLAGS = $(inherited) -isystem "$PODS_ROOT/Headers/Public" -isystem "$PODS_ROOT/Headers/Public/OneSignal"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "OneSignal" -framework "SystemConfiguration" -framework "UIKit" -framework "UserNotifications"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = $SRCROOT/.
PODS_ROOT = $SRCROOT/Pods
SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h
我的离子信息
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.0.0-201710070411
Cordova Platforms : android 7.1.1 browser 5.0.3 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 2.0.0
Node : v8.11.1
npm : 5.6.0
OS : macOS
Xcode : Xcode 10.1 Build version 10B61
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
【问题讨论】:
【参考方案1】:我找到的第一个解决方案是降级到 xcode 9.4.1,但现在我无法在 ios 12 的设备上运行,所以不是最好的解决方案,新版本必须删除 ios 平台并再次添加,最新版本ios版本,它工作正常
【讨论】:
以上是关于无法使用新的 Xcode 10 和 mac Mojave 构建 ionic 3 项目的主要内容,如果未能解决你的问题,请参考以下文章
Cocoapods 无法在新的 m1 mac Big Sur Xcode 上运行
在 Xcode 4 中使用 SVN 和 Mac OS X Lion (10.7)