Xcode 6 and iOS Static Structures

Many third-party iOS frameworks are built around custom frameworks that you intend to integrate into a dependent application. Before the new iOS Embedded Framework, which only works in iOS8 (see my post here ), there were two elegant solutions for this (when you don’t want to create your own scripts for a matter of time and knowledge about it)

iOS Universal Framework kstenerud

and

iOS Framework jverkoey

They both worked and were a good solution when you need to create .framework to distribute the solution to your customers.

As soon as Xcode6 came out, I was not able to get the first one to work due to compilation errors of another type (see here for details).

So, I switched to the iOS Framework, and with surprise, it still works on XCode6.

So, this tip is for anyone struggling with the iOS Universal Framework and can't find any solution to get it working on Xcode6.

Since, as shown in 1 , now Apple can accept Embedded Frameworks if the deployment target is> = iOS7, this is the best custom solution at the time, and a fix for the iOS Universal Framework could also help. All the problems that I found on it are depicted in 5.

+4
source share
2 answers

Here's the step to create a static cocoa touch framework in Xcode 6.

Xcode , File\New\Project iOS\Framework Library\ Cocoa Touch framework.

.

, . , #import

, . cocoa Touch.

. . "" " ". arm64 armv7, , , . , , iOS .

armv7: iOS 7- armv7s: iPhone 5 5C arm64: 64- ARM iPhone 5S i386: 32- x86_64: 64-

, , . , Xcode ARM, .

Mach-O: :

Final Build:

lipo, script .

FRAMEWORK_NAME="${PROJECT_NAME}"


SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"

DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework"

UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal"

FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"

xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphonesimulator -arch i386 -arch x86_64 -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator | echo

xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphoneos -arch arm64 -arch armv7 -arch armv7s -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos | echo


rm -rf "${UNIVERSAL_LIBRARY_DIR}"

mkdir "${UNIVERSAL_LIBRARY_DIR}"

mkdir "${FRAMEWORK}"


cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"


lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}""${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}" -create -output"${FRAMEWORK}/${FRAMEWORK_NAME}" | echo
+4

Xcode 6 Universal Framework iOS 7, - .

0

All Articles