Skip to content

Commit 5f09e80

Browse files
committed
Revert "Use pre-built version of sentry-cocoa SDK (#3727)"
This reverts commit d179ec9.
1 parent 3181dc3 commit 5f09e80

File tree

13 files changed

+50
-2195
lines changed

13 files changed

+50
-2195
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build Native Dependencies
2+
description: Builds Sentry Cocoa SDK with custom Carthage
3+
runs:
4+
using: composite
5+
6+
steps:
7+
- name: Cache Sentry Cocoa SDK
8+
id: cache-sentry-cocoa
9+
uses: actions/cache@v3
10+
with:
11+
path: modules/sentry-cocoa/Carthage
12+
key: sentry-cocoa-${{ hashFiles('scripts/build-sentry-cocoa.sh') }}-${{ hashFiles('.git/modules/modules/sentry-cocoa/HEAD') }}
13+
14+
- name: Build Sentry Cocoa SDK
15+
if: ${{ steps.cache-sentry-cocoa.outputs.cache-hit != 'true' }}
16+
shell: bash
17+
run: scripts/build-sentry-cocoa.sh

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ jobs:
204204
if: ${{ !matrix.container }}
205205
uses: ./.github/actions/buildnative
206206

207+
- name: Build Cocoa SDK
208+
if: runner.os == 'macOS'
209+
uses: ./.github/actions/buildcocoasdk
210+
207211
- name: Restore .NET Dependencies
208212
run: dotnet restore ${{ matrix.slnf }} --nologo
209213

.github/workflows/device-tests-ios.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
with:
2828
submodules: recursive
2929

30+
- name: Build Cocoa SDK
31+
uses: ./.github/actions/buildcocoasdk
32+
3033
- name: Setup Environment
3134
uses: ./.github/actions/environment
3235

.github/workflows/update-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
include:
1717
- name: Cocoa SDK
18-
path: modules/sentry-cocoa.properties
18+
path: modules/sentry-cocoa
1919
- name: Java SDK
2020
path: scripts/update-java.ps1
2121
- name: Native SDK

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ test/**/*.apk
2828
*.log
2929
.sentry-native
3030
**/EnvironmentVariables.g.cs
31-
32-
# Download cache for Cocoa SDK
33-
modules/sentry-cocoa

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[submodule "modules/Ben.Demystifier"]
22
path = modules/Ben.Demystifier
33
url = https://github.com/getsentry/Ben.Demystifier
4+
[submodule "modules/sentry-cocoa"]
5+
path = modules/sentry-cocoa
6+
url = https://github.com/getsentry/sentry-cocoa.git
47
[submodule "modules/perfview"]
58
path = modules/perfview
69
url = https://github.com/getsentry/perfview.git

Sentry.sln

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@ EndProject
156156
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SingleFileTestApp", "test\SingleFileTestApp\SingleFileTestApp.csproj", "{162A1CAE-ACEE-45CA-A6D0-7702ADE4D3DE}"
157157
EndProject
158158
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{A3CCA27E-4DF8-479D-833C-CAA0950715AA}"
159-
ProjectSection(SolutionItems) = preProject
160-
modules\sentry-cocoa.properties = modules\sentry-cocoa.properties
161-
EndProjectSection
162159
EndProject
163160
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceEvent", "modules\perfview\src\TraceEvent\TraceEvent.csproj", "{67269916-C417-4CEE-BD7D-CA66C3830AEE}"
164161
EndProject

modules/sentry-cocoa

Submodule sentry-cocoa added at 5575af9

modules/sentry-cocoa.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/generate-cocoa-bindings.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Set-StrictMode -Version Latest
44
$ErrorActionPreference = 'Stop'
55

66
$RootPath = (Get-Item $PSScriptRoot).Parent.FullName
7-
$CocoaSdkPath = "$RootPath/modules/sentry-cocoa/Sentry.framework"
7+
$CocoaSdkPath = "$RootPath/modules/sentry-cocoa"
88
$BindingsPath = "$RootPath/src/Sentry.Bindings.Cocoa"
99
$BackupPath = "$BindingsPath/obj/_unpatched"
1010

@@ -101,7 +101,7 @@ Write-Output "iPhoneSdkVersion: $iPhoneSdkVersion"
101101
# ...instead of:
102102
# `#import "SomeHeader.h"`
103103
# This causes sharpie to fail resolve those headers
104-
$filesToPatch = Get-ChildItem -Path "$CocoaSdkPath/Headers" -Filter *.h -Recurse | Select-Object -ExpandProperty FullName
104+
$filesToPatch = Get-ChildItem -Path "$CocoaSdkPath/Carthage/Headers" -Filter *.h -Recurse | Select-Object -ExpandProperty FullName
105105
foreach ($file in $filesToPatch)
106106
{
107107
if (Test-Path $file)
@@ -116,7 +116,7 @@ foreach ($file in $filesToPatch)
116116
Write-Host "File not found: $file"
117117
}
118118
}
119-
$privateHeaderFile = "$CocoaSdkPath/PrivateHeaders/PrivatesHeader.h"
119+
$privateHeaderFile = "$CocoaSdkPath/Carthage/PrivateHeaders/PrivatesHeader.h"
120120
if (Test-Path $privateHeaderFile)
121121
{
122122
$content = Get-Content -Path $privateHeaderFile -Raw
@@ -133,9 +133,9 @@ else
133133
# Generate bindings
134134
Write-Output 'Generating bindings with Objective Sharpie.'
135135
sharpie bind -sdk $iPhoneSdkVersion `
136-
-scope "$CocoaSdkPath" `
137-
"$CocoaSdkPath/Headers/Sentry.h" `
138-
"$CocoaSdkPath/PrivateHeaders/PrivateSentrySDKOnly.h" `
136+
-scope "$CocoaSdkPath/Carthage/Headers" `
137+
"$CocoaSdkPath/Carthage/Headers/Sentry.h" `
138+
"$CocoaSdkPath/Carthage/Headers/PrivateSentrySDKOnly.h" `
139139
-o $BindingsPath `
140140
-c -Wno-objc-property-no-attribute
141141

0 commit comments

Comments
 (0)