Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running 1 of 1 custom shell scripts freeze

I'm building a framework, while trying to compile the framework for production with custom shell script code, it freeze's on this step.

This is the custom shell script code:

# define output folder environment variable
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal

# Step 1. Build Device and Simulator versions
xcodebuild -target SomeSDK ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
xcodebuild -target SomeSDK -configuration ${CONFIGURATION} -sdk iphonesimulator -arch i386 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"

# Step 2. Create universal binary file using lipo
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib${PROJECT_NAME}.a"

# Last touch. copy the header files. Just for convenience
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/include" "${UNIVERSAL_OUTPUTFOLDER}/"

This is an image where it freezes:

custom shell script

How can I fix that? why this is happening?

like image 359
ytpm Avatar asked Mar 20 '15 11:03

ytpm


2 Answers

I found the answer to what I asked for, I just did it wrong.

Let me start by saying that all the tutorials on the web that shows how to create an iOS Static Library, are missing something and not perfect at least what I saw, that's the reason in the first place I had this issue.

Those are the ones I used to do it right:

  • Xcode 6 iOS Creating a Cocoa Touch Framework - Architectures issues
  • Creating a Static Library in iOS Tutorial By Ray Wenderlich

And this is the answer to my problem:

Instead of creating a new Aggregate Target and insert the Custom Shell Script code there, I just added the Custom Shell Script code into the target it self, which was wrong. That's why compilation never completed and always freeze.

Just click on the + button under the Targets section, choose Other and then Aggregate. In this target you have to go and add your Custom Shell Script code and it will works flawless.

Thanks for the help.

Enjoy!

like image 119
ytpm Avatar answered Oct 02 '22 08:10

ytpm


Run this commond in terminal

sudo pkill -9 node

then re-run the project

like image 40
Amit Raj Modi Avatar answered Oct 02 '22 09:10

Amit Raj Modi