Skip to content
Closed
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
3 changes: 2 additions & 1 deletion .github/workflows/ios_emerge_upload_main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Sentry iOS Upload (Size Analysis)

on:
push:
pull_request:
branches: [main]
paths: [ios/**]

jobs:
build:
Expand Down
54 changes: 10 additions & 44 deletions ios/HackerNews.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
A49D686D2DE8EB1F00E44A18 /* Linkmap.txt in Resources */ = {isa = PBXBuildFile; fileRef = A49D686C2DE8EB1F00E44A18 /* Linkmap.txt */; };
A4B6CF932D49949200077F66 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A4B6CF922D49949200077F66 /* WidgetKit.framework */; };
A4B6CF952D49949200077F66 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A4B6CF942D49949200077F66 /* SwiftUI.framework */; };
A4B6CFA02D49949300077F66 /* HackerNewsHomeWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = A4B6CF912D49949200077F66 /* HackerNewsHomeWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
A4BED5C32AD5E083001642B3 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
A4BED5C42AD5E083001642B3 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
A4D28AEE2C237E2A007F20D0 /* SnapshotPreferences in Frameworks */ = {isa = PBXBuildFile; productRef = A4D28AED2C237E2A007F20D0 /* SnapshotPreferences */; };
A4D28AF02C237E2A007F20D0 /* SnapshottingTests in Frameworks */ = {isa = PBXBuildFile; productRef = A4D28AEF2C237E2A007F20D0 /* SnapshottingTests */; };
A9DF68FF511E48048B0A703D /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 673236B0A4D04137A0D80A76 /* Sentry */; };
C3AC6AD92CB6E8F7006BD22D /* SnapshottingTests in Frameworks */ = {isa = PBXBuildFile; productRef = C3AC6AD82CB6E8F7006BD22D /* SnapshottingTests */; };
F40E42A02EA80E1600E53876 /* SentrySwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = F40E429F2EA80E1600E53876 /* SentrySwiftUI */; };
F45F6EA52D4D1E50003FA9A3 /* Common in Frameworks */ = {isa = PBXBuildFile; productRef = F45F6EA42D4D1E50003FA9A3 /* Common */; };
F45F6EA72D4D1E57003FA9A3 /* Common in Frameworks */ = {isa = PBXBuildFile; productRef = F45F6EA62D4D1E57003FA9A3 /* Common */; };
F45F6F4A2D4D2185003FA9A3 /* Common in Embed Frameworks */ = {isa = PBXBuildFile; productRef = F45F6EA42D4D1E50003FA9A3 /* Common */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
Expand All @@ -37,16 +34,10 @@
FA3637612EC7AC7D00541313 /* AccessibilitySnapshotCore in Frameworks */ = {isa = PBXBuildFile; productRef = FA3637602EC7AC7D00541313 /* AccessibilitySnapshotCore */; };
FA3637642EC7ACAD00541313 /* AccessibilitySnapshotCore in Frameworks */ = {isa = PBXBuildFile; productRef = FA3637632EC7ACAD00541313 /* AccessibilitySnapshotCore */; };
FA80C2702EC78D7500A700AB /* AccessibilitySnapshotCore in Frameworks */ = {isa = PBXBuildFile; productRef = FA80C26F2EC78D7500A700AB /* AccessibilitySnapshotCore */; };
FA914E352ECE6A4700C54BDD /* SentrySPM in Frameworks */ = {isa = PBXBuildFile; productRef = FA914E342ECE6A4700C54BDD /* SentrySPM */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
A411AEA02D4A82CA0067FB97 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A42705712A4293B10057E439 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A4B6CF902D49949200077F66;
remoteInfo = HackerNewsHomeWidgetExtension;
};
A427058A2A4293B30057E439 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A42705712A4293B10057E439 /* Project object */;
Expand All @@ -64,17 +55,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
A4B6CFA22D49949300077F66 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
A4B6CFA02D49949300077F66 /* HackerNewsHomeWidgetExtension.appex in Embed Foundation Extensions */,
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
A4D28AE92C237BAE007F20D0 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -193,12 +173,11 @@
files = (
F45F6EA52D4D1E50003FA9A3 /* Common in Frameworks */,
A47309B42AA29D9600201376 /* SwiftSoup in Frameworks */,
FA914E352ECE6A4700C54BDD /* SentrySPM in Frameworks */,
F48E9ECB2D4D691600FD8B30 /* ETDistribution in Frameworks */,
A4D28AEE2C237E2A007F20D0 /* SnapshotPreferences in Frameworks */,
F45F703E2D4D2695003FA9A3 /* Fonts in Frameworks */,
F40E42A02EA80E1600E53876 /* SentrySwiftUI in Frameworks */,
A495B2952BFEA11B00A8A8A9 /* Reaper in Frameworks */,
A9DF68FF511E48048B0A703D /* Sentry in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -357,28 +336,25 @@
A42705762A4293B10057E439 /* Frameworks */,
A42705772A4293B10057E439 /* Resources */,
A4D28AE92C237BAE007F20D0 /* Embed Frameworks */,
A4B6CFA22D49949300077F66 /* Embed Foundation Extensions */,
A42705AE2A44C35D0057E439 /* Strip Symbols */,
F45F6F4B2D4D2339003FA9A3 /* Remove duplicated bundles */,
);
buildRules = (
);
dependencies = (
A411AEA12D4A82CA0067FB97 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
A43900DA2D483D6100FE51DD /* HackerNews */,
);
name = HackerNews;
packageProductDependencies = (
A47309B32AA29D9600201376 /* SwiftSoup */,
673236B0A4D04137A0D80A76 /* Sentry */,
A495B2942BFEA11B00A8A8A9 /* Reaper */,
A4D28AED2C237E2A007F20D0 /* SnapshotPreferences */,
F45F6EA42D4D1E50003FA9A3 /* Common */,
F45F703D2D4D2695003FA9A3 /* Fonts */,
F48E9ECA2D4D691600FD8B30 /* ETDistribution */,
F40E429F2EA80E1600E53876 /* SentrySwiftUI */,
FA914E342ECE6A4700C54BDD /* SentrySPM */,
);
productName = HackerNews;
productReference = A42705792A4293B10057E439 /* HackerNews.app */;
Expand Down Expand Up @@ -623,11 +599,6 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
A411AEA12D4A82CA0067FB97 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A4B6CF902D49949200077F66 /* HackerNewsHomeWidgetExtension */;
targetProxy = A411AEA02D4A82CA0067FB97 /* PBXContainerItemProxy */;
};
A427058B2A4293B30057E439 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A42705782A4293B10057E439 /* HackerNews */;
Expand Down Expand Up @@ -1231,8 +1202,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/getsentry/sentry-cocoa/";
requirement = {
kind = exactVersion;
version = "9.0.0-alpha.1";
branch = mxTesting;
kind = branch;
};
};
A42271692DE78DEF002F03D5 /* XCRemoteSwiftPackageReference "faultordering" */ = {
Expand Down Expand Up @@ -1302,11 +1273,6 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
673236B0A4D04137A0D80A76 /* Sentry */ = {
isa = XCSwiftPackageProductDependency;
package = 995A2BEDEF224F7085D3DB13 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = Sentry;
};
A422716A2DE78DEF002F03D5 /* FaultOrdering */ = {
isa = XCSwiftPackageProductDependency;
package = A42271692DE78DEF002F03D5 /* XCRemoteSwiftPackageReference "faultordering" */;
Expand Down Expand Up @@ -1347,11 +1313,6 @@
package = A4D28AEC2C237E2A007F20D0 /* XCRemoteSwiftPackageReference "SnapshotPreviews" */;
productName = SnapshottingTests;
};
F40E429F2EA80E1600E53876 /* SentrySwiftUI */ = {
isa = XCSwiftPackageProductDependency;
package = 995A2BEDEF224F7085D3DB13 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = SentrySwiftUI;
};
F45F6EA42D4D1E50003FA9A3 /* Common */ = {
isa = XCSwiftPackageProductDependency;
package = F45F6E532D4D1D3E003FA9A3 /* XCLocalSwiftPackageReference "Packages/Common" */;
Expand Down Expand Up @@ -1401,6 +1362,11 @@
package = FA80C26E2EC78D7500A700AB /* XCRemoteSwiftPackageReference "AccessibilitySnapshot" */;
productName = AccessibilitySnapshotCore;
};
FA914E342ECE6A4700C54BDD /* SentrySPM */ = {
isa = XCSwiftPackageProductDependency;
package = 995A2BEDEF224F7085D3DB13 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = SentrySPM;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = A42705712A4293B10057E439 /* Project object */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions ios/HackerNews/Bookmarks/BookmarksScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import Foundation
import SwiftUI
import SentrySwiftUI

struct BookmarksScreen: View {
@Binding var model: AppViewModel
Expand Down Expand Up @@ -53,7 +52,6 @@ struct BookmarksScreen: View {
}
.frame(height: 60)
}
.sentryTrace("BookmarksScreen")
}
}

