Skip to content

Commit

Permalink
Example integrating Rollbar to an App via Cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
matux committed Jul 21, 2023
1 parent 3c8c4e0 commit a32c4a0
Show file tree
Hide file tree
Showing 11 changed files with 549 additions and 0 deletions.

Large diffs are not rendered by default.

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

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
18 changes: 18 additions & 0 deletions Examples/Integration/CocoapodsApp/CocoapodsApp/CocoapodsApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import SwiftUI
import RollbarNotifier

@main
struct CocoapodsApp: App {
init() {
let config = RollbarConfig.mutableConfig(withAccessToken: "ACCESSTOKEN")
config.developerOptions.suppressSdkInfoLogging = false

Rollbar.initWithConfiguration(config)
}

var body: some Scene {
WindowGroup {
ContentView()
}
}
}
23 changes: 23 additions & 0 deletions Examples/Integration/CocoapodsApp/CocoapodsApp/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import SwiftUI
import RollbarNotifier

struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
}
.padding()
.onAppear {
Rollbar.infoMessage("ContentView Appeared")
}
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Examples/Integration/CocoapodsApp/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
platform :ios, '14.0'
use_frameworks!

target 'CocoapodsApp' do
pod 'RollbarNotifier', '~> 3.1.0'
end
35 changes: 35 additions & 0 deletions Examples/Integration/CocoapodsApp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
PODS:
- RollbarCommon (3.1.0)
- RollbarCrash (3.1.0)
- RollbarNotifier (3.1.0):
- RollbarCommon (~> 3.1.0)
- RollbarCrash (~> 3.1.0)
- RollbarReport (~> 3.1.0)
- RollbarReport (3.1.0):
- RollbarCrash (~> 3.1.0)

DEPENDENCIES:
- RollbarCommon (from `../../../`)
- RollbarCrash (from `../../../`)
- RollbarNotifier (from `../../../`)
- RollbarReport (from `../../../`)

EXTERNAL SOURCES:
RollbarCommon:
:path: "../../../"
RollbarCrash:
:path: "../../../"
RollbarNotifier:
:path: "../../../"
RollbarReport:
:path: "../../../"

SPEC CHECKSUMS:
RollbarCommon: 125fb7e9fa63ea79ef33ee0f0e50456bb9f9cdf5
RollbarCrash: d831f9c067bbe2147080a700c0a7ebc346d31db3
RollbarNotifier: c712946d79d82103fc2ae07956c768ba8705dee2
RollbarReport: 2f42cb47ce9f0be32c5e040e702f936b99e62542

PODFILE CHECKSUM: 67f7079dea0a413cbd163635c7d721b213865260

COCOAPODS: 1.12.1

0 comments on commit a32c4a0

Please sign in to comment.