Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/fix podspec #13

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .KarteTemplate-Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
import PackageDescription

let package = Package(
name: "PLCrashReporter",
name: "KarteCrashReporter",
platforms: [
.iOS(.v11),
.iOS(.v12),
.macOS(.v10_10),
.tvOS(.v11)
],
products: [
.library(name: "PLCrashReporter", targets: ["CrashReporter"])
.library(name: "KarteCrashReporter", targets: ["KarteCrashReporter"])
],
targets: [
.binaryTarget(
name: "CrashReporter",
name: "KarteCrashReporter",
<__URL__>,
<__CHECKSUM__>
),
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/build_xcframework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: macos-14-xlarge
permissions:
contents: write
id-token: write
Expand All @@ -18,24 +18,25 @@ jobs:
git config user.email "[email protected]"
git config user.name "github actions"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@b8c74de753fbcb4868bf2011fb2e15826ce973af # コミットハッシュを指定
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ap-northeast-1
role-to-assume: arn:aws:iam::161473449094:role/ProductionNativeSdkRole
role-session-name: MySessionName
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_14.2.app'
run: sudo xcode-select -s '/Applications/Xcode_15.4.app'
- name: Get Release Version
id: release-version
run: |
gem install fastlane
version=`fastlane run version_get_podspec | grep -o -E "([0-9]+\.){1}[0-9]+(\.[0-9]+)?" | head -n1`
echo "::set-output name=version::${version}"
echo "VERSION=${version}" >> "$GITHUB_OUTPUT"
- name: Check if it has already been released
env:
VERSION: ${{ steps.release-version.outputs.VERSION }}
run: |
git fetch
version=${{ steps.release-version.outputs.version }}
if [ `git tag | grep "${version}-patch"` ]; then
if [ `git tag | grep "${VERSION}-patch"` ]; then
echo "Please bump up version number!!"
exit 1
fi
Expand All @@ -49,28 +50,34 @@ jobs:
- name: Replace XCFramework
run: |
rm -rf CrashReporter.xcframework
rm -rf KarteCrashReporter.xcframework
cp -pR build/Release/CrashReporter.xcframework ./
zip -r CrashReporter.xcframework.zip CrashReporter.xcframework
# Copy and rename framework to avoid conflict with older framework path for uploading to S3
cp -r CrashReporter.xcframework KarteCrashReporter.xcframework
zip -r KarteCrashReporter.xcframework.zip KarteCrashReporter.xcframework
- name: Upload XCFramework to aws s3
env:
VERSION: ${{ steps.release-version.outputs.VERSION }}
run: |
aws sts get-caller-identity
aws s3 ls s3://production-native-sdk/
version=${{ steps.release-version.outputs.version }}
aws s3 cp ./CrashReporter.xcframework.zip s3://production-native-sdk/ios/swiftpm/CrashReporter-${version}/ --acl public-read
aws s3 cp ./KarteCrashReporter.xcframework.zip s3://production-native-sdk/ios/swiftpm/KarteCrashReporter-${VERSION}/ --acl public-read
- name: Replace Package.swift
env:
VERSION: ${{ steps.release-version.outputs.VERSION }}
run: |
rm Package.swift
cp .KarteTemplate-Package.swift Package.swift
version=${{ steps.release-version.outputs.version }}

url="https:\/\/sdk.karte.io\/ios\/swiftpm\/CrashReporter-${version}\/CrashReporter.xcframework.zip"
checksum=$(swift package compute-checksum ./CrashReporter.xcframework.zip)
url="https:\/\/sdk.karte.io\/ios\/swiftpm\/KarteCrashReporter-${VERSION}\/KarteCrashReporter.xcframework.zip"
checksum=$(swift package compute-checksum ./KarteCrashReporter.xcframework.zip)

sed -i "" "s/<__URL__>/url: \"${url}\"/g" "./Package.swift"
sed -i "" "s/<__CHECKSUM__>/checksum: \"${checksum}\"/g" "./Package.swift"
- name: Update Swift-PM manifest file
run: |
git add Package.swift
git add CrashReporter.xcframework
git add KarteCrashReporter.xcframework
git commit -m "[skip ci] Update xcframework"
git push
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# PLCrashReporter Change Log

## Version 1.12.0

* **[Improvement]** Update minimum deployment target to 12.0
* **[Fix]** Forked from plaidev/PLCrashReporter to fix SPM build issue caused by duplication of library name `plcrashreporter`

## Version 1.11.1 (Under development)

* **[Improvement]** Disable treating warnings as errors in code to avoid blockers when new Xcode warnings are introduced.
Expand Down
40 changes: 26 additions & 14 deletions CrashReporter.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,39 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>CrashReporter.framework/Versions/A/CrashReporter</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_arm64e</string>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>CrashReporter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>arm64e</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<string>macos</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>CrashReporter.framework/CrashReporter</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>tvos-arm64</string>
<key>LibraryPath</key>
<string>CrashReporter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>tvos</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>CrashReporter.framework/CrashReporter</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>CrashReporter.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -43,13 +46,15 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>CrashReporter.framework/CrashReporter</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>CrashReporter.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -58,21 +63,28 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>CrashReporter.framework/CrashReporter</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<string>ios-arm64_arm64e</string>
<key>LibraryPath</key>
<string>CrashReporter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>arm64e</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>CrashReporter.framework/Versions/A/CrashReporter</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G531</string>
<string>23H311</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -29,19 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14C18</string>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>13.1</string>
<string>14.5</string>
<key>DTSDKBuild</key>
<string>22C55</string>
<string>23F73</string>
<key>DTSDKName</key>
<string>macosx13.1</string>
<string>macosx14.5</string>
<key>DTXcode</key>
<string>1420</string>
<string>1540</string>
<key>DTXcodeBuild</key>
<string>14C18</string>
<string>15F31d</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>UIDeviceFamily</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</data>
<key>Info.plist</key>
<data>
E6LXft2YdCyWwdWBEwAAJO81ioE=
H8VWngWSDjBPmrO580JZ36gOCOU=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G531</string>
<string>23H311</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -29,20 +29,20 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14C18</string>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>13.1</string>
<string>14.5</string>
<key>DTSDKBuild</key>
<string>22C55</string>
<string>23F73</string>
<key>DTSDKName</key>
<string>macosx13.1</string>
<string>macosx14.5</string>
<key>DTXcode</key>
<string>1420</string>
<string>1540</string>
<key>DTXcodeBuild</key>
<string>14C18</string>
<string>15F31d</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<string>12.0</string>
</dict>
</plist>
Loading