Cannot build for IOS

I am trying to test my app in the IOS simulator but keep getting these errors when I try to run

haxelib run openfl build ios -simulator -Dsource-header=haxe

or

openfl test ios -simulator -Dsource-header=haxe

xcodebuild: error: SDK "iphoneos4.2" cannot be located.

I’m using OSX 10.11.6

I need to look at the utility we use for launching the simulator, I believe it has broken with Apple/Xcode updates, and the newer version of the tool has switched from C++/Objective-C to Ruby, with a JS wrapper. I apologize for the inconvenience at the moment.

Does this command work?

openfl update ios -xcode

No, I get the same error.

Oh, okay, then I bet it’s this bug in HXCPP:

Try patching and see what happens?

After patching still getting the same error. Is this a problem with the current version of Haxe/OpenFl. Is this issue present on older versions?

I am still pretty new to OpenFL.

on a side note, If I can’t get this to work I will have wasted a lot of time on something I cannot sell.

Are you targeting iOS 4.2? If so, try a newer version:

<config:ios deployment="8.0" />

Still the same error. Even though I edited the toolchain/finish-setup.xml and commented out the line

<set name="IPHONE_VER" value="4.2" unless="IPHONE_VER" />

and setting
<config:ios deployment="8.0" />

in my project still seeing the same thing.

Did you run “update” again afterward? I wonder if you have IPHONE_VER set anywhere else (you could try -DIPHONE_VER=8.0)

same thing

