Skip to content

Commit 08938f7

Browse files
authored
Fixes the count file not being found (#5584)
* Fixes the count file not being found Calling the new GDTCORRootDirectory() function ensures that the directory needed is created before an attempt to write is made. Fixes #5549 * Update CHANGELOG and versions
1 parent 287224c commit 08938f7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

GoogleDataTransport.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'GoogleDataTransport'
3-
s.version = '6.1.0'
3+
s.version = '6.1.1'
44
s.summary = 'Google iOS SDK data transport.'
55

66
s.description = <<-DESC

GoogleDataTransport/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v6.1.1
2+
- Fixes writing event counts in a directory that doesn't yet exist. (#5549)
3+
14
# v6.1.0
25
- watchOS extension and independent apps now supported. (#4292)
36
- iOS extensions better supported.

GoogleDataTransport/GDTCORLibrary/GDTCOREvent.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ + (NSNumber *)nextEventID {
3333
static dispatch_once_t onceToken;
3434
dispatch_once(&onceToken, ^{
3535
eventIDQueue = dispatch_queue_create("com.google.GDTCOREventIDQueue", DISPATCH_QUEUE_SERIAL);
36-
counterPath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0];
37-
counterPath = [NSString stringWithFormat:@"%@/google-sdks-events/count", counterPath];
36+
counterPath = GDTCORRootDirectory().path;
37+
counterPath = [NSString stringWithFormat:@"%@/count", counterPath];
3838
NSError *error;
3939
NSString *countText = [NSString stringWithContentsOfFile:counterPath
4040
encoding:NSUTF8StringEncoding

0 commit comments

Comments
 (0)