Expand Down
13 changes: 10 additions & 3 deletions ios/HackerNews/Feed/FeedScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
import Foundation
import SwiftUI
import Common
import SentrySwiftUI

struct FeedScreen: View {

@Binding var model: AppViewModel
@State private var isAnimating = false

func crash() {
let a = ""
let b = (a as Any) as! Date
print(b)
}

var body: some View {
VStack(spacing: 8) {
Expand Down Expand Up @@ -45,6 +50,10 @@ struct FeedScreen: View {
}
}
.frame(height: 60)
Button("Crash") {
print("going to crash")
crash()
}

// Page view for feeds
TabView(selection: $model.feedState.selectedFeed) {
Expand All @@ -64,7 +73,6 @@ struct FeedScreen: View {
}
}
.tabViewStyle(.page(indexDisplayMode: .never))
.sentryTrace("FeedScreen")
}
}
}
Expand Down Expand Up @@ -127,7 +135,6 @@ private struct FeedListView: View {
try? await Task.sleep(for: .milliseconds(300))
await model.fetchInitialPosts(feedType: model.feedState.selectedFeed)
}
.sentryTrace("FeedListView")
}
}

Expand Down
3 changes: 2 additions & 1 deletion ios/HackerNews/HNApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Reaper
import Sentry
import SentrySwift
import SwiftData
import SwiftUI
import Common
Expand Down Expand Up @@ -42,6 +42,7 @@ struct HackerNewsApp: App {
options.sessionReplay.onErrorSampleRate = 1.0
options.sendDefaultPii = true
options.enableLogs = true
options.experimental.enableSessionReplayInUnreliableEnvironment = true

#if DEBUG
options.environment = "development"
Expand Down
3 changes: 3 additions & 0 deletions ios/HackerNews/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@
}
}
}
},
"Crash" : {

},
"feed.type.ask" : {
"extractionState" : "manual",
Expand Down
2 changes: 1 addition & 1 deletion ios/HackerNews/Settings/SendFeedbackScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Trevor Elkins on 4/16/25.
//

import Sentry
import SentrySwift
import SwiftUI

struct SendFeedbackScreen: View {
Expand Down
2 changes: 0 additions & 2 deletions ios/HackerNews/Settings/SettingsScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import Foundation
import SwiftUI
import Common
import SentrySwiftUI

struct SettingsScreen: View {
@Binding var model: AppViewModel
Expand Down Expand Up @@ -270,7 +269,6 @@ struct SettingsScreen: View {
.sheet(isPresented: $isShowingFeedback) {
SendFeedbackScreen()
}
.sentryTrace("SettingsScreen")
}
}

Expand Down
4 changes: 2 additions & 2 deletions ios/HackerNews/Utils/Assert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Foundation
import Sentry
import SentrySwift

/// Fails fast in Debug, logs to Sentry in Release.
/// - Parameters:
Expand All @@ -23,7 +23,7 @@ public func et_assertionFailure(
#if DEBUG
fatalError("\(message()) — \(function) @ \(file):\(line)")
#else
let scope = Sentry.Scope()
let scope = SentrySwift.Scope()
scope.setTag(value: "assertion", key: "type")
let sentryId = SentrySDK.capture(message: message(), scope: scope)
print("Created Sentry event \(sentryId)")
Expand Down
2 changes: 1 addition & 1 deletion ios/HackerNews/Utils/Logger.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Sentry
import SentrySwift

struct Logger {
static func info(_ message: String) {
Expand Down
Loading