ExternalBuildToolExecution Build\ Haxe
cd "/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release/MartialArtsTheGame/haxe"
export ACTION=
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
export ALTERNATE_OWNER=frank
export ALWAYS_SEARCH_USER_PATHS=NO
export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
export APPLE_INTERNAL_DIR=/AppleInternal
export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
export APPLICATION_EXTENSION_API_ONLY=NO
export APPLY_RULES_IN_COPY_FILES=NO
export ARCHS=i386
export AVAILABLE_PLATFORMS="iphonesimulator macosx watchsimulator iphoneos watchos"
export BITCODE_GENERATION_MODE=marker
export BUILD_ACTIVE_RESOURCES_ONLY=YES
export BUILD_COMPONENTS="headers build"
export BUILD_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products
export BUILD_ROOT=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products
export BUILD_STYLE=
export BUILD_VARIANTS=normal
export BUILT_PRODUCTS_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products/Debug-iphonesimulator
export CACHE_ROOT=/var/folders/jv/w8rmwj8x0g15xsx49476ysjm0000gp/C/com.apple.DeveloperTools/7.0.1-7A1001/Xcode
export CLANG_CXX_LANGUAGE_STANDARD=gnu++0x
export CLANG_ENABLE_OBJC_ARC=YES
export CLANG_MODULES_BUILD_SESSION_FILE=/Users/frankh/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation
export CLANG_WARN__DUPLICATE_METHOD_MATCH=YES
export CLASS_FILE_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/JavaClasses"
export CLONE_HEADERS=NO
export CODE_SIGNING_ALLOWED=NO
export COLOR_DIAGNOSTICS=NO
export CONFIGURATION=Debug
export CONFIGURATION_BUILD_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products/Debug-iphonesimulator
export CONFIGURATION_TEMP_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator
export COPYING_PRESERVES_HFS_DATA=NO
export COPY_HEADERS_RUN_UNIFDEF=NO
export COPY_PHASE_STRIP=NO
export CREATE_INFOPLIST_SECTION_IN_BINARY=NO
export DEAD_CODE_STRIPPING=NO
export DEBUGGING_SYMBOLS=YES
export DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
export DEFAULT_COMPILER=com.apple.compilers.llvm.clang.1_0
export DEFAULT_KEXT_INSTALL_PATH=/System/Library/Extensions
export DEFINES_MODULE=NO
export DEPLOYMENT_LOCATION=NO
export DEPLOYMENT_POSTPROCESSING=NO
export DERIVED_FILES_DIR=
export DERIVED_FILE_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/DerivedSources"
export DERIVED_SOURCES_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/DerivedSources"
export DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
export DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export DEVELOPER_FRAMEWORKS_DIR=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
export DEVELOPER_FRAMEWORKS_DIR_QUOTED=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
export DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/Developer/Library
export DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
export DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Tools
export DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
export DEVELOPMENT_LANGUAGE=English
export DO_HEADER_SCANNING_IN_JAM=NO
export DSTROOT=/tmp/MartialArtsTheGame.dst
export DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export DWARF_DSYM_FILE_NAME=.dSYM
export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO
export DWARF_DSYM_FOLDER_PATH=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products/Debug-iphonesimulator
export EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE=NO
export ENABLE_BITCODE=NO
export ENABLE_HEADER_DEPENDENCIES=YES
export ENABLE_ON_DEMAND_RESOURCES=NO
export ENABLE_TESTABILITY=YES
export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES="*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
export FILE_LIST="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/Objects/LinkFileList"
export FRAMEWORK_VERSION=A
export GCC3_VERSION=3.3
export GCC_C_LANGUAGE_STANDARD=gnu99
export GCC_DYNAMIC_NO_PIC=NO
export GCC_OPTIMIZATION_LEVEL=0
export GCC_PREPROCESSOR_DEFINITIONS="DEBUG=1 DEBUG=1 "
export GCC_SYMBOLS_PRIVATE_EXTERN=NO
export GCC_VERSION=com.apple.compilers.llvm.clang.1_0
export GCC_WARN_ABOUT_RETURN_TYPE=YES
export GCC_WARN_UNINITIALIZED_AUTOS=YES
export GCC_WARN_UNUSED_VARIABLE=YES
export GENERATE_MASTER_OBJECT_FILE=NO
export GENERATE_PKGINFO_FILE=NO
export GENERATE_PROFILING_CODE=NO
export GID=20
export GROUP=staff
export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT=YES
export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES=YES
export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS=YES
export HEADERMAP_INCLUDES_PROJECT_HEADERS=YES
export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES=YES
export HEADERMAP_USES_VFS=NO
export HIDE_BITCODE_SYMBOLS=YES
export HOME=/Users/frankh
export INFOPLIST_EXPAND_BUILD_SETTINGS=YES
export INFOPLIST_OUTPUT_FORMAT=binary
export INFOPLIST_PREPROCESS=NO
export INSTALL_DIR=/tmp/MartialArtsTheGame.dst
export INSTALL_GROUP=staff
export INSTALL_MODE_FLAG=u+w,go-w,a+rX
export INSTALL_OWNER=frank
export INSTALL_ROOT=/tmp/MartialArtsTheGame.dst
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
export JAVA_ARCHIVE_CLASSES=YES
export JAVA_ARCHIVE_TYPE=JAR
export JAVA_COMPILER=/usr/bin/javac
export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
export JAVA_JAR_FLAGS=cv
export JAVA_SOURCE_SUBDIR=.
export JAVA_USE_DEPENDENCIES=YES
export JAVA_ZIP_FLAGS=-urg
export KEEP_PRIVATE_EXTERNS=NO
export LD_DEPENDENCY_INFO_FILE=//_dependency_info.dat
export LD_GENERATE_MAP_FILE=NO
export LD_MAP_FILE_PATH="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/-LinkMap--.txt"
export LD_NO_PIE=NO
export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER=YES
export LEGACY_DEVELOPER_DIR=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
export LIBRARY_FLAG_NOSPACE=YES
export LIBRARY_KEXT_INSTALL_PATH=/Library/Extensions
export LINKER_DISPLAYS_MANGLED_NAMES=NO
export LINK_WITH_STANDARD_LIBRARIES=YES
export LOCAL_ADMIN_APPS_DIR=/Applications/Utilities
export LOCAL_APPS_DIR=/Applications
export LOCAL_DEVELOPER_DIR=/Library/Developer
export LOCAL_LIBRARY_DIR=/Library
export MAC_OS_X_PRODUCT_BUILD_VERSION=15G1004
export MAC_OS_X_VERSION_ACTUAL=101106
export MAC_OS_X_VERSION_MAJOR=101100
export MAC_OS_X_VERSION_MINOR=1106
export MODULE_CACHE_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/ModuleCache
export OBJECT_FILE_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/Objects"
export OBJROOT=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates
export ONLY_ACTIVE_ARCH=YES
export OPTIMIZATION_LEVEL=0
export OS=MACOS
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES="/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms"
export PLATFORM_NAME=iphonesimulator
export PLIST_FILE_OUTPUT_FORMAT=binary
export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR=YES
export PRECOMP_DESTINATION_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build/PrefixHeaders"
export PRESERVE_DEAD_CODE_INITS_AND_TERMS=NO
export PRODUCT_NAME=
export PROFILING_CODE=NO
export PROJECT=MartialArtsTheGame
export PROJECT_DERIVED_FILE_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/DerivedSources
export PROJECT_DIR="/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release"
export PROJECT_FILE_PATH="/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release/MartialArtsTheGame.xcodeproj"
export PROJECT_NAME=MartialArtsTheGame
export PROJECT_TEMP_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build
export PROJECT_TEMP_ROOT=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates
export REMOVE_CVS_FROM_RESOURCES=YES
export REMOVE_GIT_FROM_RESOURCES=YES
export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES=YES
export REMOVE_HG_FROM_RESOURCES=YES
export REMOVE_SVN_FROM_RESOURCES=YES
export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES=NO
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk
export SEPARATE_STRIP=NO
export SEPARATE_SYMBOL_EDIT=NO
export SHARED_DERIVED_FILE_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products/Debug-iphonesimulator/DerivedSources
export SHARED_PRECOMPS_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/PrecompiledHeaders
export SKIP_INSTALL=YES
export SOURCE_ROOT="/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release"
export SRCROOT="/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release"
export STRINGS_FILE_OUTPUT_ENCODING=binary
export STRIP_BITCODE_FROM_COPIED_FILES=NO
export STRIP_INSTALLED_PRODUCT=YES
export STRIP_STYLE=all
export SUPPORTED_PLATFORMS="iphonesimulator iphoneos"
export SUPPORTS_TEXT_BASED_API=NO
export SYMROOT=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products
export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities
export SYSTEM_APPS_DIR=/Applications
export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices
export SYSTEM_DEMOS_DIR=/Applications/Extras
export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples"
export SYSTEM_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library"
export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools"
export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Java Tools"
export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools"
export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes"
export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode.app/Contents/Developer/Tools
export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"
export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"
export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode.app/Contents/Developer/Applications/Utilities
export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation
export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions
export SYSTEM_LIBRARY_DIR=/System/Library
export TARGETED_DEVICE_FAMILY=1,2
export TARGETNAME="Build Haxe"
export TARGET_BUILD_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products/Debug-iphonesimulator
export TARGET_DEVICE_MODEL=iPad3,1
export TARGET_DEVICE_OS_VERSION=8.4
export TARGET_NAME="Build Haxe"
export TARGET_TEMP_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build"
export TEMP_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build"
export TEMP_FILES_DIR=
export TEMP_FILE_DIR="/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates/MartialArtsTheGame.build/Debug-iphonesimulator/Build Haxe.build"
export TEMP_ROOT=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Intermediates
export TOOLCHAINS=com.apple.dt.toolchain.iOS9_0
export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
export UID=502
export USER=frank
export USER_APPS_DIR=/Users/frankh/Applications
export USER_LIBRARY_DIR=/Users/frankh/Library
export USE_HEADERMAP=YES
export VALID_ARCHS="i386 x86_64"
export WATCH_BUILT_PRODUCTS_DIR=/Users/frankh/Library/Developer/Xcode/DerivedData/MartialArtsTheGame-csjpijyxtqaiblcmrixddekwoxrj/Build/Products/Debug-watchsimulator
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=7A1001
export XCODE_VERSION_ACTUAL=0701
export XCODE_VERSION_MAJOR=0700
export XCODE_VERSION_MINOR=0700
export arch=i386
export variant=normal
/Applications/Xcode.app/Contents/Developer/usr/bin/make

