Social模块的swift代码demo我没有
不过“a valid provisioning profile for this excitable was not found” 这个问题是很久的了
这是LeanCloud Dynamic下的一个问题
需要人手替换Framework内的embedded.mobileprovision
首先把你自己的mobileprovision下载下来(debug的话用debug的也是可以的,提交上App Store就一定要用Distribution的mobileprovision)
打开Pods/
进去AVOSCloudDynamic 直到看见AVOSCloud.framework
再进一层就会见到embedded.mobileprovision
将你自己app的provision file替换进去 同时改名做embedded.mobileprovision <- 这步最重要
然后在Xcode中的Build Phase加入以下的script(只对distribution有效)
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name 'AVOSCloud*.framework' -type d | while read -r FRAMEWORK; do
EXTRACTED_ARCHS=()
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
for ARCH in $ARCHS; do
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
rm "${EXTRACTED_ARCHS[@]}"
echo "prepare resign framework "$FRAMEWORK
/usr/bin/codesign -f -s "${CODE_SIGN_IDENTITY}" $FRAMEWORK
done
记得加上Show environment variables in build log和Run script only when installing
你再试试能安装不