Skip to content

Commit

Permalink
NR-238932: wrap up a couple of TODOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdillard-NewRelic committed Mar 28, 2024
1 parent 40f99e0 commit 8b6d29c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 135 deletions.
18 changes: 0 additions & 18 deletions Agent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
0209ABD824E706AE00E45C90 /* TestRetryTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD224E706AD00E45C90 /* TestRetryTracker.m */; };
0209ABD924E706AE00E45C90 /* TestHandledExceptionController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD324E706AD00E45C90 /* TestHandledExceptionController.mm */; };
0209ABDA24E706AE00E45C90 /* TestHexUploadPublisher.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD424E706AE00E45C90 /* TestHexUploadPublisher.mm */; };
0209ABDB24E706AE00E45C90 /* TestSessionIdentifierManger.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD524E706AE00E45C90 /* TestSessionIdentifierManger.m */; };
0209ABDC24E706AE00E45C90 /* TestContextAdapter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD624E706AE00E45C90 /* TestContextAdapter.mm */; };
0209ABE024E706D300E45C90 /* TestUITableViewInstrumentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABDF24E706D300E45C90 /* TestUITableViewInstrumentation.m */; };
0209ABE324E706E600E45C90 /* TestUICollectionViewInstrumentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABE224E706E600E45C90 /* TestUICollectionViewInstrumentation.m */; };
Expand Down Expand Up @@ -107,7 +106,6 @@
025657FC24EB19BF00FE3125 /* TestUITableViewInstrumentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABDF24E706D300E45C90 /* TestUITableViewInstrumentation.m */; };
025657FD24EB19BF00FE3125 /* TestHexUploadPublisher.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD424E706AE00E45C90 /* TestHexUploadPublisher.mm */; };
025657FE24EB19BF00FE3125 /* NRMetricTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209AC1824E7071E00E45C90 /* NRMetricTests.m */; };
025657FF24EB19BF00FE3125 /* TestSessionIdentifierManger.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209ABD524E706AE00E45C90 /* TestSessionIdentifierManger.m */; };
0256580124EB19BF00FE3125 /* NRMAActingClassUtilsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209AC6B24E7392D00E45C90 /* NRMAActingClassUtilsTest.m */; };
0256580224EB19BF00FE3125 /* NRMeasurementProducerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209AC1F24E7071F00E45C90 /* NRMeasurementProducerTest.m */; };
0256580424EB19BF00FE3125 /* NRMeasurementsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0209AC1D24E7071E00E45C90 /* NRMeasurementsTest.m */; };
Expand Down Expand Up @@ -359,9 +357,7 @@
02FF493724DC625A00115469 /* NRMAExceptionReportAdaptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF492924DC625A00115469 /* NRMAExceptionReportAdaptor.h */; };
02FF493824DC625A00115469 /* NRMAExceptionReportAdaptor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 02FF492A24DC625A00115469 /* NRMAExceptionReportAdaptor.mm */; };
02FF493924DC625A00115469 /* NRMAHexUploader.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF492B24DC625A00115469 /* NRMAHexUploader.h */; };
02FF493A24DC625A00115469 /* NRMASessionIdentifierManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 02FF492C24DC625A00115469 /* NRMASessionIdentifierManager.mm */; };
02FF493B24DC625A00115469 /* NRMARetryTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF492D24DC625A00115469 /* NRMARetryTracker.h */; };
02FF493C24DC625A00115469 /* NRMASessionIdentifierManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF492E24DC625A00115469 /* NRMASessionIdentifierManager.h */; };
02FF493D24DC625A00115469 /* NRMAHandledExceptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 02FF492F24DC625A00115469 /* NRMAHandledExceptions.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
02FF494B24DC626E00115469 /* NRMAHarvestController.m in Sources */ = {isa = PBXBuildFile; fileRef = 02FF494024DC626E00115469 /* NRMAHarvestController.m */; };
02FF494C24DC626E00115469 /* NRMAHarvestTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF494124DC626E00115469 /* NRMAHarvestTimer.h */; };
Expand Down Expand Up @@ -575,7 +571,6 @@
02FF4B3124E3201400115469 /* NRMACrashReport_DeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF48FC24DC624300115469 /* NRMACrashReport_DeviceInfo.h */; };
02FF4B3224E3201400115469 /* NRMAProducerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF4A6224DC64E600115469 /* NRMAProducerProtocol.h */; };
02FF4B3324E3201400115469 /* reflection.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF4AFA24DC8CB200115469 /* reflection.h */; };
02FF4B3424E3201400115469 /* NRMASessionIdentifierManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF492E24DC625A00115469 /* NRMASessionIdentifierManager.h */; };
02FF4B3524E3201400115469 /* HexUploadPublisher.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 02FF492324DC625A00115469 /* HexUploadPublisher.hpp */; };
02FF4B3624E3201400115469 /* NRMAMeasurementPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 02FF49F424DC647100115469 /* NRMAMeasurementPool.h */; };
02FF4B3724E3201400115469 /* NRMALoggerBridge.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 02FF485224DC615900115469 /* NRMALoggerBridge.hpp */; };
Expand Down Expand Up @@ -903,7 +898,6 @@
02FF4C9724E3201400115469 /* NRMAHTTPUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 02FF4ACC24DC657B00115469 /* NRMAHTTPUtilities.mm */; };
02FF4C9824E3201400115469 /* NRMATraceSegment.m in Sources */ = {isa = PBXBuildFile; fileRef = 02FF49D424DC636100115469 /* NRMATraceSegment.m */; };
02FF4C9924E3201400115469 /* NRMAClassNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 02FF48B124DC61F600115469 /* NRMAClassNode.m */; };
02FF4C9A24E3201400115469 /* NRMASessionIdentifierManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 02FF492C24DC625A00115469 /* NRMASessionIdentifierManager.mm */; };
2B02DB86293E630B001A59D6 /* NRMAURLSessionAsyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B02DB85293E630B001A59D6 /* NRMAURLSessionAsyncTests.swift */; };
2B02DB87293E630B001A59D6 /* NRMAURLSessionAsyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B02DB85293E630B001A59D6 /* NRMAURLSessionAsyncTests.swift */; };
2B30CFBF283BFC05002341DA /* NewRelic.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 021A15BA24C9EEE700E8DFD5 /* NewRelic.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -1387,7 +1381,6 @@
0209ABD224E706AD00E45C90 /* TestRetryTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestRetryTracker.m; sourceTree = "<group>"; };
0209ABD324E706AD00E45C90 /* TestHandledExceptionController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestHandledExceptionController.mm; sourceTree = "<group>"; };
0209ABD424E706AE00E45C90 /* TestHexUploadPublisher.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestHexUploadPublisher.mm; sourceTree = "<group>"; };
0209ABD524E706AE00E45C90 /* TestSessionIdentifierManger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestSessionIdentifierManger.m; sourceTree = "<group>"; };
0209ABD624E706AE00E45C90 /* TestContextAdapter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestContextAdapter.mm; sourceTree = "<group>"; };
0209ABDF24E706D300E45C90 /* TestUITableViewInstrumentation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestUITableViewInstrumentation.m; sourceTree = "<group>"; };
0209ABE224E706E600E45C90 /* TestUICollectionViewInstrumentation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestUICollectionViewInstrumentation.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1685,9 +1678,7 @@
02FF492924DC625A00115469 /* NRMAExceptionReportAdaptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NRMAExceptionReportAdaptor.h; sourceTree = "<group>"; };
02FF492A24DC625A00115469 /* NRMAExceptionReportAdaptor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NRMAExceptionReportAdaptor.mm; sourceTree = "<group>"; };
02FF492B24DC625A00115469 /* NRMAHexUploader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NRMAHexUploader.h; sourceTree = "<group>"; };
02FF492C24DC625A00115469 /* NRMASessionIdentifierManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NRMASessionIdentifierManager.mm; sourceTree = "<group>"; };
02FF492D24DC625A00115469 /* NRMARetryTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NRMARetryTracker.h; sourceTree = "<group>"; };
02FF492E24DC625A00115469 /* NRMASessionIdentifierManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NRMASessionIdentifierManager.h; sourceTree = "<group>"; };
02FF492F24DC625A00115469 /* NRMAHandledExceptions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NRMAHandledExceptions.mm; sourceTree = "<group>"; };
02FF494024DC626E00115469 /* NRMAHarvestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NRMAHarvestController.m; sourceTree = "<group>"; };
02FF494124DC626E00115469 /* NRMAHarvestTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NRMAHarvestTimer.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2262,7 +2253,6 @@
0209ABD124E706AD00E45C90 /* TestHexUploader.m */,
0209ABD424E706AE00E45C90 /* TestHexUploadPublisher.mm */,
0209ABD224E706AD00E45C90 /* TestRetryTracker.m */,
0209ABD524E706AE00E45C90 /* TestSessionIdentifierManger.m */,
);
path = "Handled-Exception-Tests";
sourceTree = "<group>";
Expand Down Expand Up @@ -2844,8 +2834,6 @@
02FF492524DC625A00115469 /* NRMAHexUploader.m */,
02FF492D24DC625A00115469 /* NRMARetryTracker.h */,
02FF492624DC625A00115469 /* NRMARetryTracker.m */,
02FF492E24DC625A00115469 /* NRMASessionIdentifierManager.h */,
02FF492C24DC625A00115469 /* NRMASessionIdentifierManager.mm */,
);
path = HandledException;
sourceTree = "<group>";
Expand Down Expand Up @@ -3384,7 +3372,6 @@
02FF491024DC624400115469 /* NRMACrashReport_DeviceInfo.h in Headers */,
02FF4A6F24DC64E600115469 /* NRMAProducerProtocol.h in Headers */,
02FF4B0624DC8CB200115469 /* reflection.h in Headers */,
02FF493C24DC625A00115469 /* NRMASessionIdentifierManager.h in Headers */,
02FF493124DC625A00115469 /* HexUploadPublisher.hpp in Headers */,
02FF49FE24DC647200115469 /* NRMAMeasurementPool.h in Headers */,
2B33E5D42AA9160E00AEB7B4 /* NRMASessionEvent.h in Headers */,
Expand Down Expand Up @@ -3599,7 +3586,6 @@
02FF4B3124E3201400115469 /* NRMACrashReport_DeviceInfo.h in Headers */,
02FF4B3224E3201400115469 /* NRMAProducerProtocol.h in Headers */,
02FF4B3324E3201400115469 /* reflection.h in Headers */,
02FF4B3424E3201400115469 /* NRMASessionIdentifierManager.h in Headers */,
02FF4B3524E3201400115469 /* HexUploadPublisher.hpp in Headers */,
02FF4B3624E3201400115469 /* NRMAMeasurementPool.h in Headers */,
2B33E5D52AA9160E00AEB7B4 /* NRMASessionEvent.h in Headers */,
Expand Down Expand Up @@ -4281,7 +4267,6 @@
C94F518D28577E0000E81E01 /* InstrumentationTests.m in Sources */,
0209ABDA24E706AE00E45C90 /* TestHexUploadPublisher.mm in Sources */,
0209AC2324E7071F00E45C90 /* NRMetricTests.m in Sources */,
0209ABDB24E706AE00E45C90 /* TestSessionIdentifierManger.m in Sources */,
0209AC8F24E7393300E45C90 /* NRMAActingClassUtilsTest.m in Sources */,
0209AC2824E7071F00E45C90 /* NRMeasurementProducerTest.m in Sources */,
0209AC2724E7071F00E45C90 /* NRMeasurementsTest.m in Sources */,
Expand Down Expand Up @@ -4565,7 +4550,6 @@
02FF4AD124DC657B00115469 /* NRMAHTTPUtilities.mm in Sources */,
02FF49DF24DC636100115469 /* NRMATraceSegment.m in Sources */,
02FF48BB24DC61F600115469 /* NRMAClassNode.m in Sources */,
02FF493A24DC625A00115469 /* NRMASessionIdentifierManager.mm in Sources */,
F6E79C7925A65347006277FB /* W3CTraceParent.mm in Sources */,
2BDCA8AA2A8C41160005740D /* NRMASAM.mm in Sources */,
);
Expand All @@ -4590,7 +4574,6 @@
025657FC24EB19BF00FE3125 /* TestUITableViewInstrumentation.m in Sources */,
025657FD24EB19BF00FE3125 /* TestHexUploadPublisher.mm in Sources */,
025657FE24EB19BF00FE3125 /* NRMetricTests.m in Sources */,
025657FF24EB19BF00FE3125 /* TestSessionIdentifierManger.m in Sources */,
343883572834405700B31C2E /* NRMAURLTransformerTests.m in Sources */,
0256580124EB19BF00FE3125 /* NRMAActingClassUtilsTest.m in Sources */,
0256580224EB19BF00FE3125 /* NRMeasurementProducerTest.m in Sources */,
Expand Down Expand Up @@ -4883,7 +4866,6 @@
34EA78CB2A39221E0071CC95 /* NRMACustomEvent.m in Sources */,
02FF4C9824E3201400115469 /* NRMATraceSegment.m in Sources */,
02FF4C9924E3201400115469 /* NRMAClassNode.m in Sources */,
02FF4C9A24E3201400115469 /* NRMASessionIdentifierManager.mm in Sources */,
F6E79C7A25A65347006277FB /* W3CTraceParent.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
13 changes: 5 additions & 8 deletions Agent/General/NewRelicAgentInternal.m
Original file line number Diff line number Diff line change
Expand Up @@ -808,21 +808,18 @@ - (void) handleAppRefreshTask:(BGAppRefreshTask *)task {
// We always reschedule the heartbeat task.
[self scheduleHeartbeatTask];

__weak BGAppRefreshTask *weakTask = task;

[task setExpirationHandler:^{
__weak BGTask *weakTask = task;
if (weakTask) {
[weakTask setTaskCompletedWithSuccess:false];
__strong BGAppRefreshTask *strongTask = weakTask;
if (strongTask) {
[strongTask setTaskCompletedWithSuccess:false];
}
//TODO: Invalidate and cancel the harvest request
// weakTask.invalidateAndCancel()

}];

[[[NRMAHarvestController harvestController] harvester] execute];

// TODO: Make sure this is the right place to call this.
[task setTaskCompletedWithSuccess:true];

}
else {
NRLOG_VERBOSE(@"No background tasks pre iOS 13");
Expand Down
10 changes: 0 additions & 10 deletions Agent/HandledException/NRMASessionIdentifierManager.h

This file was deleted.

42 changes: 0 additions & 42 deletions Agent/HandledException/NRMASessionIdentifierManager.mm

This file was deleted.

4 changes: 1 addition & 3 deletions Test Harness/NRTestApp/NRTestApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}


// Background fetch handling\

// TODO: Must add this and then we will capture in NewRelicAgentInternal
// Background fetch handling.
func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {

NewRelic.logVerbose("performFetchWithCompletionHandler called")
Expand Down

This file was deleted.

0 comments on commit 8b6d29c

Please sign in to comment.