Skip to content

Commit 30db2aa

Browse files
authored
Merge pull request #65 from protect-earth/al/rollbar
Basic Rollbar integration
2 parents 72418d6 + 8a35178 commit 30db2aa

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

.github/workflows/build-release.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
TEST_AIRTABLE_API_KEY: ${{ secrets.TEST_AIRTABLE_API_KEY }}
3131
TEST_AIRTABLE_BASE_ID: ${{ secrets.TEST_AIRTABLE_BASE_ID }}
3232
TEST_AIRTABLE_TABLE_NAME_PREFIX: ${{ secrets.TEST_AIRTABLE_TABLE_NAME_PREFIX }}
33+
ROLLBAR_AUTH_TOKEN: ${{ secrets.ROLLBAR_AUTH_TOKEN }}
3334
run: pouch
3435
- name: Set build number
3536
run: agvtool new-version $GITHUB_RUN_NUMBER

.pouch.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ secrets:
1010
- TEST_AIRTABLE_API_KEY
1111
- TEST_AIRTABLE_BASE_ID
1212
- TEST_AIRTABLE_TABLE_NAME_PREFIX
13+
- ROLLBAR_AUTH_TOKEN
1314
outputs:
1415
- ./Tree Tracker/Secrets.swift

Tree Tracker.xcodeproj/project.pbxproj

