Bladeren bron

Fix Xcode 13 beta 4 build issues for Firebase Performance (#8516)

* Fix Xcode 13 beta 4 build issues

* Update to NS_EXTENSION_UNAVAILABLE instead of NS_EXTENSION_UNAVAILABLE_IOS
Jeremy Jiang 4 jaren geleden
bovenliggende
commit
33a5c2013e
33 gewijzigde bestanden met toevoegingen van 72 en 3 verwijderingen
  1. 1 0
      FirebasePerformance/Sources/AppActivity/FPRAppActivityTracker.h
  2. 1 0
      FirebasePerformance/Sources/AppActivity/FPRScreenTraceTracker.h
  3. 1 0
      FirebasePerformance/Sources/AppActivity/FPRSessionManager.h
  4. 1 0
      FirebasePerformance/Sources/AppActivity/FPRTraceBackgroundActivityTracker.h
  5. 1 0
      FirebasePerformance/Sources/FPRClient.h
  6. 4 0
      FirebasePerformance/Sources/FPRNanoPbUtils.h
  7. 2 0
      FirebasePerformance/Sources/Gauges/CPU/FPRCPUGaugeCollector.h
  8. 1 0
      FirebasePerformance/Sources/Gauges/FPRGaugeManager+Private.h
  9. 1 0
      FirebasePerformance/Sources/Gauges/FPRGaugeManager.h
  10. 1 0
      FirebasePerformance/Sources/Gauges/FPRGaugeManager.m
  11. 2 0
      FirebasePerformance/Sources/Gauges/Memory/FPRMemoryGaugeCollector.h
  12. 1 0
      FirebasePerformance/Sources/Instrumentation/FIRHTTPMetric+Private.h
  13. 1 0
      FirebasePerformance/Sources/Instrumentation/FPRInstrument.h
  14. 1 0
      FirebasePerformance/Sources/Instrumentation/FPRInstrumentation.h
  15. 1 0
      FirebasePerformance/Sources/Instrumentation/FPRNetworkTrace.h
  16. 1 0
      FirebasePerformance/Sources/Instrumentation/FPRObjectInstrumentor.h
  17. 1 1
      FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegate.h
  18. 1 0
      FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegateInstrument.h
  19. 9 0
      FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegateInstrument.m
  20. 1 0
      FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegate.h
  21. 1 0
      FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegateInstrument.h
  22. 6 0
      FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegateInstrument.m
  23. 1 0
      FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLConnectionInstrument.h
  24. 5 0
      FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLConnectionInstrument.m
  25. 1 0
      FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLSessionInstrument.h
  26. 16 0
      FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLSessionInstrument.m
  27. 1 1
      FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLSessionInstrument_Private.h
  28. 1 0
      FirebasePerformance/Sources/Instrumentation/UIKit/FPRUIViewControllerInstrument.h
  29. 3 0
      FirebasePerformance/Sources/Instrumentation/UIKit/FPRUIViewControllerInstrument.m
  30. 1 0
      FirebasePerformance/Sources/Loggers/FPRGDTLogger.h
  31. 1 0
      FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.h
  32. 1 0
      FirebasePerformance/Sources/Public/FirebasePerformance/FIRHTTPMetric.h
  33. 1 1
      FirebasePerformance/Sources/Public/FirebasePerformance/FIRTrace.h

+ 1 - 0
FirebasePerformance/Sources/AppActivity/FPRAppActivityTracker.h

@@ -38,6 +38,7 @@ typedef NS_ENUM(NSInteger, FPRApplicationState) {
 /** This class is used to track the app activity and create internal traces to capture the
  *  performance metrics.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRAppActivityTracker : NSObject
 
 /** The trace that tracks the currently active session of the app. *Do not stop this trace*. This is

+ 1 - 0
FirebasePerformance/Sources/AppActivity/FPRScreenTraceTracker.h

@@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
  *  frames and slow frames, and if it has been registered as a delegate of FIRAScreenViewReporter,
  *  it also automatically creates screen traces for each UIViewController.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRScreenTraceTracker : NSObject
 
 /** Singleton instance of FPRScreenTraceTracker.

+ 1 - 0
FirebasePerformance/Sources/AppActivity/FPRSessionManager.h

@@ -22,6 +22,7 @@ FOUNDATION_EXTERN NSString *_Nonnull const kFPRSessionIdUpdatedNotification;
 /** This class manages the current active sessionId of the application and provides mechanism for
  *  propagating the session Id.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRSessionManager : NSObject
 
 /** The current active session managed by the session manager. */

+ 1 - 0
FirebasePerformance/Sources/AppActivity/FPRTraceBackgroundActivityTracker.h

@@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, FPRTraceState) {
  * object. This object will be used by a trace to determine its application state if the lifecycle
  * of the trace is backgrounded, foregrounded or both.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRTraceBackgroundActivityTracker : NSObject
 
 /** Background state of the tracker. */

+ 1 - 0
FirebasePerformance/Sources/FPRClient.h

@@ -30,6 +30,7 @@ typedef NS_ENUM(NSInteger, FPRClientErrorCode) {
 /** This class is not exposed to the public and internally provides the primary entry point into
  *  the Firebase Performance module's functionality.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRClient : NSObject
 
 /** YES if SDK is configured, otherwise NO. */

+ 4 - 0
FirebasePerformance/Sources/FPRNanoPbUtils.h

@@ -107,21 +107,25 @@ extern StringToNumberMap* _Nullable FPREncodeStringToNumberMap(NSDictionary* _Nu
  *  @param appID The Google app id to put into the message
  *  @return A firebase_perf_v1_PerfMetric struct.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 extern firebase_perf_v1_PerfMetric FPRGetPerfMetricMessage(NSString* _Nonnull appID);
 
 /** Creates a new firebase_perf_v1_ApplicationInfo struct populated with system metadata.
  *  @return A firebase_perf_v1_ApplicationInfo struct.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 extern firebase_perf_v1_ApplicationInfo FPRGetApplicationInfoMessage(void);
 
 /** Converts the FIRTrace object to a firebase_perf_v1_TraceMetric struct.
  *  @return A firebase_perf_v1_TraceMetric struct.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 extern firebase_perf_v1_TraceMetric FPRGetTraceMetric(FIRTrace* _Nonnull trace);
 
 /** Converts the FPRNetworkTrace object to a firebase_perf_v1_NetworkRequestMetric struct.
  *  @return A firebase_perf_v1_NetworkRequestMetric struct.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 extern firebase_perf_v1_NetworkRequestMetric FPRGetNetworkRequestMetric(
     FPRNetworkTrace* _Nonnull trace);
 

+ 2 - 0
FirebasePerformance/Sources/Gauges/CPU/FPRCPUGaugeCollector.h

@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
 @class FPRCPUGaugeCollector;
 
 /** Delegate method for the CPU Gauge collector to report back the CPU gauge data. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @protocol FPRCPUGaugeCollectorDelegate
 
 /**
@@ -38,6 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
 /** CPU Gauge collector implementation. This class collects the CPU utilitization and reports back
  *  to the delegate.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRCPUGaugeCollector : NSObject <FPRGaugeCollector>
 
 /** Reference to the delegate object. */

+ 1 - 0
FirebasePerformance/Sources/Gauges/FPRGaugeManager+Private.h

@@ -18,6 +18,7 @@
 #import "FirebasePerformance/Sources/Gauges/Memory/FPRMemoryGaugeCollector.h"
 
 /** This extension should only be used for testing. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRGaugeManager ()
 
 /** @brief Tracks if gauge collection is enabled. */

+ 1 - 0
FirebasePerformance/Sources/Gauges/FPRGaugeManager.h

@@ -27,6 +27,7 @@ typedef NS_OPTIONS(NSUInteger, FPRGauges) {
 
 /** This class controls different gauge collection in the system. List of the gauges this class
  manages are listed above. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRGaugeManager : NSObject
 
 /** @brief List of gauges that are currently being actively captured. */

+ 1 - 0
FirebasePerformance/Sources/Gauges/FPRGaugeManager.m

@@ -26,6 +26,7 @@
 // Number of gauge data information after which that gets flushed to Google Data Transport.
 NSInteger const kGaugeDataBatchSize = 25;
 
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRGaugeManager () <FPRCPUGaugeCollectorDelegate, FPRMemoryGaugeCollectorDelegate>
 
 /** @brief List of gauges that are currently being actively captured. */

+ 2 - 0
FirebasePerformance/Sources/Gauges/Memory/FPRMemoryGaugeCollector.h

@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
 @class FPRMemoryGaugeCollector;
 
 /** Delegate method for the memory Gauge collector to report back the memory gauge data. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @protocol FPRMemoryGaugeCollectorDelegate
 
 /**
@@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @end
 
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRMemoryGaugeCollector : NSObject <FPRGaugeCollector>
 
 /** Reference to the delegate object. */

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/FIRHTTPMetric+Private.h

@@ -18,6 +18,7 @@
  * Extension that is added on top of the class FIRHTTPMetric to make the private properties visible
  * between the implementation file and the unit tests.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FIRHTTPMetric ()
 
 /* Network trace to capture the HTTPMetric information. */

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/FPRInstrument.h

@@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
  *  actually implement the instrument. Subclasses should provide their own implementations of
  *  registerInstrumentor
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRInstrument : NSObject
 
 /** The list of class instrumentors. count should == 1 in most cases, and be > 1 for class clusters.

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/FPRInstrumentation.h

@@ -23,6 +23,7 @@ FOUNDATION_EXTERN NSString *const kFPRInstrumentationGroupNetworkKey;
 FOUNDATION_EXTERN NSString *const kFPRInstrumentationGroupUIKitKey;
 
 /** This class manages all automatic instrumentation. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRInstrumentation : NSObject
 
 /** Registers the instrument group.

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/FPRNetworkTrace.h

@@ -76,6 +76,7 @@ typedef NS_ENUM(NSInteger, FPRNetworkTraceCheckpointState) {
  * FPRNetworkTrace object contains information about an NSURLRequest. Every object contains
  * information about the URL, type of request, and details of the response.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNetworkTrace : NSObject <FPRNetworkResponseHandler, FIRPerformanceAttributable>
 
 /** @brief Start time of the trace since epoch. */

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/FPRObjectInstrumentor.h

@@ -39,6 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
  *  with a dynamically generated subclass of the object's original class and installing methods
  *  onto this new class.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRObjectInstrumentor : FPRInstrument
 
 /** The instrumented object. */

+ 1 - 1
FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegate.h

@@ -15,7 +15,7 @@
 #import <Foundation/Foundation.h>
 
 NS_ASSUME_NONNULL_BEGIN
-
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLConnectionDelegate : NSObject <NSURLConnectionDelegate,
                                                   NSURLConnectionDataDelegate,
                                                   NSURLConnectionDownloadDelegate>

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegateInstrument.h

@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
 /** This class instruments the delegate methods needed to start/stop trace correctly. This class is
  *  not intended to be used standalone--it should only be used by FPRNSURLConnectionInstrument.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLConnectionDelegateInstrument : FPRInstrument <FPRObjectInstrumentorProtocol>
 
 /** Registers an instrument for a delegate class if it hasn't yet been instrumented.

+ 9 - 0
FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegateInstrument.m

@@ -39,6 +39,7 @@ static dispatch_queue_t GetInstrumentationQueue() {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionDidFailWithError(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connection:didFailWithError:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -63,6 +64,7 @@ void InstrumentConnectionDidFailWithError(FPRClassInstrumentor *instrumentor) {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionWillSendRequestRedirectResponse(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connection:willSendRequest:redirectResponse:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -85,6 +87,7 @@ void InstrumentConnectionWillSendRequestRedirectResponse(FPRClassInstrumentor *i
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionDidReceiveResponse(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connection:didReceiveResponse:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -109,6 +112,7 @@ void InstrumentConnectionDidReceiveResponse(FPRClassInstrumentor *instrumentor)
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionDidReceiveData(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connection:didReceiveData:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -131,6 +135,7 @@ void InstrumentConnectionDidReceiveData(FPRClassInstrumentor *instrumentor) {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionAllTheTotals(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -157,6 +162,7 @@ void InstrumentConnectionAllTheTotals(FPRClassInstrumentor *instrumentor) {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionDidFinishLoading(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connectionDidFinishLoading:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -178,6 +184,7 @@ void InstrumentConnectionDidFinishLoading(FPRClassInstrumentor *instrumentor) {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionDidWriteDataTotalBytesWrittenExpectedTotalBytes(
     FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connection:didWriteData:totalBytesWritten:expectedTotalBytes:);
@@ -202,6 +209,7 @@ void InstrumentConnectionDidWriteDataTotalBytesWrittenExpectedTotalBytes(
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionDidFinishDownloadingDestinationURL(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(connectionDidFinishDownloading:destinationURL:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -222,6 +230,7 @@ void InstrumentConnectionDidFinishDownloadingDestinationURL(FPRClassInstrumentor
 
 #pragma mark - Helper functions
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void CopySelector(SEL selector, FPRObjectInstrumentor *instrumentor) {
   static Class fromClass = Nil;
   static dispatch_once_t onceToken;

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegate.h

@@ -18,6 +18,7 @@
  *  methods. While swizzling a delegate, if their class doesn't implement the below methods, these
  *  implementations will be copied onto the delegate class.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLSessionDelegate : NSObject <NSURLSessionDelegate,
                                                NSURLSessionDataDelegate,
                                                NSURLSessionTaskDelegate,

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegateInstrument.h

@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
 /** This class instruments the delegate methods needed to start/stop traces correctly. This class is
  *  not intended to be used standalone--it should only be used by FPRNSURLSessionInstrument.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLSessionDelegateInstrument : FPRInstrument <FPRObjectInstrumentorProtocol>
 
 /** Registers an instrumentor for a delegate class if it hasn't yet been instrumented.

+ 6 - 0
FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegateInstrument.m

@@ -40,6 +40,7 @@ static dispatch_queue_t GetInstrumentationQueue() {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentURLSessionTaskDidCompleteWithError(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(URLSession:task:didCompleteWithError:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -67,6 +68,7 @@ void InstrumentURLSessionTaskDidCompleteWithError(FPRClassInstrumentor *instrume
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentURLSessionTaskDidSendBodyDataTotalBytesSentTotalBytesExpectedToSend(
     FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(URLSession:
@@ -104,6 +106,7 @@ void InstrumentURLSessionTaskDidSendBodyDataTotalBytesSentTotalBytesExpectedToSe
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentURLSessionDataTaskDidReceiveData(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(URLSession:dataTask:didReceiveData:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -128,6 +131,7 @@ void InstrumentURLSessionDataTaskDidReceiveData(FPRClassInstrumentor *instrument
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentURLSessionDownloadTaskDidFinishDownloadToURL(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(URLSession:downloadTask:didFinishDownloadingToURL:);
   FPRSelectorInstrumentor *selectorInstrumentor =
@@ -152,6 +156,7 @@ void InstrumentURLSessionDownloadTaskDidFinishDownloadToURL(FPRClassInstrumentor
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentURLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite(
     FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(URLSession:
@@ -185,6 +190,7 @@ void InstrumentURLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpe
 #pragma mark - Helper functions
 
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void CopySelector(SEL selector, FPRObjectInstrumentor *instrumentor) {
   static Class fromClass = Nil;
   static dispatch_once_t onceToken;

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLConnectionInstrument.h

@@ -17,6 +17,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** This class instruments the NSURLConnection class. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLConnectionInstrument : FPRInstrument
 
 @end

+ 5 - 0
FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLConnectionInstrument.m

@@ -50,6 +50,7 @@ static dispatch_queue_t GetInstrumentationQueue() {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentSendAsynchronousRequestQueueCompletionHandler(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(sendAsynchronousRequest:queue:completionHandler:);
   FPRSelectorInstrumentor *selectorInstrumentor = SelectorInstrumentor(selector, instrumentor, YES);
@@ -85,6 +86,7 @@ void InstrumentSendAsynchronousRequestQueueCompletionHandler(FPRClassInstrumento
  *      class to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentInitWithRequestDelegate(FPRClassInstrumentor *instrumentor,
                                        FPRNSURLConnectionDelegateInstrument *delegateInstrument) {
   SEL selector = @selector(initWithRequest:delegate:);
@@ -118,6 +120,7 @@ void InstrumentInitWithRequestDelegate(FPRClassInstrumentor *instrumentor,
  *      class to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentInitWithRequestDelegateStartImmediately(
     FPRClassInstrumentor *instrumentor, FPRNSURLConnectionDelegateInstrument *delegateInstrument) {
   SEL selector = @selector(initWithRequest:delegate:startImmediately:);
@@ -150,6 +153,7 @@ void InstrumentInitWithRequestDelegateStartImmediately(
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionStart(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(start);
   FPRSelectorInstrumentor *selectorInstrumentor = SelectorInstrumentor(selector, instrumentor, NO);
@@ -173,6 +177,7 @@ void InstrumentConnectionStart(FPRClassInstrumentor *instrumentor) {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentConnectionCancel(FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(cancel);
   FPRSelectorInstrumentor *selectorInstrumentor = SelectorInstrumentor(selector, instrumentor, NO);

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLSessionInstrument.h

@@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
 /** This class instruments the NSURLSession class cluster. As new classes are discovered, they will
  *  be swizzled on a shared queue. Completion blocks and delegate methods are also wrapped.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLSessionInstrument : FPRInstrument
 
 @end

+ 16 - 0
FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLSessionInstrument.m

@@ -78,6 +78,7 @@ typedef void (^FPRDownloadTaskCompletionHandler)(NSURL *_Nullable location,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentSharedSession(FPRNSURLSessionInstrument *instrument,
                              FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(sharedSession);
@@ -107,6 +108,7 @@ void InstrumentSharedSession(FPRNSURLSessionInstrument *instrument,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentSessionWithConfiguration(FPRNSURLSessionInstrument *instrument,
                                         FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(sessionWithConfiguration:);
@@ -138,6 +140,7 @@ void InstrumentSessionWithConfiguration(FPRNSURLSessionInstrument *instrument,
  *      selectors.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentSessionWithConfigurationDelegateDelegateQueue(
     FPRNSURLSessionInstrument *instrument,
     FPRClassInstrumentor *instrumentor,
@@ -181,6 +184,7 @@ void InstrumentSessionWithConfigurationDelegateDelegateQueue(
  */
 
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDataTaskWithURL(FPRNSURLSessionInstrument *instrument,
                                FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(dataTaskWithURL:);
@@ -212,6 +216,7 @@ void InstrumentDataTaskWithURL(FPRNSURLSessionInstrument *instrument,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDataTaskWithURLCompletionHandler(FPRNSURLSessionInstrument *instrument,
                                                 FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(dataTaskWithURL:completionHandler:);
@@ -251,6 +256,7 @@ void InstrumentDataTaskWithURLCompletionHandler(FPRNSURLSessionInstrument *instr
  */
 
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDataTaskWithRequest(FPRNSURLSessionInstrument *instrument,
                                    FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(dataTaskWithRequest:);
@@ -282,6 +288,7 @@ void InstrumentDataTaskWithRequest(FPRNSURLSessionInstrument *instrument,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDataTaskWithRequestCompletionHandler(FPRNSURLSessionInstrument *instrument,
                                                     FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(dataTaskWithRequest:completionHandler:);
@@ -321,6 +328,7 @@ void InstrumentDataTaskWithRequestCompletionHandler(FPRNSURLSessionInstrument *i
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentUploadTaskWithRequestFromFile(FPRNSURLSessionInstrument *instrument,
                                              FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(uploadTaskWithRequest:fromFile:);
@@ -352,6 +360,7 @@ void InstrumentUploadTaskWithRequestFromFile(FPRNSURLSessionInstrument *instrume
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentUploadTaskWithRequestFromFileCompletionHandler(FPRNSURLSessionInstrument *instrument,
                                                               FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(uploadTaskWithRequest:fromFile:completionHandler:);
@@ -383,6 +392,7 @@ void InstrumentUploadTaskWithRequestFromFileCompletionHandler(FPRNSURLSessionIns
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentUploadTaskWithRequestFromData(FPRNSURLSessionInstrument *instrument,
                                              FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(uploadTaskWithRequest:fromData:);
@@ -415,6 +425,7 @@ void InstrumentUploadTaskWithRequestFromData(FPRNSURLSessionInstrument *instrume
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentUploadTaskWithRequestFromDataCompletionHandler(FPRNSURLSessionInstrument *instrument,
                                                               FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(uploadTaskWithRequest:fromData:completionHandler:);
@@ -447,6 +458,7 @@ void InstrumentUploadTaskWithRequestFromDataCompletionHandler(FPRNSURLSessionIns
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentUploadTaskWithStreamedRequest(FPRNSURLSessionInstrument *instrument,
                                              FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(uploadTaskWithStreamedRequest:);
@@ -477,6 +489,7 @@ void InstrumentUploadTaskWithStreamedRequest(FPRNSURLSessionInstrument *instrume
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDownloadTaskWithURL(FPRNSURLSessionInstrument *instrument,
                                    FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(downloadTaskWithURL:);
@@ -507,6 +520,7 @@ void InstrumentDownloadTaskWithURL(FPRNSURLSessionInstrument *instrument,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDownloadTaskWithURLCompletionHandler(FPRNSURLSessionInstrument *instrument,
                                                     FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(downloadTaskWithURL:completionHandler:);
@@ -546,6 +560,7 @@ void InstrumentDownloadTaskWithURLCompletionHandler(FPRNSURLSessionInstrument *i
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDownloadTaskWithRequest(FPRNSURLSessionInstrument *instrument,
                                        FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(downloadTaskWithRequest:);
@@ -576,6 +591,7 @@ void InstrumentDownloadTaskWithRequest(FPRNSURLSessionInstrument *instrument,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentDownloadTaskWithRequestCompletionHandler(FPRNSURLSessionInstrument *instrument,
                                                         FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(downloadTaskWithRequest:completionHandler:);

+ 1 - 1
FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLSessionInstrument_Private.h

@@ -17,7 +17,7 @@
 #import "FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLSessionDelegateInstrument.h"
 
 NS_ASSUME_NONNULL_BEGIN
-
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRNSURLSessionInstrument ()
 
 /** The delegate instrument. */

+ 1 - 0
FirebasePerformance/Sources/Instrumentation/UIKit/FPRUIViewControllerInstrument.h

@@ -17,6 +17,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** This class instruments the UIViewController class. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRUIViewControllerInstrument : FPRInstrument
 
 @end

+ 3 - 0
FirebasePerformance/Sources/Instrumentation/UIKit/FPRUIViewControllerInstrument.m

@@ -39,6 +39,7 @@ static dispatch_queue_t GetInstrumentationQueue() {
 
 // Returns the singleton UIApplication of the application this is currently running in or nil if
 // it's in an app extension.
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 static UIApplication *FPRSharedApplication() {
   if ([GULAppEnvironmentUtil isAppExtension]) {
     return nil;
@@ -54,6 +55,7 @@ static UIApplication *FPRSharedApplication() {
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentViewDidAppear(FPRUIViewControllerInstrument *instrument,
                              FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(viewDidAppear:);
@@ -78,6 +80,7 @@ void InstrumentViewDidAppear(FPRUIViewControllerInstrument *instrument,
  *  @param instrumentor The FPRClassInstrumentor to add the selector instrumentor to.
  */
 FOUNDATION_STATIC_INLINE
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 void InstrumentViewDidDisappear(FPRUIViewControllerInstrument *instrument,
                                 FPRClassInstrumentor *instrumentor) {
   SEL selector = @selector(viewDidDisappear:);

+ 1 - 0
FirebasePerformance/Sources/Loggers/FPRGDTLogger.h

@@ -18,6 +18,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** Logger used to dispatch events to Google Data Transport layer. */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRGDTLogger : NSObject
 
 /** Log source initialized against. */

+ 1 - 0
FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.h

@@ -18,6 +18,7 @@
  * FPRGDTRateLimiter class helps in limiting the number of events that are sent
  * to the backend. This is based on the token bucket rate limiting algorithm.
  */
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FPRGDTRateLimiter : NSObject <GDTCOREventTransformer>
 
 @end

+ 1 - 0
FirebasePerformance/Sources/Public/FirebasePerformance/FIRHTTPMetric.h

@@ -45,6 +45,7 @@ typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
  * FIRHTTPMetric object can be used to make the SDK record information about a HTTP network request.
  */
 NS_SWIFT_NAME(HTTPMetric)
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 @interface FIRHTTPMetric : NSObject <FIRPerformanceAttributable>
 
 /**

+ 1 - 1
FirebasePerformance/Sources/Public/FirebasePerformance/FIRTrace.h

@@ -22,7 +22,7 @@
  * Traces also include "Counters". Counters are used to track information which is cumulative in
  * nature (e.g., Bytes downloaded). Counters are scoped to an FIRTrace object.
  */
-NS_EXTENSION_UNAVAILABLE("FirebasePerformance does not support app extensions at this time.")
+NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
 NS_SWIFT_NAME(Trace)
 @interface FIRTrace : NSObject <FIRPerformanceAttributable>