Skip to content

Commit 4a8ee3d

Browse files
authored
Fix Catalyst define checks (#3958)
1 parent 6495dca commit 4a8ee3d

File tree

8 files changed

+14
-16
lines changed

8 files changed

+14
-16
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ jobs:
346346
- travis_wait 45 ./scripts/pod_lib_lint.rb FirebaseFirestore.podspec --use-libraries --allow-warnings --no-subspecs
347347

348348
- stage: test
349-
osx_image: xcode10.3
350349
env:
351350
- PROJECT=GoogleDataTransport METHOD=pod-lib-lint
352351
script:

Example/InstanceID/Tests/FIRInstanceIDKeyPairMigrationTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ - (void)testMigrationIfLegacyKeyPairsExist {
155155
#endif
156156
}
157157

158-
#if (TARGET_OS_IOS || TARGET_OS_TV) && !defined(TARGET_OS_MACCATALYST)
158+
#if (TARGET_OS_IOS || TARGET_OS_TV) && !TARGET_OS_MACCATALYST
159159
- (void)testUpdateKeyRefWithTagRetainsAndReleasesKeyRef {
160160
__weak id weakKeyRef;
161161

@@ -200,6 +200,6 @@ - (SecKeyRef)generateKeyRef {
200200

201201
return publicKey;
202202
}
203-
#endif // (TARGET_OS_IOS || TARGET_OS_TV) && !defined(TARGET_OS_MACCATALYST)
203+
#endif // (TARGET_OS_IOS || TARGET_OS_TV) && !TARGET_OS_MACCATALYST
204204

205205
@end

GoogleDataTransport/GDTCORLibrary/GDTCORStorage.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ - (void)storeEvent:(GDTCOREvent *)event {
126126
error:&error];
127127
[data writeToFile:[GDTCORStorage archivePath] atomically:YES];
128128
} else {
129-
#if !defined(TARGET_OS_MACCATALYST)
129+
#if !TARGET_OS_MACCATALYST
130130
[NSKeyedArchiver archiveRootObject:self toFile:[GDTCORStorage archivePath]];
131131
#endif
132132
}
@@ -222,7 +222,7 @@ - (void)appWillForeground:(GDTCORApplication *)app {
222222
NSData *data = [NSData dataWithContentsOfFile:[GDTCORStorage archivePath]];
223223
[NSKeyedUnarchiver unarchivedObjectOfClass:[GDTCORStorage class] fromData:data error:&error];
224224
} else {
225-
#if !defined(TARGET_OS_MACCATALYST)
225+
#if !TARGET_OS_MACCATALYST
226226
[NSKeyedUnarchiver unarchiveObjectWithFile:[GDTCORStorage archivePath]];
227227
#endif
228228
}
@@ -238,7 +238,7 @@ - (void)appWillBackground:(GDTCORApplication *)app {
238238
error:&error];
239239
[data writeToFile:[GDTCORStorage archivePath] atomically:YES];
240240
} else {
241-
#if !defined(TARGET_OS_MACCATALYST)
241+
#if !TARGET_OS_MACCATALYST
242242
[NSKeyedArchiver archiveRootObject:self toFile:[GDTCORStorage archivePath]];
243243
#endif
244244
}
@@ -267,7 +267,7 @@ - (void)appWillTerminate:(GDTCORApplication *)application {
267267
error:&error];
268268
[data writeToFile:[GDTCORStorage archivePath] atomically:YES];
269269
} else {
270-
#if !defined(TARGET_OS_MACCATALYST)
270+
#if !TARGET_OS_MACCATALYST
271271
[NSKeyedArchiver archiveRootObject:self toFile:[GDTCORStorage archivePath]];
272272
#endif
273273
}

GoogleDataTransport/GDTCORTests/Unit/GDTCORClockTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ - (void)testEncoding {
6060
fromData:clockData
6161
error:nil];
6262
} else {
63-
#if !defined(TARGET_OS_MACCATALYST)
63+
#if !TARGET_OS_MACCATALYST
6464
NSData *clockData = [NSKeyedArchiver archivedDataWithRootObject:clock];
6565
unarchivedClock = [NSKeyedUnarchiver unarchiveObjectWithData:clockData];
6666
#endif

GoogleDataTransport/GDTCORTests/Unit/GDTCOREventTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ - (void)testArchiving {
4949
requiringSecureCoding:YES
5050
error:nil];
5151
} else {
52-
#if !defined(TARGET_OS_MACCATALYST)
52+
#if !TARGET_OS_MACCATALYST
5353
archiveData = [NSKeyedArchiver archivedDataWithRootObject:event];
5454
#endif
5555
}
@@ -61,7 +61,7 @@ - (void)testArchiving {
6161
fromData:archiveData
6262
error:nil];
6363
} else {
64-
#if !defined(TARGET_OS_MACCATALYST)
64+
#if !TARGET_OS_MACCATALYST
6565
decodedEvent = [NSKeyedUnarchiver unarchiveObjectWithData:archiveData];
6666
#endif
6767
}

GoogleDataTransport/GDTCORTests/Unit/GDTCORStorageTest.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ - (void)testNSSecureCoding {
271271
requiringSecureCoding:YES
272272
error:nil];
273273
} else {
274-
#if !defined(TARGET_OS_MACCATALYST)
274+
#if !TARGET_OS_MACCATALYST
275275
storageData = [NSKeyedArchiver archivedDataWithRootObject:[GDTCORStorage sharedInstance]];
276276
#endif
277277
}
@@ -290,7 +290,7 @@ - (void)testNSSecureCoding {
290290
fromData:storageData
291291
error:&error];
292292
} else {
293-
#if !defined(TARGET_OS_MACCATALYST)
293+
#if !TARGET_OS_MACCATALYST
294294
unarchivedStorage = [NSKeyedUnarchiver unarchiveObjectWithData:storageData];
295295
#endif
296296
}
@@ -311,7 +311,7 @@ - (void)testNSSecureCodingWithSharedInstance {
311311
requiringSecureCoding:YES
312312
error:nil];
313313
} else {
314-
#if !defined(TARGET_OS_MACCATALYST)
314+
#if !TARGET_OS_MACCATALYST
315315
storageData = [NSKeyedArchiver archivedDataWithRootObject:[GDTCORStorage sharedInstance]];
316316
#endif
317317
}
@@ -329,7 +329,7 @@ - (void)testNSSecureCodingWithSharedInstance {
329329
fromData:storageData
330330
error:nil];
331331
} else {
332-
#if !defined(TARGET_OS_MACCATALYST)
332+
#if !TARGET_OS_MACCATALYST
333333
unarchivedStorage = [NSKeyedUnarchiver unarchiveObjectWithData:storageData];
334334
#endif
335335
}

GoogleDataTransport/GDTCORTests/Unit/GDTCORUploadPackageTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ - (void)testEncoding {
124124
error:&error];
125125
XCTAssertNil(error);
126126
} else {
127-
#if !defined(TARGET_OS_MACCATALYST)
127+
#if !TARGET_OS_MACCATALYST
128128
NSData *packageData = [NSKeyedArchiver archivedDataWithRootObject:uploadPackage];
129129
recreatedPackage = [NSKeyedUnarchiver unarchiveObjectWithData:packageData];
130130
#endif

scripts/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ function RunXcodebuild() {
9494

9595
# Remove each product when it moves up to Xcode 11
9696
if [[ $product == 'Firestore' || # #3949
97-
$product == 'GoogleDataTransport' || # #3947
9897
$product == 'InAppMessagingDisplay' # #3948
9998
]]; then
10099
ios_flags=(

0 commit comments

Comments
 (0)