Skip to content
Permalink
Browse files

Minor edits: change domain names in test app plist, fix warnings.

  • Loading branch information...
dmandar committed Nov 9, 2018
1 parent bb95429 commit 15f5d468075d322d7d7a2a0fa0caf299294dcb92
@@ -53,8 +53,6 @@
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://google.com</string>
<string>g.co</string>
<string>https://g.co</string>
<string>https://google.com/one</string>
<string>https://a.firebase.com/mypath</string>
</array>
@@ -71,6 +71,20 @@
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://mydomain.com</string>
<string>https://mydomain2.com</string>
<string>https://google.com</string>
<string>https://google.com</string>
<string>google</string>
<string>mydomain.com</string>
<string>https://mydomain</string>
<string>https://mydomain3.com</string>
<string>https://google.com/one</string>
<string>https://custom.com/one/two</string>
<string>https://custom1.com/one/</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
@@ -85,19 +99,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
<string>https://mydomain.com</string>
<string>https://mydomain2.com</string>
<string>https://google.com</string>
<string>https://google.com</string>
<string>go</string>
<string>g.co</string>
<string>https://go</string>
<string>https://g.co</string>
<string>https://google.com/one</string>
<string>https://custom.com/one/two</string>
<string>https://custom1.com/one/</string>
</array>
</dict>
</plist>
@@ -1019,18 +1019,16 @@ - (void)testSelfDiagnoseCompletionCalled {
- (void)testValidCustomDomainNames {
// Entries in plist file:
// https://google.com
// g.co
// https://g.co
// https://google.com/one
// https://a.firebase.com/mypath

NSArray<NSString *> *urlStrings = @[
@"https://google.com/1", // Valid domain. Any path.
@"https://google.com/2", // Valid domain. Any path.
@"https://google.com/one", // Valid domain. Specified path.
@"https://g.co/1", // Valid domain. Any path.
@"https://a.firebase.com/mypath/", // Valid subdomain.
@"https://a.firebase.com/mypath/abcd/efgh", // Long path.
@"https://a.firebase.com/mypath?link=abcd&test=1", // Long path.
];

for (NSString *urlString in urlStrings) {
@@ -1045,8 +1043,6 @@ - (void)testValidCustomDomainNames {
- (void)testInvalidCustomDomainNames {
// Entries in plist file:
// https://google.com
// g.co
// https://g.co
// https://google.com/one
// https://a.firebase.com/mypath

@@ -1056,7 +1052,7 @@ - (void)testInvalidCustomDomainNames {
@"google.com", // Valid domain. No scheme.
@"https://google.com", // Valid domain. No path.
@"http://google.com", // Valid domain. Invalid scheme.
@"https://g.co.com/abc", // Invalid domain starts with valid domain.
@"https://google.co.in/abc", // Invalid domain starts with valid domain name.
@"https://firebase.com/mypath", // Invalid (sub)domain.
@"https://b.firebase.com/mypath" // Invalid subdomain.
];
@@ -222,7 +222,7 @@ - (void)configureDynamicLinks:(FIRApp *)app {
// Check to see if FirebaseDynamicLinksCustomDomains array is present.
NSDictionary *infoDictionary = [NSBundle mainBundle].infoDictionary;
NSArray *customDomains = infoDictionary[kInfoPlistCustomDomainsKey];
if (customDomains && customDomains.count > 0) {
if (customDomains) {
FIRDLAddToWhiteListForCustomDomainsArray(customDomains);
}
}

0 comments on commit 15f5d46

Please sign in to comment.
You can’t perform that action at this time.