iOS-Universal-Framework icon indicating copy to clipboard operation
iOS-Universal-Framework copied to clipboard

Framework has "no source files," ever

Open pcperini opened this issue 11 years ago • 4 comments

I had the most recent release of this project install in Xcode 4.6.1, and everything worked fine. I updated to Xcode 4.6.2, and now I get this error:

Framework target "${TARGET_NAME}" had no source files to build from. Make sure your source files have the correct target membership

The script also creates a build/ directory in the project folder, with an empty ${TARGET_NAME}.build/ subdirectory.

Edit: This also occurs in a brand new fake library.

pcperini avatar Apr 18 '13 20:04 pcperini

I'm getting this as well.

blackbear avatar May 21 '13 14:05 blackbear

I've been having the same issue where I have my static framework (real framework) project added to my app project. It seems that with every other build I get this error, after which I build again and it cleans everything and building works (which is a pain since this is a large project and takes a while to build again after cleaning). The first script is removing the files that is resulting in the error:

# Make sure we are building from fresh binaries
rm -rf "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
rm -rf "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework"

After digging around, I've determined that the issue appears that after the above script removes the necessary files, the libtool command is not being called afterwards, which is preventing the proper files from existing that the third shell script is looking for here:

if [[ ! -f "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" ]]
then
    echo "Framework target \"${TARGET_NAME}\" had no source files to build from. Make sure your source files have the correct target membership"
    exit 1
fi

Note that in my case I have this error every other time, so it may be related to something with Xcode 4.6 and caching of build that is preventing libtool from being called every time.

u10int avatar Jun 05 '13 23:06 u10int

Hey u10int. I have the same issue where every other build fails. Were you able to resolve it? Thanks.

randombits01 avatar Jul 08 '13 18:07 randombits01

@randombits01 Unfortunately I haven't found a solution, though after upgrading to the latest version of Xcode (4.6.3) I don't notice the issue nearly as much. Not sure if it's related, or the issue is just based on a series of things occurring within Xcode that cause it to happen occasionally.

u10int avatar Jul 11 '13 15:07 u10int