Update the build script to support Xcode 10 without xcframework. Also change to build simulator platform using Debug configuration instead of Release configuration
This commit is contained in:
parent
13fdc685f6
commit
c2037417a6
|
@ -982,17 +982,17 @@
|
|||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/build/iphoneos/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/iphonesimulator/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/macosx/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/appletvos/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/appletvsimulator/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/watchos/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/watchsimulator/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/iphoneos/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/iphonesimulator/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/macosx/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/appletvos/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/appletvsimulator/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/watchos/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/watchsimulator/SDWebImage.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "mkdir -p $(SRCROOT)/build\ndeclare -a PLATFORMS=(\"iphoneos\" \"iphonesimulator\" \"macosx\" \"appletvos\" \"appletvsimulator\" \"watchos\" \"watchsimulator\")\nfor CURRENT_PLATFORM in \"${PLATFORMS[@]}\"\ndo\nxcodebuild archive -sdk \"${CURRENT_PLATFORM}\" -scheme SDWebImage -archivePath \"${SRCROOT}/build/${CURRENT_PLATFORM}/SDWebImage.xcarchive\" SKIP_INSTALL=NO\ndone\n";
|
||||
shellScript = "mkdir -p $(SRCROOT)/build\ndeclare -a PLATFORMS=(\"iphoneos\" \"iphonesimulator\" \"macosx\" \"appletvos\" \"appletvsimulator\" \"watchos\" \"watchsimulator\")\nfor CURRENT_PLATFORM in \"${PLATFORMS[@]}\"\ndo\nCONFIGURATION=\"Release\"\nif [[ $CURRENT_PLATFORM == *\"simulator\" ]]; then\nCONFIGURATION=\"Debug\"\nfi\nxcodebuild -sdk \"${CURRENT_PLATFORM}\" -scheme SDWebImage -configuration $CONFIGURATION CONFIGURATION_BUILD_DIR=\"${SRCROOT}/build/${CURRENT_PLATFORM}/\" SKIP_INSTALL=NO\ndone\n";
|
||||
};
|
||||
326CA51422BA25F70033A92F /* Create XCFramework */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
@ -1002,13 +1002,13 @@
|
|||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/build/iphoneos/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/iphonesimulator/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/macosx/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/appletvos/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/appletvsimulator/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/watchos/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/watchsimulator/SDWebImage.xcarchive",
|
||||
"$(SRCROOT)/build/iphoneos/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/iphonesimulator/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/macosx/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/appletvos/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/appletvsimulator/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/watchos/SDWebImage.framework",
|
||||
"$(SRCROOT)/build/watchsimulator/SDWebImage.framework",
|
||||
);
|
||||
name = "Create XCFramework";
|
||||
outputFileListPaths = (
|
||||
|
@ -1018,7 +1018,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "declare -a PLATFORMS=(\"iphoneos\" \"iphonesimulator\" \"macosx\" \"appletvos\" \"appletvsimulator\" \"watchos\" \"watchsimulator\")\nCOMMAND_ARGS=\"\"\nfor CURRENT_PLATFORM in \"${PLATFORMS[@]}\"\ndo\nCOMMAND_ARGS=\"${COMMAND_ARGS} -framework ${SRCROOT}/build/${CURRENT_PLATFORM}/SDWebImage.xcarchive/Products/Library/Frameworks/SDWebImage.framework\"\ndone\nxcodebuild -create-xcframework $COMMAND_ARGS -output \"${SRCROOT}/build/SDWebImage.xcframework\"\nopen -a Finder \"${SRCROOT}/build/SDWebImage.xcframework\"\n";
|
||||
shellScript = "XCODE_VERSION=$(xcodebuild -version | head -n 1| awk -F ' ' '{print $2}')\nXCODE_VERSION_MAJOR=$(echo $XCODE_VERSION | awk -F '.' '{print $1}')\nif [ $XCODE_VERSION_MAJOR -lt 11 ]\nthen\necho \"Xcode 10 does not support xcframework. You can still use the individual framework for each platform.\"\nexit 0\nfi\ndeclare -a PLATFORMS=(\"iphoneos\" \"iphonesimulator\" \"macosx\" \"appletvos\" \"appletvsimulator\" \"watchos\" \"watchsimulator\")\nCOMMAND_ARGS=\"\"\nfor CURRENT_PLATFORM in \"${PLATFORMS[@]}\"\ndo\nCOMMAND_ARGS=\"${COMMAND_ARGS} -framework ${SRCROOT}/build/${CURRENT_PLATFORM}/SDWebImage.framework\"\ndone\nxcodebuild -create-xcframework $COMMAND_ARGS -output \"${SRCROOT}/build/SDWebImage.xcframework\"\nopen -a Finder \"${SRCROOT}/build/SDWebImage.xcframework\"\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
|
Loading…
Reference in New Issue