Skip to content

Commit 15f5d46

Browse files
committed
Minor edits: change domain names in test app plist, fix warnings.
1 parent bb95429 commit 15f5d46

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

Example/DynamicLinks/App/iOS/DL-Info.plist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353
<key>FirebaseDynamicLinksCustomDomains</key>
5454
<array>
5555
<string>https://google.com</string>
56-
<string>g.co</string>
57-
<string>https://g.co</string>
5856
<string>https://google.com/one</string>
5957
<string>https://a.firebase.com/mypath</string>
6058
</array>

Example/DynamicLinks/FDLBuilderTestAppObjC/Info.plist

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@
7171
</array>
7272
<key>CFBundleVersion</key>
7373
<string>1</string>
74+
<key>FirebaseDynamicLinksCustomDomains</key>
75+
<array>
76+
<string>https://mydomain.com</string>
77+
<string>https://mydomain2.com</string>
78+
<string>https://google.com</string>
79+
<string>https://google.com</string>
80+
<string>google</string>
81+
<string>mydomain.com</string>
82+
<string>https://mydomain</string>
83+
<string>https://mydomain3.com</string>
84+
<string>https://google.com/one</string>
85+
<string>https://custom.com/one/two</string>
86+
<string>https://custom1.com/one/</string>
87+
</array>
7488
<key>LSRequiresIPhoneOS</key>
7589
<true/>
7690
<key>UILaunchStoryboardName</key>
@@ -85,19 +99,5 @@
8599
<string>UIInterfaceOrientationLandscapeLeft</string>
86100
<string>UIInterfaceOrientationLandscapeRight</string>
87101
</array>
88-
<key>FirebaseDynamicLinksCustomDomains</key>
89-
<array>
90-
<string>https://mydomain.com</string>
91-
<string>https://mydomain2.com</string>
92-
<string>https://google.com</string>
93-
<string>https://google.com</string>
94-
<string>go</string>
95-
<string>g.co</string>
96-
<string>https://go</string>
97-
<string>https://g.co</string>
98-
<string>https://google.com/one</string>
99-
<string>https://custom.com/one/two</string>
100-
<string>https://custom1.com/one/</string>
101-
</array>
102102
</dict>
103103
</plist>

Example/DynamicLinks/Tests/FIRDynamicLinksTest.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,18 +1019,16 @@ - (void)testSelfDiagnoseCompletionCalled {
10191019
- (void)testValidCustomDomainNames {
10201020
// Entries in plist file:
10211021
// https://google.com
1022-
// g.co
1023-
// https://g.co
10241022
// https://google.com/one
10251023
// https://a.firebase.com/mypath
10261024

10271025
NSArray<NSString *> *urlStrings = @[
10281026
@"https://google.com/1", // Valid domain. Any path.
10291027
@"https://google.com/2", // Valid domain. Any path.
10301028
@"https://google.com/one", // Valid domain. Specified path.
1031-
@"https://g.co/1", // Valid domain. Any path.
10321029
@"https://a.firebase.com/mypath/", // Valid subdomain.
10331030
@"https://a.firebase.com/mypath/abcd/efgh", // Long path.
1031+
@"https://a.firebase.com/mypath?link=abcd&test=1", // Long path.
10341032
];
10351033

10361034
for (NSString *urlString in urlStrings) {
@@ -1045,8 +1043,6 @@ - (void)testValidCustomDomainNames {
10451043
- (void)testInvalidCustomDomainNames {
10461044
// Entries in plist file:
10471045
// https://google.com
1048-
// g.co
1049-
// https://g.co
10501046
// https://google.com/one
10511047
// https://a.firebase.com/mypath
10521048

@@ -1056,7 +1052,7 @@ - (void)testInvalidCustomDomainNames {
10561052
@"google.com", // Valid domain. No scheme.
10571053
@"https://google.com", // Valid domain. No path.
10581054
@"http://google.com", // Valid domain. Invalid scheme.
1059-
@"https://g.co.com/abc", // Invalid domain starts with valid domain.
1055+
@"https://google.co.in/abc", // Invalid domain starts with valid domain name.
10601056
@"https://firebase.com/mypath", // Invalid (sub)domain.
10611057
@"https://b.firebase.com/mypath" // Invalid subdomain.
10621058
];

Firebase/DynamicLinks/FIRDynamicLinks.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ - (void)configureDynamicLinks:(FIRApp *)app {
222222
// Check to see if FirebaseDynamicLinksCustomDomains array is present.
223223
NSDictionary *infoDictionary = [NSBundle mainBundle].infoDictionary;
224224
NSArray *customDomains = infoDictionary[kInfoPlistCustomDomainsKey];
225-
if (customDomains && customDomains.count > 0) {
225+
if (customDomains) {
226226
FIRDLAddToWhiteListForCustomDomainsArray(customDomains);
227227
}
228228
}

0 commit comments

Comments
 (0)