Haxe simulator build: Debug-iphonesim
haxe Build.hxml -D simulator -cpp build/Debug-iphonesim -debug
cd build/Debug-iphonesim; export HXCPP_NO_COLOR=1; haxelib run hxcpp Build.xml -Dios -Diphone -Dsimulator -DHXCPP_CPP11 -Ddebug -DHXCPP_CLANG -DOBJC_ARC cat Options.txt | while read LINE; do printf " -D$LINE"; done
Creating /Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release/MartialArtsTheGame/haxe/build/Debug-iphonesim/obj/iphonesim-c11-dbg/__pch/haxe/hxcpp.h.gch…
xcodebuild: error: SDK “iphonesimulator4.2” cannot be located.
xcrun: error: unable to find utility “clang++”, not a developer tool or in PATH
Error: error running xcrun --sdk iphonesimulator4.2 clang++ -Iinclude -c -stdlib=libc++ -g -fmessage-length=0 -pipe -Wno-trigraphs -fno-stack-protector -fpascal-strings -fasm-blocks -Wreturn-type -Wno-unused-variable -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -miphoneos-version-min=5.0 -DIPHONE=IPHONE -DIPHONESIM=IPHONESIM -fobjc-arc -DOBJC_ARC -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-bool-conversion -DHXCPP_DEBUG -DSTATIC_LINK -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=330 -I/usr/local/lib/haxe/lib/hxcpp/3,3,49/include -fexceptions -fstrict-aliasing -Wno-invalid-offsetof -x c+±header -o “/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release/MartialArtsTheGame/haxe/build/Debug-iphonesim/obj/iphonesim-c11-dbg/__pch/haxe/hxcpp.h.gch” /usr/local/lib/haxe/lib/hxcpp/3,3,49/include/hxcpp.h
make: *** [build-haxe-i386] Error 1
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2

