Meine Lösung Universal-Rahmen in xcode6 zu erstellen.
diese Schritte versuchen:
Schritt 1:
File—>
New —>
Project —>
Framework & Library —>
Next —>
Product Name
Schritt 2: Erstellen von benutzerdefinierten Klassendateien
Schritt 3:
Target ->
Build phase ->
Headers,
Macht alle Header-Dateien öffentlich. Jetzt im Simulator & Gerät einbauen.
Schritt 4:
File ->
New ->
Target ->
iOS ->
Other ->
Aggrigate ->somename eg: framework
Schritt 5:
From Targets —>
Custom aggregate target(Eg: Framework)—>
Build Phase—>
Add Run script
Schritt 6: In folgenden shell code
in run-Skript
///
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
# Step 2. Copy the framework structure to the universal folder
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"
# Step 3. Create universal binary file using lipo and place the combined executable in the copied framework directory
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework/${PROJECT_NAME}"
Schritt 7:
Goto active scheme —>
Custom aggregate —>
Build
Schritt 8: Jetzt der rechten Maustaste Rahmen von Produkten in Xcode & klicken Show in Finder.
Check „Debug-universal“ -Ordner & bekommen universellen Rahmen.
Sie erstellen statisch-Bibliothek? –
Ihre combine libraries (.a files) bedeutet das (debug.a & release.a) zeige mir mal deine Lipo Aussage –