Skip to content

Commit 38a056f

Browse files
authored
Completely stop forcing static frameworks (#7570)
1 parent 32922df commit 38a056f

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

FirebaseMLModelDownloader.podspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Pod::Spec.new do |s|
2929
s.watchos.deployment_target = watchos_deployment_target
3030

3131
s.cocoapods_version = '>= 1.4.0'
32-
s.static_framework = true
3332
s.prefix_header_file = false
3433

3534
s.source_files = [

FirebasePerformance.podspec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Firebase Performance library to measure performance of Mobile and Web Apps.
2424
s.tvos.deployment_target = tvos_deployment_target
2525

2626
s.cocoapods_version = '>= 1.4.0'
27-
s.static_framework = true
2827
s.prefix_header_file = false
2928

3029
base_dir = "FirebasePerformance/"
@@ -56,8 +55,8 @@ Firebase Performance library to measure performance of Mobile and Web Apps.
5655
}
5756

5857
s.ios.framework = 'CoreTelephony'
59-
s.ios.framework = 'QuartzCore'
60-
s.ios.framework = 'SystemConfiguration'
58+
s.framework = 'QuartzCore'
59+
s.framework = 'SystemConfiguration'
6160
s.dependency 'FirebaseCore', '~> 7.0'
6261
s.dependency 'FirebaseInstallations', '~> 7.0'
6362
s.dependency 'FirebaseRemoteConfig', '~> 7.0'

FirebasePerformance/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22
* Deprecate Clearcut event transport mechanism.
3+
* Enable dynamic framework support. (#7569)
34

45
# Version 7.7.0
56
* Add community supported tvOS.

FirebasePerformance/Sources/FPRClient.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ - (BOOL)startWithConfiguration:(FPRConfiguration *)config error:(NSError *__auto
119119
// Create the Logger for the Perf SDK events to be sent to Google Data Transport.
120120
self.gdtLogger = [[FPRGDTLogger alloc] initWithLogSource:logSource];
121121

122-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
122+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
123123
// Create telephony network information object ahead of time to avoid runtime delays.
124124
FPRNetworkInfo();
125125
#endif

FirebasePerformance/Sources/FPRProtoUtils.h

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

15-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
15+
#import <TargetConditionals.h>
16+
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h") && !TARGET_OS_MACCATALYST
17+
#define TARGET_HAS_MOBILE_CONNECTIVITY
1618
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
1719
#endif
1820

@@ -55,7 +57,7 @@ extern FPRMSGGaugeMetric* _Nullable FPRGetGaugeMetric(NSArray* _Nonnull gaugeDat
5557
*/
5658
extern FPRMSGApplicationProcessState FPRApplicationProcessState(FPRTraceState state);
5759

58-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
60+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
5961
/** Obtain a CTTelephonyNetworkInfo object to determine device network attributes.
6062
* @return CTTelephonyNetworkInfo object.
6163
*/

FirebasePerformance/Sources/FPRProtoUtils.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#import "FirebasePerformance/Sources/FPRProtoUtils.h"
1616

17-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
17+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
1818
#import <CoreTelephony/CTCarrier.h>
1919
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
2020
#endif
@@ -36,7 +36,7 @@
3636
NSDictionary<NSString *, NSNumber *> *dictionary);
3737
static FPRMSGNetworkRequestMetric_HttpMethod FPRHTTPMethodForString(NSString *methodString);
3838
static FPRMSGNetworkConnectionInfo_NetworkType FPRNetworkConnectionInfoNetworkType(void);
39-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
39+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
4040
static FPRMSGNetworkConnectionInfo_MobileSubtype FPRCellularNetworkType(void);
4141
#endif
4242
NSArray<FPRSessionDetails *> *FPRMakeFirstSessionVerbose(NSArray<FPRSessionDetails *> *sessions);
@@ -58,7 +58,7 @@
5858
iosAppInfo.bundleShortVersion = [mainBundle infoDictionary][@"CFBundleShortVersionString"];
5959
iosAppInfo.sdkVersion = [NSString stringWithUTF8String:kFPRSDKVersion];
6060
iosAppInfo.networkConnectionInfo.networkType = FPRNetworkConnectionInfoNetworkType();
61-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
61+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
6262
CTTelephonyNetworkInfo *networkInfo = FPRNetworkInfo();
6363
CTCarrier *provider = networkInfo.subscriberCellularProvider;
6464
NSString *mccMnc = FPRValidatedMccMnc(provider.mobileCountryCode, provider.mobileNetworkCode);
@@ -256,7 +256,7 @@ FPRMSGApplicationProcessState FPRApplicationProcessState(FPRTraceState state) {
256256
return processState;
257257
}
258258

259-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
259+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
260260
CTTelephonyNetworkInfo *FPRNetworkInfo() {
261261
static CTTelephonyNetworkInfo *networkInfo;
262262
static dispatch_once_t onceToken;
@@ -340,7 +340,7 @@ static FPRMSGNetworkConnectionInfo_NetworkType FPRNetworkConnectionInfoNetworkTy
340340
return networkType;
341341
}
342342

343-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
343+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
344344
/** Get the current cellular network connection type in NetworkConnectionInfo_MobileSubtype format.
345345
* @return Current cellular network connection type.
346346
*/

FirebasePerformance/Tests/Unit/FPRProtoUtilsTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ - (void)testApplicationProcessStateConversion {
256256
FPRApplicationProcessState(100));
257257
}
258258

259-
#if __has_include("CoreTelephony/CTTelephonyNetworkInfo.h")
259+
#ifdef TARGET_HAS_MOBILE_CONNECTIVITY
260260
/** Validates if network object creation works. */
261261
- (void)testNetworkInfoObjectCreation {
262262
XCTAssertNotNil(FPRNetworkInfo());

FirebaseSegmentation.podspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Firebase Segmentation enables you to associate your custom application instance
1919
s.tvos.deployment_target = '10.0'
2020

2121
s.cocoapods_version = '>= 1.4.0'
22-
s.static_framework = true
2322
s.prefix_header_file = false
2423

2524
s.source_files = [

0 commit comments

Comments
 (0)