Haxe simulator build: Debug-iphonesim


haxe Build.hxml -D simulator -cpp build/Debug-iphonesim -debug


cd build/Debug-iphonesim; export HXCPP_NO_COLOR=1; haxelib run hxcpp Build.xml -Dios -Diphone -Dsimulator -DHXCPP_CPP11 -Ddebug -DHXCPP_CLANG -DOBJC_ARC `cat Options.txt | while read LINE; do printf " -D$LINE"; done`


Creating /Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release/MartialArtsTheGame/haxe/build/Debug-iphonesim/obj/iphonesim-c11-dbg/__pch/haxe/hxcpp.h.gch...


xcodebuild: error: SDK "iphonesimulator4.2" cannot be located.


xcrun: error: unable to find utility "clang++", not a developer tool or in PATH


Error: error running xcrun --sdk iphonesimulator4.2 clang++ -Iinclude -c -stdlib=libc++ -g -fmessage-length=0 -pipe -Wno-trigraphs -fno-stack-protector -fpascal-strings -fasm-blocks -Wreturn-type -Wno-unused-variable -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -miphoneos-version-min=5.0 -DIPHONE=IPHONE -DIPHONESIM=IPHONESIM -fobjc-arc -DOBJC_ARC -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-bool-conversion -DHXCPP_DEBUG -DSTATIC_LINK -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=330 -I/usr/local/lib/haxe/lib/hxcpp/3,3,49/include -fexceptions -fstrict-aliasing -Wno-invalid-offsetof -x c++-header -o "/Users/frankh/mobiledevelopment/MartialArts The Card Game/MartialArtsTheGame/Export/ios/release/MartialArtsTheGame/haxe/build/Debug-iphonesim/obj/iphonesim-c11-dbg/__pch/haxe/hxcpp.h.gch" /usr/local/lib/haxe/lib/hxcpp/3,3,49/include/hxcpp.h


make: *** [build-haxe-i386] Error 1


Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2

These are the lines that sticks out at me:
xcodebuild: error: SDK “iphonesimulator4.2” cannot be located.
xcrun: error: unable to find utility “clang++”, not a developer tool or in PATH

Do you have Xcode installed? What version?

Yes I do, it’s version 7.0.1

I believe the latest for macOS 10.11 is 7.3.1, could you see if there is an available update? That might be the issue here

Not getting an update but will try and upgrade to the latest and report back once I have it installed. Thanks!

Upgraded to latest version of Xcode (v 8.0) And still getting the exact same error.

Does any of this help?

No luck. I had come accross this post before too.

This time I am getting this.
xcodebuild: error: SDK "iphonesimulator8.4" cannot be located.

I am able to set the ios version but no matter what version I try I get the same error. I upgraded to the latest version of Xcode before tried this but no luck.

Have you tried 9.3 or 10.0?

No but I was finally able to get it to run. Executing:

openfl test ios -simulator

Has been generating an error. To get it to run I had to specify the target again in xcode and select 8.4 from the list of simulators I selected iphone 6(8.4). By doing this the build was finally able to run the ios simulator. It generated the error 1 time then after selecting run a second time it compiled successfully.

Issue is back now I am getting this:
xcodebuild: error: SDK "iphoneos1" cannot be located.

I thought this was fixed and nowhere is this:
"iphoneos1"
being set

Unable to run openfl test/build ios I get the error above

I updated
toolchain/iphonesim-toolchain.xml lines 18 and 19 to this:

<!-- <exe name="xcrun --sdk iphonesimulator${IPHONE_VER} g++" if="HXCPP_GCC" />
  <exe name="xcrun --sdk iphonesimulator${IPHONE_VER} clang++" /> -->
  <exe name="xcrun --sdk iphoneos8.4 g++" if="HXCPP_GCC" />
  <exe name="xcrun --sdk iphoneos8.4 clang++" />

I hardcoded the ios version in there but it still says it cannot find that IOS version. I am running the latest verion of xcode version 8.0