所以我有一个应用程序...... Android构建得很好。 Xcode已安装并更新(并打开项目,但无法像Android一样正常工作)。 Brew更新了。 GCC 4.9已安装并更新。 GCC 5.x已安装并更新。
更新:
当我运行ionic run ios
或ionic build ios
时,我会收到以下信息:
$ ionic build ios
Running command: /Users/<username>/Documents/Projects/<my app>/hooks/after_prepare/010_add_platform_class.js /Users/<username>/Documents/Projects/<my app>
add to body class: platform-ios
Running command: /Users/<username>/Documents/Projects/<my app>/platforms/ios/cordova/build
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/emulator
SDKROOT = iphonesimulator9.0
SHARED_PRECOMPS_DIR = /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch
VALID_ARCHS = i386
=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===
Check dependencies
ProcessPCH /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/<username>/Documents/Projects/estore/bin:/usr/local/bin:/Users/<username>/Documents/Projects/estore/bin:/usr/local/bin:/Users/<username>/Documents/Projects/estore/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Android-SDK/tools:/Applications/Android-SDK/tools:/Applications/Android-SDK/tools"
/usr/local/bin/gcc-4.9 -x objective-c-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=6.0 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-generated-files.hmap -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-own-target-headers.hmap -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-all-target-headers.hmap -iquote /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Cordova-project-headers.hmap -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/build/emulator/include -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/DerivedSources/i386 -I/Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/DerivedSources -F/Users/<username>/Documents/Projects/<my app>/platforms/ios/build/emulator -DDEBUG -MD -MT dependencies -MF /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.d -c /Users/<username>/Documents/Projects/<my app>/platforms/ios/CordovaLib/CordovaLib_Prefix.pch -o /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.pch --serialize-diagnostics /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.dia
gcc-4.9: error: /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.dia: No such file or directory
gcc-4.9: error: unrecognized command line option '-fdiagnostics-show-note-include-stack'
gcc-4.9: error: unrecognized command line option '-fmacro-backtrace-limit=0'
gcc-4.9: error: unrecognized command line option '-fobjc-arc'
gcc-4.9: error: unrecognized command line option '-fpascal-strings'
gcc-4.9: error: unrecognized command line option '-Wduplicate-method-match'
gcc-4.9: error: unrecognized command line option '-Wconstant-conversion'
gcc-4.9: error: unrecognized command line option '-Wint-conversion'
gcc-4.9: error: unrecognized command line option '-Wbool-conversion'
gcc-4.9: error: unrecognized command line option '-Wenum-conversion'
gcc-4.9: error: unrecognized command line option '-fasm-blocks'
gcc-4.9: error: unrecognized command line option '-mios-simulator-version-min=6.0'
gcc-4.9: error: unrecognized command line option '-fobjc-legacy-dispatch'
gcc-4.9: error: unrecognized command line option '--serialize-diagnostics'
Command /usr/local/bin/gcc-4.9 failed with exit code 1
** BUILD FAILED **
The following build commands failed:
ProcessPCH /Users/<username>/Documents/Projects/<my app>/platforms/ios/build/sharedpch/CordovaLib_Prefix-dfsftoblrnqbbfbitbtcmqjdikqe/CordovaLib_Prefix.pch.pch CordovaLib_Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR building one of the platforms: Error: /Users/<username>/Documents/Projects/<my app>/platforms/ios/cordova/build: Command failed with exit code 65
You may not have the required environment or OS to build this project
我被困住了,我需要建立......有人可以帮忙吗?
答案 0 :(得分:1)
解决。这是一个权限错误。在sudo
下运行最初修复它,然后当我清除其余文件夹上的权限时,它在没有sudo
的情况下正常工作。