Skip to content

Commit c27db6d

Browse files
authored
Fix analyze errors (#2047)
1 parent 7e5befc commit c27db6d

File tree

7 files changed

+27
-13
lines changed

7 files changed

+27
-13
lines changed

Example/Database/Tests/Unit/FPruneForestTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ - (void) testKeepUnderPruneWorks {
5757
FPruneForest *forest = [FPruneForest empty];
5858
forest = [forest prunePath:[FPath pathWithString:@"foo/bar"]];
5959
forest = [forest keepPath:[FPath pathWithString:@"foo/bar/baz"]];
60-
forest = [forest keepAll:[NSSet setWithArray:@[@"qux", @"quu"]] atPath:[FPath pathWithString:@"foo/bar"]];
60+
[forest keepAll:[NSSet setWithArray:@[@"qux", @"quu"]] atPath:[FPath pathWithString:@"foo/bar"]];
6161
}
6262

6363
- (void) testPruneUnderKeepThrows {

Example/DynamicLinks/Tests/FIRDLScionLoggingTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ - (void)clearConditionalUserProperty:(nonnull NSString *)userPropertyName
6060
- (nonnull NSArray<FIRAConditionalUserProperty *> *)
6161
conditionalUserProperties:(nonnull NSString *)origin
6262
propertyNamePrefix:(nonnull NSString *)propertyNamePrefix {
63-
return nil;
63+
return @[];
6464
}
6565

6666
- (NSInteger)maxUserProperties:(nonnull NSString *)origin {

Example/Firebase.xcodeproj/xcshareddata/xcschemes/AllUnitTests_iOS.xcscheme

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
buildForRunning = "YES"
1212
buildForProfiling = "NO"
1313
buildForArchiving = "NO"
14-
buildForAnalyzing = "NO">
14+
buildForAnalyzing = "YES">
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "DE3373891E73773400881891"
@@ -25,7 +25,7 @@
2525
buildForRunning = "YES"
2626
buildForProfiling = "NO"
2727
buildForArchiving = "NO"
28-
buildForAnalyzing = "NO">
28+
buildForAnalyzing = "YES">
2929
<BuildableReference
3030
BuildableIdentifier = "primary"
3131
BlueprintIdentifier = "DE9314DD1E86C6BE0083EDBF"
@@ -39,7 +39,7 @@
3939
buildForRunning = "YES"
4040
buildForProfiling = "NO"
4141
buildForArchiving = "NO"
42-
buildForAnalyzing = "NO">
42+
buildForAnalyzing = "YES">
4343
<BuildableReference
4444
BuildableIdentifier = "primary"
4545
BlueprintIdentifier = "DEE14D581E84464D006FA992"
@@ -53,7 +53,7 @@
5353
buildForRunning = "YES"
5454
buildForProfiling = "NO"
5555
buildForArchiving = "NO"
56-
buildForAnalyzing = "NO">
56+
buildForAnalyzing = "YES">
5757
<BuildableReference
5858
BuildableIdentifier = "primary"
5959
BlueprintIdentifier = "DE7B8D1C1E8EF078009EB6DF"
@@ -67,7 +67,7 @@
6767
buildForRunning = "YES"
6868
buildForProfiling = "NO"
6969
buildForArchiving = "NO"
70-
buildForAnalyzing = "NO">
70+
buildForAnalyzing = "YES">
7171
<BuildableReference
7272
BuildableIdentifier = "primary"
7373
BlueprintIdentifier = "DE9315A61E8738460083EDBF"
@@ -81,7 +81,7 @@
8181
buildForRunning = "YES"
8282
buildForProfiling = "NO"
8383
buildForArchiving = "NO"
84-
buildForAnalyzing = "NO">
84+
buildForAnalyzing = "YES">
8585
<BuildableReference
8686
BuildableIdentifier = "primary"
8787
BlueprintIdentifier = "DEB13A0A1E73507E00AC236D"
@@ -95,7 +95,7 @@
9595
buildForRunning = "NO"
9696
buildForProfiling = "NO"
9797
buildForArchiving = "NO"
98-
buildForAnalyzing = "NO">
98+
buildForAnalyzing = "YES">
9999
<BuildableReference
100100
BuildableIdentifier = "primary"
101101
BlueprintIdentifier = "DE7B8D041E8EF077009EB6DF"
@@ -104,6 +104,20 @@
104104
ReferencedContainer = "container:Firebase.xcodeproj">
105105
</BuildableReference>
106106
</BuildActionEntry>
107+
<BuildActionEntry
108+
buildForTesting = "YES"
109+
buildForRunning = "NO"
110+
buildForProfiling = "NO"
111+
buildForArchiving = "NO"
112+
buildForAnalyzing = "YES">
113+
<BuildableReference
114+
BuildableIdentifier = "primary"
115+
BlueprintIdentifier = "DEDFF0121FD6135D00F7D466"
116+
BuildableName = "DynamicLinks_Tests_iOS.xctest"
117+
BlueprintName = "DynamicLinks_Tests_iOS"
118+
ReferencedContainer = "container:Firebase.xcodeproj">
119+
</BuildableReference>
120+
</BuildActionEntry>
107121
</BuildActionEntries>
108122
</BuildAction>
109123
<TestAction

Example/Messaging/Tests/FIRMessagingAnalyticsTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ - (void)clearConditionalUserProperty:(nonnull NSString *)userPropertyName
8787
- (nonnull NSArray<FIRAConditionalUserProperty *> *)
8888
conditionalUserProperties:(nonnull NSString *)origin
8989
propertyNamePrefix:(nonnull NSString *)propertyNamePrefix {
90-
return nil;
90+
return @[];
9191
}
9292

9393
- (NSInteger)maxUserProperties:(nonnull NSString *)origin {

Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/// The exact behavior of dict[key] = value is unclear when value is nil. This function safely adds
2626
/// the key-value pair to the dictionary, even when value is nil.
2727
/// This function will treat empty string in the same way as nil.
28-
NS_INLINE void FDLSafelyAddKeyValuePairToDictionary(id<NSCopying> key,
28+
NS_INLINE void FDLSafelyAddKeyValuePairToDictionary(NSString *key,
2929
NSString *stringValue,
3030
NSMutableDictionary *dictionary) {
3131
if (stringValue != nil && stringValue.length > 0) {

Firebase/DynamicLinks/FIRDLDefaultRetrievalProcessV2.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ - (void)retrievePendingDynamicLinkInternal {
213213
return [self.requestResults filteredArrayUsingPredicate:predicate];
214214
}
215215

216-
- (FIRDLRetrievalProcessResult *)resultWithUniqueMatchedDynamicLink {
216+
- (nullable FIRDLRetrievalProcessResult *)resultWithUniqueMatchedDynamicLink {
217217
// return result with unique-matched dynamic link if found
218218
NSArray<FIRDLRetrievalProcessResult *> *foundResultsWithDynamicLinks =
219219
[self foundResultsWithDynamicLinks];

Firebase/DynamicLinks/FIRDynamicLinks.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ - (void)configureDynamicLinks:(FIRApp *)app {
188188
service:kFIRServiceDynamicLinks
189189
reason:errorDescription];
190190
}
191-
[app sendLogsWithServiceName:kFIRServiceDynamicLinks version:kFIRDLVersion error:error];
192191
if (error) {
192+
[app sendLogsWithServiceName:kFIRServiceDynamicLinks version:kFIRDLVersion error:error];
193193
NSString *message = nil;
194194
if (options.usingOptionsFromDefaultPlist) {
195195
// Configured using plist file

0 commit comments

Comments
 (0)