Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does my iOS 8 framework need its own code signing for distribution?

Tags:

xcode

ios

I am trying to upload my iOS 8 app to the app store for distribution. My app contains a framework created with Xcode 6. I am getting the following provisioning profile error from the uploader tool.

"ERROR ITMS-90161: Invalid Provisioning Profile. The provisioning profile included in the bundle com.auraishere.AuraClient [Payload/hipgroup.app/Frameworks/AuraCore.framework] is invalid. Missing code-signing certificate."

The archiving works fine and I am using a freshly created distribution certificate and profile for both the target and the project. The app id is specific to the bundle name and not a wildcard one.

The framework compiles in a separate framework project successfully using a different organisation's development certificate. Do I need to compile it using a distribution certificate for that organisation or is that not necessary?

I have a script that creates a fat binary using the lipo tool to support multiple architectures and copies the fat binary to my app's project folder. I don't think this is the problem but I have included it in case.

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

# Build framework for iPhoneOS
xcodebuild -target AuraCore ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

# Build framework for iPhoneSimulator
xcodebuild -target AuraCore -configuration ${CONFIGURATION} -sdk iphonesimulator -arch i386 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"

# Build the universal library
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/${PROJECT_NAME}"

# Copy the .framework folder of iphoneos
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"

# Delete the library for iphoneos
rm "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/${PROJECT_NAME}"

# Move the Universal Library into our framework
mv "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/"

# Copy the framework
cp -R "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}"
rm -Rf "${PROJECT_DIR}/../../aura-ios-demo/{PROJECT_NAME}.framework"
cp -Rf "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}/../../aura-ios-demo"

if [ -d "${PROJECT_DIR}/../../concierge" ]; then
    echo "dir exsits"
# Copy the framework
cp -R "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}"
rm -Rf "${PROJECT_DIR}/../../concierge/{PROJECT_NAME}.framework"
cp -Rf "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}/../../concierge"
fi

Any help would be much appreciated. Thanks.

like image 288
brodeo Avatar asked Feb 25 '15 22:02

brodeo


People also ask

What is iOS code signing?

Mandatory code signingTo help ensure that all apps come from a known and approved source and haven't been tampered with, iOS and iPadOS require that all executable code be signed using an Apple-issued certificate. Apps provided with the device, like Mail and Safari, are signed by Apple.

Why is code signing needed?

The answer is code signing. To help users determine whether or not they can trust software before they install it, software publishers can digitally sign their code. A digital signature verifies who signed the code and that the code has not been subject to tampering.

What is code signing entitlement Xcode?

During code signing, the entitlements corresponding to the app's enabled Capabilities/Services are transferred to the app's signature from the provisioning profile Xcode chose to sign the app. The provisioning profile is embedded into the app bundle during the build.


1 Answers

Regarding this developer forum thread: "Frameworks do need to be code signed but Xcode takes care of this for you. They don't need any extra profiles or app ID to run. The only thing you need to do in order to use them is to ensure they are copied properly during the build process with the extra build phase."

Is the "Code Sign On Copy" box checked in the build phase?

enter image description here

like image 105
Balazs Nemeth Avatar answered Sep 27 '22 20:09

Balazs Nemeth