Skip to content

Commit f052459

Browse files
authored
Fix AppDistro spm build for non-iOS platforms (#7091)
1 parent 1c87885 commit f052459

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

FirebaseAppDistribution/Sources/FIRAppDistribution.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#import <Foundation/Foundation.h>
15+
#import <TargetConditionals.h>
16+
#if TARGET_OS_IOS
1517

1618
#import <GoogleUtilities/GULAppDelegateSwizzler.h>
1719
#import <GoogleUtilities/GULUserDefaults.h>
@@ -333,3 +335,5 @@ - (BOOL)isCodeHashIdentical:(NSString *)codeHash {
333335
return codeHash && [codeHash isEqualToString:[machO codeHash]];
334336
}
335337
@end
338+
339+
#endif

FirebaseAppDistribution/Sources/FIRAppDistributionUIService.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#import <TargetConditionals.h>
16+
#if TARGET_OS_IOS
17+
1518
#import <AuthenticationServices/AuthenticationServices.h>
1619
#import <Foundation/Foundation.h>
1720
#import <SafariServices/SafariServices.h>
1821
#import <UIKit/UIKit.h>
1922

2023
#import "FirebaseAppDistribution/Sources/Private/FIRAppDistribution.h"
2124

25+
@protocol SFSafariViewControllerDelegate;
26+
2227
NS_ASSUME_NONNULL_BEGIN
2328

2429
/**
@@ -60,3 +65,5 @@ typedef void (^AppDistributionRegistrationFlowCompletion)(NSError *_Nullable err
6065
@end
6166

6267
NS_ASSUME_NONNULL_END
68+
69+
#endif

FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#import <TargetConditionals.h>
16+
#if TARGET_OS_IOS
17+
1518
#import "FirebaseAppDistribution/Sources/FIRAppDistributionUIService.h"
1619
#import "FirebaseAppDistribution/Sources/FIRFADLogger.h"
1720
#import "FirebaseAppDistribution/Sources/Public/FirebaseAppDistribution/FIRAppDistribution.h"
@@ -264,3 +267,5 @@ - (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:
264267
}
265268

266269
@end
270+
271+
#endif

0 commit comments

Comments
 (0)