+33
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@
108108
85DC214625E0FCBF003F0721 /* GRDBImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85DC214525E0FCBF003F0721 /* GRDBImageCache.swift */; };
109109
85E0E05E25B33F8C009D8FC0 /* TappableButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85E0E05D25B33F8C009D8FC0 /* TappableButton.swift */; };
110110
85E0E06225B35744009D8FC0 /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85E0E06125B35744009D8FC0 /* UIView.swift */; };
111+
9D01D562285CD2E50009F753 /* RollbarCommon in Frameworks */ = {isa = PBXBuildFile; productRef = 9D01D561285CD2E50009F753 /* RollbarCommon */; };
112+
9D01D564285CD2E50009F753 /* RollbarNotifier in Frameworks */ = {isa = PBXBuildFile; productRef = 9D01D563285CD2E50009F753 /* RollbarNotifier */; };
113+
9D01D566285CD2E50009F753 /* RollbarSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 9D01D565285CD2E50009F753 /* RollbarSwift */; };
111114
9D5CDBD727BBC080007D4F0A /* ExportOptions.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9D5CDBD627BBC080007D4F0A /* ExportOptions.plist */; };
112115
9D5D5E28284B630D00F3AD3E /* SpeciesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5D5E27284B630D00F3AD3E /* SpeciesService.swift */; };
113116
9D5D5E2A284B635900F3AD3E /* AirtableSpeciesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5D5E29284B635900F3AD3E /* AirtableSpeciesService.swift */; };
@@ -281,7 +284,10 @@
281284
85A0EF7F25A226D9003CE744 /* GRDB in Frameworks */,
282285
85B83A0D25B87C0D0008E167 /* BSImagePicker in Frameworks */,
283286
9DCC548C28073F0A00CF67AA /* Resolver in Frameworks */,
287+
9D01D566285CD2E50009F753 /* RollbarSwift in Frameworks */,
288+
9D01D564285CD2E50009F753 /* RollbarNotifier in Frameworks */,
284289
85A0EF8325A2271C003CE744 /* Alamofire in Frameworks */,
290+
9D01D562285CD2E50009F753 /* RollbarCommon in Frameworks */,
285291
);
286292
runOnlyForDeploymentPostprocessing = 0;
287293
};
@@ -649,6 +655,9 @@
649655
85A0EF8225A2271C003CE744 /* Alamofire */,
650656
85B83A0C25B87C0D0008E167 /* BSImagePicker */,
651657
9DCC548B28073F0A00CF67AA /* Resolver */,
658+
9D01D561285CD2E50009F753 /* RollbarCommon */,
659+
9D01D563285CD2E50009F753 /* RollbarNotifier */,
660+
9D01D565285CD2E50009F753 /* RollbarSwift */,
652661
);
653662
productName = "Tree Tracker";
654663
productReference = 853ABD522596144900144B0D /* Tree Tracker.app */;
@@ -688,6 +697,7 @@
688697
85A0EF8125A2271C003CE744 /* XCRemoteSwiftPackageReference "Alamofire" */,
689698
85B83A0B25B87C0D0008E167 /* XCRemoteSwiftPackageReference "BSImagePicker" */,
690699
9DCC548A28073F0A00CF67AA /* XCRemoteSwiftPackageReference "Resolver" */,
700+
9D01D560285CD2E50009F753 /* XCRemoteSwiftPackageReference "rollbar-apple" */,
691701
);
692702
productRefGroup = 853ABD532596144900144B0D /* Products */;
693703
projectDirPath = "";
@@ -1146,6 +1156,14 @@
11461156
minimumVersion = 3.3.1;
11471157
};
11481158
};
1159+
9D01D560285CD2E50009F753 /* XCRemoteSwiftPackageReference "rollbar-apple" */ = {
1160+
isa = XCRemoteSwiftPackageReference;
1161+
repositoryURL = "https://github.com/rollbar/rollbar-apple.git";
1162+
requirement = {
1163+
kind = upToNextMajorVersion;
1164+
minimumVersion = 2.0.0;
1165+
};
1166+
};
11491167
9DCC548A28073F0A00CF67AA /* XCRemoteSwiftPackageReference "Resolver" */ = {
11501168
isa = XCRemoteSwiftPackageReference;
11511169
repositoryURL = "https://github.com/hmlongco/Resolver.git";
@@ -1172,6 +1190,21 @@
11721190
package = 85B83A0B25B87C0D0008E167 /* XCRemoteSwiftPackageReference "BSImagePicker" */;
11731191
productName = BSImagePicker;
11741192
};
1193+
9D01D561285CD2E50009F753 /* RollbarCommon */ = {
1194+
isa = XCSwiftPackageProductDependency;
1195+
package = 9D01D560285CD2E50009F753 /* XCRemoteSwiftPackageReference "rollbar-apple" */;
1196+
productName = RollbarCommon;
1197+
};
1198+
9D01D563285CD2E50009F753 /* RollbarNotifier */ = {
1199+
isa = XCSwiftPackageProductDependency;
1200+
package = 9D01D560285CD2E50009F753 /* XCRemoteSwiftPackageReference "rollbar-apple" */;
1201+
productName = RollbarNotifier;
1202+
};
1203+
9D01D565285CD2E50009F753 /* RollbarSwift */ = {
1204+
isa = XCSwiftPackageProductDependency;
1205+
package = 9D01D560285CD2E50009F753 /* XCRemoteSwiftPackageReference "rollbar-apple" */;
1206+
productName = RollbarSwift;
1207+
};
11751208
9D5CDBD427BBB7D2007D4F0A /* Alamofire */ = {
11761209
isa = XCSwiftPackageProductDependency;
11771210
package = 85A0EF8125A2271C003CE744 /* XCRemoteSwiftPackageReference "Alamofire" */;

Tree Tracker/AppDelegate.swift

+8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import UIKit
2+
import RollbarNotifier
23

34
@main
45
class AppDelegate: UIResponder, UIApplicationDelegate {
56
var window: UIWindow?
67

78
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
9+
let config = RollbarConfig()
10+
config.destination.accessToken = Secrets.rollbarAuthToken
11+
config.destination.environment = "local"
12+
13+
Rollbar.initWithConfiguration(config)
14+
Rollbar.infoMessage("App startup")
15+
816
window = UIWindow()
917
window?.rootViewController = MainFlowViewController()
1018
window?.makeKeyAndVisible()

0 commit comments

Comments
 (0)