-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
92 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# Xcode | ||
# | ||
build/ | ||
.build/ | ||
Carthage/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.0 | ||
5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--disable blankLinesAroundMark,blankLinesAtStartOfScope | ||
--patternlet inline | ||
--stripunusedargs closure-only | ||
--swiftversion 5.0 | ||
--swiftversion 5.3 | ||
--wraparguments beforefirst | ||
--wrapcollections beforefirst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Pod::Spec.new do |s| | ||
|
||
s.name = "MonkeyKing" | ||
s.version = "1.16.0" | ||
s.version = "1.17.0" | ||
s.summary = "MonkeyKing helps you to post messages to Chinese Social Networks, or do OAuth and Payment." | ||
|
||
s.description = <<-DESC | ||
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s| | |
s.authors = { "nixzhu" => "[email protected]" } | ||
s.social_media_url = "https://twitter.com/nixzhu" | ||
|
||
s.ios.deployment_target = "8.0" | ||
s.ios.deployment_target = "9.0" | ||
s.swift_version = '5.0' | ||
|
||
s.source = { :git => "https://github.com/nixzhu/MonkeyKing.git", :tag => s.version } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,42 @@ | ||
// swift-tools-version:5.1 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
// swift-tools-version:5.3 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "MonkeyKing", | ||
platforms: [ | ||
.iOS(.v8), | ||
.iOS(.v9), | ||
], | ||
products: [ | ||
// Products define the executables and libraries produced by a package, and make them visible to other packages. | ||
.library( | ||
name: "MonkeyKing", | ||
name: "MonkeyKingStatic", | ||
type: .static, | ||
targets: ["MonkeyKingSource"] | ||
), | ||
.library( | ||
name: "MonkeyKingDynamic", | ||
type: .dynamic, | ||
targets: ["MonkeyKingSource"] | ||
), | ||
.library( | ||
name: "MonkeyKingXCFramework", | ||
targets: ["MonkeyKing"] | ||
), | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
// .package(url: /* package url */, from: "1.0.0"), | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
// Targets can depend on other targets in this package, and on products in packages which this package depends on. | ||
.target( | ||
name: "MonkeyKing", | ||
dependencies: [] | ||
name: "MonkeyKingSource", | ||
path: "Sources/MonkeyKing" | ||
), | ||
.testTarget( | ||
name: "MonkeyKingTests", | ||
dependencies: ["MonkeyKing"] | ||
dependencies: ["MonkeyKing"], | ||
path: "Tests/MonkeyKingTests" | ||
), | ||
.binaryTarget( | ||
name: "MonkeyKing", | ||
url: "https://github.com/nixzhu/MonkeyKing/releases/download/pre-1.17.0/MonkeyKing.xcframework.zip", | ||
checksum: "1b4fafe9b3c438c7fe9f3490a5b4194baad0cb70c20ee374e0fb86326ee0e283" | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# carthage-build.sh | ||
# Usage example: ./carthage-build.sh --platform iOS | ||
|
||
set -euo pipefail | ||
|
||
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) | ||
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT | ||
|
||
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise | ||
# the build will fail on lipo due to duplicate architectures. | ||
# Xcode 12 GM (12A7209) | ||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7209 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig | ||
|
||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig | ||
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig | ||
|
||
export XCODE_XCCONFIG_FILE="$xcconfig" | ||
|
||
rm -rf Carthage/Build | ||
|
||
carthage build --no-skip-current --platform iOS | ||
|
||
cd Carthage/Build && zip -vry MonkeyKing.Carthage.framework.zip ./ -x "*.DS_Store" | ||
|
||
open . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
xcodebuild archive -project "China.xcodeproj" \ | ||
-scheme "MonkeyKing" -configuration Release \ | ||
-sdk iphonesimulator \ | ||
-archivePath "build/MonkeyKing/Simulator" \ | ||
SKIP_INSTALL=NO \ | ||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | ||
|
||
xcodebuild archive -project "China.xcodeproj" \ | ||
-scheme "MonkeyKing" -configuration Release \ | ||
-sdk iphoneos \ | ||
-archivePath "build/MonkeyKing/iOS" \ | ||
SKIP_INSTALL=NO \ | ||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | ||
|
||
xcodebuild -create-xcframework \ | ||
-framework build/MonkeyKing/Simulator.xcarchive/Products/Library/Frameworks/MonkeyKing.framework \ | ||
-framework build/MonkeyKing/iOS.xcarchive/Products/Library/Frameworks/MonkeyKing.framework \ | ||
-output build/MonkeyKing.xcframework | ||
|
||
cd Build && find . -name "*.swiftinterface" -exec sed -i -e 's/MonkeyKing\.MonkeyKing/MonkeyKing/g' {} \; | ||
|
||
zip -vry MonkeyKing.xcframework.zip MonkeyKing.xcframework/ -x "*.DS_Store" | ||
|
||
echo "\n-----" | ||
swift package compute-checksum MonkeyKing.xcframework.zip | ||
echo "-----" | ||
|
||
open . |