Skip to content
Merged
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
30 changes: 26 additions & 4 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3631,6 +3631,7 @@
F77B0F981D118A16002130FE /* Embed Foundation Extensions */,
AFBFD01327551A54002244BC /* ShellScript */,
F76DA934277B75710082465B /* Embed Frameworks */,
F76995F02F99EF6C00291FA7 /* Crashlytics dSYM Upload */,
);
buildRules = (
);
Expand Down Expand Up @@ -4068,6 +4069,29 @@
shellPath = /bin/sh;
shellScript = "if test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\n\nexport PATH\n\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
F76995F02F99EF6C00291FA7 /* Crashlytics dSYM Upload */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist",
"$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist",
"$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
);
name = "Crashlytics dSYM Upload";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\n\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -5798,14 +5822,13 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 4;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_TESTING_SEARCH_PATHS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -5866,14 +5889,13 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 4;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_TESTING_SEARCH_PATHS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
Expand Down
4 changes: 4 additions & 0 deletions Nextcloud.xcodeproj/xcshareddata/xcschemes/Nextcloud.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
argument = "whitelist:NETWORKING TASKS"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-FIRDebugEnabled"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "blacklist:"
isEnabled = "NO">
Expand Down
2 changes: 0 additions & 2 deletions iOSClient/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD

UserDefaults.standard.register(defaults: ["UserAgent": userAgent])

#if !DEBUG
if !NCPreferences().disableCrashservice, !NCBrandOptions.shared.disable_crash_service {
FirebaseApp.configure()
}
#endif

NCBrandColor.shared.createUserColors()

Expand Down
21 changes: 21 additions & 0 deletions iOSClient/Settings/Settings/NCSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import SwiftUI
import NextcloudKit
import FirebaseCrashlytics

/// Settings view for Nextcloud
struct NCSettingsView: View {
Expand Down Expand Up @@ -275,6 +276,26 @@ struct NCSettingsView: View {
}
}
})
#if DEBUG
Section(header: Text("Debug").font(.headline), content: {
Button(action: {
Crashlytics.crashlytics().log("Test crash triggered")
fatalError("🔥 Crash test")
}, label: {
HStack {
Image(systemName: "flame.fill")
.font(.icon())
.foregroundColor(.red)
.frame(width: 39)

Text("Test crash triggered")
.font(.body)
}
})
.tint(Color(NCBrandColor.shared.textColor))
})
#endif

// `Watermark` Section
Section(content: {
}, footer: {
Expand Down
Loading