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

Integrate Google Firebase Crashlytics into iOS App #147

Merged
merged 5 commits into from
Aug 13, 2024
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
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ jobs:
BUILD_NUMBER=$(date "+%Y%m%d%H%M%S")
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_NUMBER" NOICommunity/Info.plist

# Set -configuration to "Release", if you want to use the production Keycloak server
# and to "Release TMA" for the testingmachine-authentication Keycloak server
# Set the -configuration parameter to one of the following options:
# - "Release": uses the production Keycloak server
# - "Release TMA": uses the testingmachine-authentication Keycloak server
# - "Release DEVELOPER_MENU": same as "Release" but includes the Developer Menu
# - "Release TMA DEVELOPER_MENU": same as "Release TMA" but includes the Developer Menu

- name: Archive the project
run: |
set -eo pipefail
Expand Down Expand Up @@ -129,3 +133,12 @@ jobs:
-u "$APPLEID_USERNAME" \
-p "$APPLEID_PASSWORD" \
--verbose

- name: Upload dSYMs to Firebase Crashlytics
if: success()
run: |
BUILD_DIR=$(xcodebuild -showBuildSettings | grep -m 1 "BUILD_DIR" | cut -d'=' -f2)
${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols \
-gsp "NOICommunity/GoogleService-Info.plist" \
-p ios \
"$PWD/build/NOICommunity.xcarchive/dSYMs"
316 changes: 290 additions & 26 deletions NOICommunity.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D24226B3F74000F16787"
BuildableName = "NOICommunityTests.xctest"
BlueprintName = "NOICommunityTests"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D24D26B3F74000F16787"
BuildableName = "NOICommunityUITests.xctest"
BlueprintName = "NOICommunityUITests"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release DEVELOPER_MENU"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D24226B3F74000F16787"
BuildableName = "NOICommunityTests.xctest"
BlueprintName = "NOICommunityTests"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D24D26B3F74000F16787"
BuildableName = "NOICommunityUITests.xctest"
BlueprintName = "NOICommunityUITests"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug TMA"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release TMA DEVELOPER_MENU"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D24226B3F74000F16787"
BuildableName = "NOICommunityTests.xctest"
BlueprintName = "NOICommunityTests"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D24D26B3F74000F16787"
BuildableName = "NOICommunityUITests.xctest"
BlueprintName = "NOICommunityUITests"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug TMA"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3145D22C26B3F73F00F16787"
BuildableName = "NOICommunity.app"
BlueprintName = "NOICommunity"
ReferencedContainer = "container:NOICommunity.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release TMA"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
49 changes: 49 additions & 0 deletions NOICommunity/DeveloperTools/DeveloperToolsCoordinator.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// SPDX-FileCopyrightText: NOI Techpark <[email protected]>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

//
// DeveloperToolsCoordinator.swift
// NOICommunity
//
// Created by Matteo Matassoni on 12/08/24.
//

import Foundation
import UIKit

// MARK: - DeveloperToolsCoordinator

final class DeveloperToolsCoordinator: BaseNavigationCoordinator {

override func start(animated: Bool) {
let developerToolsViewModel = dependencyContainer.makeDeveloperToolsViewModel()
let developerToolsViewController = dependencyContainer.makeDeveloperToolsViewController(
viewModel: developerToolsViewModel
)
developerToolsViewController.navigationItem.leftBarButtonItem = UIBarButtonItem(
image: UIImage(systemName: "xmark.circle.fill"),
style: .plain,
target: self,
action: #selector(didTapClose(_:))
)
developerToolsViewController.title = "Developer Tools"
navigationController.setViewControllers(
[developerToolsViewController],
animated: animated
)
}

func dismiss(animated: Bool) {
navigationController.dismiss(animated: animated)
}
}

// MARK: Private APIs

private extension DeveloperToolsCoordinator {

@objc func didTapClose(_ sender: Any?) {
dismiss(animated: true)
}
}
Loading