Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AppDistribution to SwiftPM. #7045

Merged
merged 10 commits into from
Dec 2, 2020
Next Next commit
Add AppDistribution to SwiftPM.
Tests aren't ported yet due to an import OCMock issue.
  • Loading branch information
ryanwilson committed Nov 26, 2020
commit 0099a221496ea1b6ccb212c522c8f276a7393f97
27 changes: 27 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ let package = Package(
name: "FirebaseAuth",
targets: ["FirebaseAuth"]
),
.library(
name: "FirebaseAppDistribution",
targets: ["FirebaseAppDistributionTarget"]
),
.library(
name: "FirebaseCrashlytics",
targets: ["FirebaseCrashlytics"]
Expand Down Expand Up @@ -241,6 +245,27 @@ let package = Package(
checksum: "b0062d581e1bde54a1f6935bde1a49c6718a2a471825e02ab364e2dd8aef69c2"
),

.target(
name: "FirebaseAppDistributionTarget",
dependencies: [.target(name: "FirebaseAppDistribution",
condition: .when(platforms: [.iOS]))],
path: "SwiftPM-PlatformExclude/FirebaseAppDistributionWrap"
),

.target(
name: "FirebaseAppDistribution",
dependencies: ["FirebaseCore",
"FirebaseInstallations",
"GoogleDataTransport",
"GoogleUtilities_AppDelegateSwizzler",
"GoogleUtilities_UserDefaults"],
path: "FirebaseAppDistribution/Sources",
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath("../../"),
]
),

.target(
name: "FirebaseAuth",
dependencies: ["FirebaseCore",
Expand Down Expand Up @@ -729,6 +754,7 @@ let package = Package(
dependencies: [
"FirebaseAuth",
"FirebaseABTesting",
"FirebaseAppDistribution",
"Firebase",
"FirebaseCrashlytics",
"FirebaseCore",
Expand Down Expand Up @@ -770,6 +796,7 @@ let package = Package(
dependencies: [
"FirebaseAuth",
"FirebaseABTesting",
"FirebaseAppDistribution",
"Firebase",
"FirebaseCrashlytics",
"FirebaseCore",
Expand Down
18 changes: 18 additions & 0 deletions SwiftPM-PlatformExclude/FirebaseAppDistributionWrap/dummy.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#import <TargetConditionals.h>
#if !TARGET_OS_IOS
#warning "Firebase App Distribution only supports the iOS platform"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Prevent a missing umbrella header warning.
2 changes: 2 additions & 0 deletions SwiftPMTests/objc-import-test/objc-header.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#import "Firebase.h"
#import "FirebaseABTesting/FirebaseABTesting.h"
#import "FirebaseAppDistribution/FirebaseAppDistribution.h"
#import "FirebaseAuth/FirebaseAuth.h"
#import "FirebaseCore/FirebaseCore.h"
#import "FirebaseCrashlytics/FirebaseCrashlytics.h"
Expand All @@ -29,6 +30,7 @@

#import <Firebase.h>
#import <FirebaseABTesting/FirebaseABTesting.h>
#import <FirebaseAppDistribution/FirebaseAppDistribution.h>
#import <FirebaseAuth/FirebaseAuth.h>
#import <FirebaseCore/FirebaseCore.h>
#import <FirebaseCrashlytics/FirebaseCrashlytics.h>
Expand Down
1 change: 1 addition & 0 deletions SwiftPMTests/objc-import-test/objc-module.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

@import FirebaseAuth;
@import FirebaseABTesting;
@import FirebaseAppDistribution;
@import Firebase;
@import FirebaseCrashlytics;
@import FirebaseCore;
Expand Down
1 change: 1 addition & 0 deletions SwiftPMTests/swift-test/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Firebase
import FirebaseCore
import FirebaseAuth
import FirebaseABTesting
import FirebaseAppDistribution
import FirebaseCrashlytics
import FirebaseDynamicLinks
import FirebaseFirestore
Expand Down