Skip to content

Commit d4b054a

Browse files
author
Thomas Taschauer
committed
AdTracking changes, improve error reporting
1 parent ad25558 commit d4b054a

7 files changed

Lines changed: 106 additions & 101 deletions

File tree

OpenDocumentReader.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@
927927
BUNDLE_ID_SUFFIX = .lite;
928928
CLANG_ENABLE_MODULES = YES;
929929
CODE_SIGN_STYLE = Automatic;
930-
CURRENT_PROJECT_VERSION = 22;
930+
CURRENT_PROJECT_VERSION = 23;
931931
DEVELOPMENT_TEAM = 5LS6X97G6J;
932932
HEADER_SEARCH_PATHS = (
933933
"$(inherited)",
@@ -1017,7 +1017,7 @@
10171017
BUNDLE_ID_SUFFIX = .lite;
10181018
CLANG_ENABLE_MODULES = YES;
10191019
CODE_SIGN_STYLE = Automatic;
1020-
CURRENT_PROJECT_VERSION = 22;
1020+
CURRENT_PROJECT_VERSION = 23;
10211021
DEVELOPMENT_TEAM = 5LS6X97G6J;
10221022
HEADER_SEARCH_PATHS = (
10231023
"$(inherited)",
@@ -1170,7 +1170,7 @@
11701170
BUNDLE_ID_SUFFIX = "";
11711171
CLANG_ENABLE_MODULES = YES;
11721172
CODE_SIGN_STYLE = Automatic;
1173-
CURRENT_PROJECT_VERSION = 22;
1173+
CURRENT_PROJECT_VERSION = 23;
11741174
DEVELOPMENT_TEAM = 5LS6X97G6J;
11751175
HEADER_SEARCH_PATHS = (
11761176
"$(inherited)",
@@ -1202,7 +1202,7 @@
12021202
BUNDLE_ID_SUFFIX = "";
12031203
CLANG_ENABLE_MODULES = YES;
12041204
CODE_SIGN_STYLE = Automatic;
1205-
CURRENT_PROJECT_VERSION = 22;
1205+
CURRENT_PROJECT_VERSION = 23;
12061206
DEVELOPMENT_TEAM = 5LS6X97G6J;
12071207
HEADER_SEARCH_PATHS = (
12081208
"$(inherited)",

OpenDocumentReader/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6868

6969
try FileManager.default.moveItem(at: inputURL, to: destinationUrl)
7070
} catch {
71-
print(error)
71+
Crashlytics.crashlytics().record(error: error)
7272
fatalError("copying from Inbox failed")
7373

7474
return false

OpenDocumentReader/DocumentBrowserViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class DocumentBrowserViewController: UIDocumentBrowserViewController, UIDocument
7272
}
7373

7474
func presentDocument(at documentURL: URL) {
75+
Crashlytics.crashlytics().setCustomValue("documentUrl", forKey: documentURL.absoluteString)
76+
7577
let storyBoard = UIStoryboard(name: "Main", bundle: nil)
7678

7779
if (presentedViewController != nil) {

OpenDocumentReader/DocumentViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import ScrollableSegmentedControl
1111
import UIKit.UIPrinter
1212
import Firebase
1313
import GoogleMobileAds
14+
import AppTrackingTransparency
15+
import AdSupport
1416

1517
// taken from: https://developer.apple.com/documentation/uikit/view_controllers/building_a_document_browser-based_app
1618
class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewDelegate, UISearchBarDelegate {
@@ -85,7 +87,9 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
8587
bannerView.adUnitID = "ca-app-pub-8161473686436957/8123543897"
8688
bannerView.rootViewController = self
8789

88-
loadBannerAd()
90+
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
91+
loadBannerAd()
92+
})
8993
}
9094

9195
func setVCconstraints() {

OpenDocumentReader/Info-Lite.plist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,14 @@
8282
<true/>
8383
<key>NSPhotoLibraryAddUsageDescription</key>
8484
<string>Copy image from document to your Photos</string>
85+
<key>NSUserTrackingUsageDescription</key>
86+
<string>This identifier will be used to deliver personalized ads to you.</string>
87+
<key>SKAdNetworkItems</key>
88+
<array>
89+
<dict>
90+
<key>SKAdNetworkIdentifier</key>
91+
<string>cstr6suwn9.skadnetwork</string>
92+
</dict>
93+
</array>
8594
</dict>
8695
</plist>

Podfile.lock

Lines changed: 81 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,87 @@
11
PODS:
2-
- Firebase/Analytics (6.22.0):
2+
- Firebase/Analytics (6.30.0):
33
- Firebase/Core
4-
- Firebase/Core (6.22.0):
4+
- Firebase/Core (6.30.0):
55
- Firebase/CoreOnly
6-
- FirebaseAnalytics (= 6.4.1)
7-
- Firebase/CoreOnly (6.22.0):
8-
- FirebaseCore (= 6.6.6)
9-
- Firebase/Crashlytics (6.22.0):
6+
- FirebaseAnalytics (= 6.7.2)
7+
- Firebase/CoreOnly (6.30.0):
8+
- FirebaseCore (= 6.10.0)
9+
- Firebase/Crashlytics (6.30.0):
1010
- Firebase/CoreOnly
11-
- FirebaseCrashlytics (~> 4.0.0-beta.7)
12-
- Firebase/Storage (6.22.0):
11+
- FirebaseCrashlytics (~> 4.4.0)
12+
- Firebase/Storage (6.30.0):
1313
- Firebase/CoreOnly
14-
- FirebaseStorage (~> 3.6.0)
15-
- FirebaseAnalytics (6.4.1):
16-
- FirebaseCore (~> 6.6)
17-
- FirebaseInstallations (~> 1.1)
18-
- GoogleAppMeasurement (= 6.4.1)
19-
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
20-
- GoogleUtilities/MethodSwizzler (~> 6.0)
21-
- GoogleUtilities/Network (~> 6.0)
22-
- "GoogleUtilities/NSData+zlib (~> 6.0)"
23-
- nanopb (= 0.3.9011)
24-
- FirebaseAnalyticsInterop (1.5.0)
25-
- FirebaseAuthInterop (1.1.0)
26-
- FirebaseCore (6.6.6):
27-
- FirebaseCoreDiagnostics (~> 1.2)
28-
- FirebaseCoreDiagnosticsInterop (~> 1.2)
29-
- GoogleUtilities/Environment (~> 6.5)
30-
- GoogleUtilities/Logger (~> 6.5)
31-
- FirebaseCoreDiagnostics (1.2.3):
32-
- FirebaseCoreDiagnosticsInterop (~> 1.2)
33-
- GoogleDataTransportCCTSupport (~> 2.0)
34-
- GoogleUtilities/Environment (~> 6.5)
35-
- GoogleUtilities/Logger (~> 6.5)
36-
- nanopb (~> 0.3.901)
37-
- FirebaseCoreDiagnosticsInterop (1.2.0)
38-
- FirebaseCrashlytics (4.0.0-beta.7):
39-
- FirebaseAnalyticsInterop (~> 1.2)
40-
- FirebaseCore (~> 6.6)
41-
- FirebaseInstallations (~> 1.1)
42-
- GoogleDataTransport (>= 5.1.1, ~> 5.1)
43-
- GoogleDataTransportCCTSupport (>= 2.0.2, ~> 2.0)
44-
- nanopb (~> 0.3.901)
14+
- FirebaseStorage (~> 3.9.0)
15+
- FirebaseAnalytics (6.7.2):
16+
- FirebaseCore (~> 6.8)
17+
- FirebaseInstallations (~> 1.4)
18+
- GoogleAppMeasurement (= 6.7.2)
19+
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
20+
- GoogleUtilities/MethodSwizzler (~> 6.7)
21+
- GoogleUtilities/Network (~> 6.7)
22+
- "GoogleUtilities/NSData+zlib (~> 6.7)"
23+
- nanopb (~> 1.30905.0)
24+
- FirebaseCore (6.10.0):
25+
- FirebaseCoreDiagnostics (~> 1.3)
26+
- GoogleUtilities/Environment (~> 6.7)
27+
- GoogleUtilities/Logger (~> 6.7)
28+
- FirebaseCoreDiagnostics (1.5.0):
29+
- GoogleDataTransport (~> 7.0)
30+
- GoogleUtilities/Environment (~> 6.7)
31+
- GoogleUtilities/Logger (~> 6.7)
32+
- nanopb (~> 1.30905.0)
33+
- FirebaseCrashlytics (4.4.0):
34+
- FirebaseCore (~> 6.10)
35+
- FirebaseInstallations (~> 1.6)
36+
- GoogleDataTransport (~> 7.2)
37+
- nanopb (~> 1.30905.0)
4538
- PromisesObjC (~> 1.2)
46-
- FirebaseInstallations (1.1.1):
47-
- FirebaseCore (~> 6.6)
48-
- GoogleUtilities/UserDefaults (~> 6.5)
39+
- FirebaseInstallations (1.6.0):
40+
- FirebaseCore (~> 6.10)
41+
- GoogleUtilities/Environment (~> 6.7)
42+
- GoogleUtilities/UserDefaults (~> 6.7)
4943
- PromisesObjC (~> 1.2)
50-
- FirebaseStorage (3.6.0):
51-
- FirebaseAuthInterop (~> 1.1)
52-
- FirebaseCore (~> 6.6)
44+
- FirebaseStorage (3.9.0):
45+
- FirebaseCore (~> 6.10)
5346
- GTMSessionFetcher/Core (~> 1.1)
54-
- Google-Mobile-Ads-SDK (7.58.0):
47+
- Google-Mobile-Ads-SDK (7.64.0):
5548
- GoogleAppMeasurement (~> 6.0)
56-
- GoogleAppMeasurement (6.4.1):
57-
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
58-
- GoogleUtilities/MethodSwizzler (~> 6.0)
59-
- GoogleUtilities/Network (~> 6.0)
60-
- "GoogleUtilities/NSData+zlib (~> 6.0)"
61-
- nanopb (= 0.3.9011)
62-
- GoogleDataTransport (5.1.1)
63-
- GoogleDataTransportCCTSupport (2.0.2):
64-
- GoogleDataTransport (~> 5.1)
65-
- nanopb (~> 0.3.901)
66-
- GoogleUtilities/AppDelegateSwizzler (6.5.2):
49+
- GoogleUserMessagingPlatform (~> 1.1)
50+
- GoogleAppMeasurement (6.7.2):
51+
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
52+
- GoogleUtilities/MethodSwizzler (~> 6.7)
53+
- GoogleUtilities/Network (~> 6.7)
54+
- "GoogleUtilities/NSData+zlib (~> 6.7)"
55+
- nanopb (~> 1.30905.0)
56+
- GoogleDataTransport (7.2.0):
57+
- nanopb (~> 1.30905.0)
58+
- GoogleUserMessagingPlatform (1.1.0)
59+
- GoogleUtilities/AppDelegateSwizzler (6.7.2):
6760
- GoogleUtilities/Environment
6861
- GoogleUtilities/Logger
6962
- GoogleUtilities/Network
70-
- GoogleUtilities/Environment (6.5.2)
71-
- GoogleUtilities/Logger (6.5.2):
63+
- GoogleUtilities/Environment (6.7.2):
64+
- PromisesObjC (~> 1.2)
65+
- GoogleUtilities/Logger (6.7.2):
7266
- GoogleUtilities/Environment
73-
- GoogleUtilities/MethodSwizzler (6.5.2):
67+
- GoogleUtilities/MethodSwizzler (6.7.2):
7468
- GoogleUtilities/Logger
75-
- GoogleUtilities/Network (6.5.2):
69+
- GoogleUtilities/Network (6.7.2):
7670
- GoogleUtilities/Logger
7771
- "GoogleUtilities/NSData+zlib"
7872
- GoogleUtilities/Reachability
79-
- "GoogleUtilities/NSData+zlib (6.5.2)"
80-
- GoogleUtilities/Reachability (6.5.2):
73+
- "GoogleUtilities/NSData+zlib (6.7.2)"
74+
- GoogleUtilities/Reachability (6.7.2):
8175
- GoogleUtilities/Logger
82-
- GoogleUtilities/UserDefaults (6.5.2):
76+
- GoogleUtilities/UserDefaults (6.7.2):
8377
- GoogleUtilities/Logger
84-
- GTMSessionFetcher/Core (1.3.1)
85-
- nanopb (0.3.9011):
86-
- nanopb/decode (= 0.3.9011)
87-
- nanopb/encode (= 0.3.9011)
88-
- nanopb/decode (0.3.9011)
89-
- nanopb/encode (0.3.9011)
90-
- PromisesObjC (1.2.8)
78+
- GTMSessionFetcher/Core (1.4.0)
79+
- nanopb (1.30905.0):
80+
- nanopb/decode (= 1.30905.0)
81+
- nanopb/encode (= 1.30905.0)
82+
- nanopb/decode (1.30905.0)
83+
- nanopb/encode (1.30905.0)
84+
- PromisesObjC (1.2.10)
9185
- ScrollableSegmentedControl (1.5.0)
9286

9387
DEPENDENCIES:
@@ -102,43 +96,37 @@ SPEC REPOS:
10296
trunk:
10397
- Firebase
10498
- FirebaseAnalytics
105-
- FirebaseAnalyticsInterop
106-
- FirebaseAuthInterop
10799
- FirebaseCore
108100
- FirebaseCoreDiagnostics
109-
- FirebaseCoreDiagnosticsInterop
110101
- FirebaseCrashlytics
111102
- FirebaseInstallations
112103
- FirebaseStorage
113104
- Google-Mobile-Ads-SDK
114105
- GoogleAppMeasurement
115106
- GoogleDataTransport
116-
- GoogleDataTransportCCTSupport
107+
- GoogleUserMessagingPlatform
117108
- GoogleUtilities
118109
- GTMSessionFetcher
119110
- nanopb
120111
- PromisesObjC
121112
- ScrollableSegmentedControl
122113

123114
SPEC CHECKSUMS:
124-
Firebase: 32f9520684e87c7af3f0704f7f88042626d6b536
125-
FirebaseAnalytics: 83f822fd0d33a46f49f89b8c3ab16ab4d89df08a
126-
FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae
127-
FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9
128-
FirebaseCore: 9aca0f1fffb405176ba15311a5621fcde4106fcf
129-
FirebaseCoreDiagnostics: 13a6564cd6d5375066bbc8940cc1753af24497f3
130-
FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
131-
FirebaseCrashlytics: ad2e8527a7efd9a7e708d5abe57318ced2e1dbd1
132-
FirebaseInstallations: acb3216eb9784d3b1d2d2d635ff74fa892cc0c44
133-
FirebaseStorage: b43ee271294227e1a3225544b073f3b49b427f46
134-
Google-Mobile-Ads-SDK: 7052557293c75c676db55feb707ace9b790f32c1
135-
GoogleAppMeasurement: e49be3954045b17d046f271b9cc1ec052bad9702
136-
GoogleDataTransport: 6ffa4dd0b6d547f8d27b91bd92fa9e197a3f5f1f
137-
GoogleDataTransportCCTSupport: 12f02e5c8f09c055615de90bcd5ba2c375546051
138-
GoogleUtilities: ad0f3b691c67909d03a3327cc205222ab8f42e0e
139-
GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
140-
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
141-
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
115+
Firebase: 210f41ca352067d83b1ba4fd2e7fb49a0c017397
116+
FirebaseAnalytics: a299a86ef70fcc6aa011418bc65a7e101fb9636c
117+
FirebaseCore: 9a41e2de78fef10f63cee30ab10e2945266bc1fc
118+
FirebaseCoreDiagnostics: 7535fe695737f8c5b350584292a70b7f8ff0357b
119+
FirebaseCrashlytics: 859918905322e8816d2b5ab7fe54bf5a0c84d21c
120+
FirebaseInstallations: 45f9d44d3a8d6f780fa337ee8987dad87210fcbc
121+
FirebaseStorage: 33b92875a9b556824886cc7a65120c7d2cb3a8d8
122+
Google-Mobile-Ads-SDK: aec52559ce73ddf1e6478d1904dd71a741f1bc61
123+
GoogleAppMeasurement: 3def7652b1f5b5a576178dc332e2a36a260fbef6
124+
GoogleDataTransport: 672fb0ce96fe7f7f31d43672fca62ad2c9c86f7b
125+
GoogleUserMessagingPlatform: 9dc714d2e1f0aa727b9cc52d266dc1b155f4c3f2
126+
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
127+
GTMSessionFetcher: 6f5c8abbab8a9bce4bb3f057e317728ec6182b10
128+
nanopb: c43f40fadfe79e8b8db116583945847910cbabc9
129+
PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151
142130
ScrollableSegmentedControl: 2e64bbe8968a7fcd8aae5014434481464fcdfe60
143131

144132
PODFILE CHECKSUM: 29b95d485a27c81711e78d9b14662503a45807e8

upload-symbols.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3-
Pods/FirebaseCrashlytics/upload-symbols -gsp OpenDocumentReader/GoogleService-Info.plist -p ios ~/Downloads/appDsyms-full.zip
3+
TODAY=$(date '+%Y-%m-%d')
44

5-
Pods/FirebaseCrashlytics/upload-symbols -gsp OpenDocumentReader/GoogleService-Info-Lite.plist -p ios ~/Downloads/appDsyms-lite.zip
5+
Pods/FirebaseCrashlytics/upload-symbols -gsp OpenDocumentReader/GoogleService-Info.plist -p ios ~/Library/Developer/Xcode/Archives/$TODAY/OpenDocumentReader\ Full*.xcarchive/dSYMs/
6+
7+
Pods/FirebaseCrashlytics/upload-symbols -gsp OpenDocumentReader/GoogleService-Info-Lite.plist -p ios ~/Library/Developer/Xcode/Archives/$TODAY/OpenDocumentReader\ Lite*.xcarchive/dSYMs/

0 commit comments

Comments
 (0)