41
41
#import " DynamicLinks/Utilities/FDLUtilities.h"
42
42
43
43
#ifndef FIRDynamicLinks_VERSION
44
- #error \
45
- " FIRDynamicLinks_VERSION is not defined: add -DFIRDynamicLinks_VERSION=... to the build \
44
+ #error "FIRDynamicLinks_VERSION is not defined: add -DFIRDynamicLinks_VERSION=... to the build \
46
45
invocation"
47
46
#endif
48
47
@@ -123,8 +122,8 @@ + (void)load {
123
122
124
123
+ (nonnull NSArray<FIRComponent *> *)componentsToRegister {
125
124
// Product requirement is enforced by CocoaPod. Not technical requirement for analytics.
126
- FIRDependency *analyticsDep =
127
- [FIRDependency dependencyWithProtocol: @protocol (FIRAnalyticsInterop) isRequired: NO ];
125
+ FIRDependency *analyticsDep = [FIRDependency dependencyWithProtocol:@protocol(FIRAnalyticsInterop)
126
+ isRequired:NO];
128
127
FIRComponentCreationBlock creationBlock =
129
128
^id _Nullable(FIRComponentContainer *container, BOOL *isCacheable) {
130
129
// Ensure it's cached so it returns the same instance every time dynamicLinks is called.
@@ -580,8 +579,9 @@ + (NSString *)diagnosticAnalyzeEntitlements {
580
579
stringByAppendingPathComponent: @" embedded.mobileprovision" ];
581
580
582
581
NSError *error;
583
- NSMutableData *profileData =
584
- [NSMutableData dataWithContentsOfFile: embeddedMobileprovisionFilePath options: 0 error: &error];
582
+ NSMutableData *profileData = [NSMutableData dataWithContentsOfFile: embeddedMobileprovisionFilePath
583
+ options: 0
584
+ error: &error];
585
585
586
586
if (!profileData.length || error) {
587
587
return @" \t SKIPPED: Not able to read entitlements (embedded.mobileprovision).\n " ;
@@ -672,21 +672,20 @@ + (NSString *)performDiagnosticsIncludingHeaderFooter:(BOOL)includingHeaderFoote
672
672
673
673
#if TARGET_IPHONE_SIMULATOR
674
674
// check is Simulator and print WARNING that Universal Links is not supported on Simulator
675
- [diagnosticString appendString:
676
- @" WARNING: iOS Simulator does not support Universal Links. Firebase "
677
- @" Dynamic Links SDK functionality will be limited. Some FDL "
678
- @" features may be missing or will not work correctly.\n " ];
675
+ [diagnosticString
676
+ appendString: @" WARNING: iOS Simulator does not support Universal Links. Firebase "
677
+ @" Dynamic Links SDK functionality will be limited. Some FDL "
678
+ @" features may be missing or will not work correctly.\n " ];
679
679
#endif // TARGET_IPHONE_SIMULATOR
680
680
681
681
id <UIApplicationDelegate> applicationDelegate = [UIApplication sharedApplication ].delegate ;
682
682
if (![applicationDelegate respondsToSelector: @selector (application:openURL:options: )]) {
683
683
detectedErrorsCnt++;
684
- [diagnosticString appendFormat:
685
- @" ERROR: UIApplication delegate %@ does not implements selector "
686
- @" %@ . FDL depends on this implementation to retrieve pending "
687
- @" dynamic link.\n " ,
688
- applicationDelegate,
689
- NSStringFromSelector (@selector (application:openURL:options: ))];
684
+ [diagnosticString appendFormat: @" ERROR: UIApplication delegate %@ does not implements selector "
685
+ @" %@ . FDL depends on this implementation to retrieve pending "
686
+ @" dynamic link.\n " ,
687
+ applicationDelegate,
688
+ NSStringFromSelector (@selector (application:openURL:options: ))];
690
689
}
691
690
692
691
// check that Info.plist has custom URL scheme and the scheme is the same as bundleID or
@@ -708,16 +707,14 @@ + (NSString *)performDiagnosticsIncludingHeaderFooter:(BOOL)includingHeaderFoote
708
707
}
709
708
if (!URLSchemeFoundInPlist) {
710
709
detectedErrorsCnt++;
711
- [diagnosticString appendFormat:
712
- @" ERROR: Specified custom URL scheme is %@ but Info.plist do "
713
- @" not contain such scheme in "
714
- " CFBundleURLTypes key.\n " ,
715
- URLScheme];
710
+ [diagnosticString appendFormat: @" ERROR: Specified custom URL scheme is %@ but Info.plist do "
711
+ @" not contain such scheme in "
712
+ " CFBundleURLTypes key.\n " ,
713
+ URLScheme];
716
714
} else {
717
- [diagnosticString appendFormat:
718
- @" \t Specified custom URL scheme is %@ and Info.plist contains "
719
- @" such scheme in CFBundleURLTypes key.\n " ,
720
- URLScheme];
715
+ [diagnosticString appendFormat: @" \t Specified custom URL scheme is %@ and Info.plist contains "
716
+ @" such scheme in CFBundleURLTypes key.\n " ,
717
+ URLScheme];
721
718
}
722
719
723
720
#if !TARGET_IPHONE_SIMULATOR
@@ -748,8 +745,8 @@ + (void)performDiagnosticsWithCompletion:(void (^_Nullable)(NSString *diagnostic
748
745
BOOL hasErrors))completionHandler;
749
746
{
750
747
NSInteger detectedErrorsCnt = 0 ;
751
- NSString *diagnosticString =
752
- [ self performDiagnosticsIncludingHeaderFooter: YES detectedErrors: &detectedErrorsCnt];
748
+ NSString *diagnosticString = [ self performDiagnosticsIncludingHeaderFooter: YES
749
+ detectedErrors: &detectedErrorsCnt];
753
750
if (completionHandler) {
754
751
completionHandler (diagnosticString, detectedErrorsCnt > 0 );
755
752
} else {
0 commit comments