ionic-cli: Ionic Build is stuck with Xcode 8.0

From @chack on September 21, 2016 20:31

Short description of the problem:

With Xcode 8.0 I can’t use ionic build command for iOS. I already removed and readded hooks and iOS platform. The command is stuck after the printed console log below:

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Build settings from command line:

CONFIGURATION_BUILD_DIR = /Users/Jan/Documents/Wohntraum360/wohntraumapp/platforms/ios/build/emulator

SDKROOT = iphonesimulator10.0
SHARED_PRECOMPS_DIR = /Users/Jan/Documents/Wohntraum360/wohntraumapp/platforms/ios/build/sharedpch

Build settings from configuration file ‘/Users/Jan/Documents/Wohntraum360/wohntraumapp/platforms/ios/cordova/build-debug.xcconfig’:

CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES

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)"
IPHONEOS_DEPLOYMENT_TARGET = 8.0
OTHER_LDFLAGS = -ObjC
SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

TARGETED_DEVICE_FAMILY = 1,2

Which Ionic Version? 1.x or 2.x

2.0 Beta 11

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.3.1 Ionic Framework Version: 2.0.0-beta.11 Ionic CLI Version: 2.0.0 Ionic App Lib Version: 2.0.0-beta.20 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v4.4.7 Xcode version: Xcode 8.0 Build version 8A218a

Copied from original issue: driftyco/ionic#8161

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 29

Most upvoted comments

Just a heads-up. I started to wonder if my issue was related to iCloud sync, so I turned off Desktop and Document sync in iCloud settings on my Mac. Doing so leaves you with NOTHING in the Desktop or Documents local folder, only your files in the iCloud root. But, after copying things back to where they started (Desktop and Documents content) I was able to build just fine with no modifications listed above. Worth noting that my project root is in ~/Documents/Code so it appears that disabling the sync “fixed” some conflict happening there.

So, if you are on Sierra, have a project in a sync path, and this is occurring you might want to try turning off the iCloud sync OR move your project to another location that is not in the path of the sync. Hope this helps.

Removing the hooks and platform and re-adding them did the trick for me:

ionic hooks remove ionic platform remove ios

ionic hooks add ionic platform ios

@TheMattRay you are absolutely right! Coincidentally my project root also resides under ~/Documents/code. I just moved it out as you said, and it is now building, no more hacking required! So, iCloud sync definitively interferes with the building process! Now I wonder why… Im not sure how but this needs to be investigated further and if its a issue related to iCloud we should report it to Apple.

@fabianoarruda Here’s what I’m doing now:

  • Rename XCode.app to Xcode 8.app
  • Download and install XCode 7.3.1
  • Copy Device Support for iOS 10.0 from Xcode 8 installation to Xcode 7.3.1 app. Follow answer in this post: http://stackoverflow.com/questions/37945376/use-xcode-7-with-ios-10
  • When you run ionic build ios on terminal it will now build against XCode 7.3.1
  • When running on actual device or emulator or Archiving to upload to iTunes, use XCode 8.app

It’s damn annoying but this is the only way right now until this is fixed. Anyone have better idea, please share.

@quickly79: Thanks for your response, but I need Xcode 10 for other projects … Any fix ?