Skip to content

Commit 7f3d5ce

Browse files
authored
Merge pull request #3 from lscardinali/startup-generic
Removes all mentions of AppLaunch and TimeStamps. FNMElement is now generic
2 parents 416991b + d2da917 commit 7f3d5ce

File tree

10 files changed

+153
-135
lines changed

10 files changed

+153
-135
lines changed

FNMNetworkMonitor.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'FNMNetworkMonitor'
33
spec.module_name = 'FNMNetworkMonitor'
4-
spec.version = '8.0.1'
4+
spec.version = '9.0.0'
55
spec.summary = 'A network monitor'
66
spec.homepage = 'https://github.com/Farfetch/network-monitor-ios'
77
spec.license = 'MIT'

NetworkMonitor.xcodeproj/project.pbxproj

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616
A38AEE691FE3CEFC00778860 /* FNMRecordDetailInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A38AEE681FE3CEFC00778860 /* FNMRecordDetailInfo.swift */; };
1717
A39500011FD83AB1001D6086 /* FNMRecordExporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFE91FD83AB1001D6086 /* FNMRecordExporter.swift */; };
1818
A39500031FD83AB1001D6086 /* FNMDebugListingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFEC1FD83AB1001D6086 /* FNMDebugListingViewController.swift */; };
19-
A39500041FD83AB1001D6086 /* FNMAppLaunchRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFEF1FD83AB1001D6086 /* FNMAppLaunchRecord.swift */; };
20-
A39500051FD83AB1001D6086 /* FNMAppLaunchRequestNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFF01FD83AB1001D6086 /* FNMAppLaunchRequestNode.swift */; };
19+
A39500041FD83AB1001D6086 /* FNMRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFEF1FD83AB1001D6086 /* FNMRecord.swift */; };
20+
A39500051FD83AB1001D6086 /* FNMRequestNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFF01FD83AB1001D6086 /* FNMRequestNode.swift */; };
2121
A395000C1FD83AB1001D6086 /* FNMNetworkMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFFA1FD83AB1001D6086 /* FNMNetworkMonitor.swift */; };
2222
A395000D1FD83AB1001D6086 /* FNMAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFFC1FD83AB1001D6086 /* FNMAdditions.swift */; };
2323
A39500101FD84F96001D6086 /* FNMDebugSummaryTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395000F1FD84F96001D6086 /* FNMDebugSummaryTableViewCell.swift */; };
2424
A395FFFD1FD83AB1001D6086 /* FNMNetworkMonitorURLProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A395FFE31FD83AB1001D6086 /* FNMNetworkMonitorURLProtocol.swift */; };
2525
A3DA63EE201B3637002CB2C0 /* FNMViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DA63ED201B3637002CB2C0 /* FNMViewController.swift */; };
2626
A3E27FC51FC81F9000245188 /* Cold-Start-First-Party-Calls.json in Resources */ = {isa = PBXBuildFile; fileRef = A3E27FC11FC81F8400245188 /* Cold-Start-First-Party-Calls.json */; };
2727
A3E27FC71FC81F9000245188 /* Cold-Start-Third-Party-Calls.json in Resources */ = {isa = PBXBuildFile; fileRef = A3E27FC01FC81F8400245188 /* Cold-Start-Third-Party-Calls.json */; };
28+
DDD462ED24DB54C600F14CD6 /* FNMNetworkMonitor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F793CA4D1F9E361900AA9C41 /* FNMNetworkMonitor.framework */; };
29+
DDD462EE24DB54C600F14CD6 /* FNMNetworkMonitor.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F793CA4D1F9E361900AA9C41 /* FNMNetworkMonitor.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2830
F737BF202080F97D00ECCDE3 /* FNMHTTPRequestRecord.swift in Sources */ = {isa = PBXBuildFile; fileRef = F737BF1F2080F97C00ECCDE3 /* FNMHTTPRequestRecord.swift */; };
2931
F737BF222080F9B700ECCDE3 /* FNMHTTPRequestRecord+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F737BF212080F9B700ECCDE3 /* FNMHTTPRequestRecord+Codable.swift */; };
3032
F737BF262080FC9100ECCDE3 /* FNMProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = F737BF252080FC9100ECCDE3 /* FNMProfile.swift */; };
@@ -48,13 +50,20 @@
4850
F7DA82FD24093AF40095D93F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7DA82FC24093AF40095D93F /* Assets.xcassets */; };
4951
F7DA830024093AF40095D93F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7DA82FE24093AF40095D93F /* LaunchScreen.storyboard */; };
5052
F7DA8306240956280095D93F /* Generic-Profile-Response.json in Resources */ = {isa = PBXBuildFile; fileRef = F7C47A8F2406EA7100875E72 /* Generic-Profile-Response.json */; };
51-
F7EDC62020ADB2670027B771 /* FNMAppLaunchCurrentRunCodableContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EDC61B20ADB2670027B771 /* FNMAppLaunchCurrentRunCodableContainer.swift */; };
52-
F7EDC62220ADB2670027B771 /* FNMAppLaunchTimestamps.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EDC61D20ADB2670027B771 /* FNMAppLaunchTimestamps.swift */; };
53+
F7EDC62020ADB2670027B771 /* FNMCurrentRunCodableContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EDC61B20ADB2670027B771 /* FNMCurrentRunCodableContainer.swift */; };
54+
F7EDC62220ADB2670027B771 /* FNMElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EDC61D20ADB2670027B771 /* FNMElement.swift */; };
5355
F7EDC62620ADE0C30027B771 /* FNMHTTPRequestRecordCodableContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EDC62520ADE0C30027B771 /* FNMHTTPRequestRecordCodableContainer.swift */; };
5456
F7FA58A82084A5E700CEFB88 /* FNMProfile+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FA58A72084A5E700CEFB88 /* FNMProfile+Codable.swift */; };
5557
/* End PBXBuildFile section */
5658

5759
/* Begin PBXContainerItemProxy section */
60+
DDD462EF24DB54C600F14CD6 /* PBXContainerItemProxy */ = {
61+
isa = PBXContainerItemProxy;
62+
containerPortal = F793CA441F9E361900AA9C41 /* Project object */;
63+
proxyType = 1;
64+
remoteGlobalIDString = F793CA4C1F9E361900AA9C41;
65+
remoteInfo = FNMNetworkMonitor;
66+
};
5867
F793CA6C1F9E474200AA9C41 /* PBXContainerItemProxy */ = {
5968
isa = PBXContainerItemProxy;
6069
containerPortal = F793CA441F9E361900AA9C41 /* Project object */;
@@ -64,6 +73,20 @@
6473
};
6574
/* End PBXContainerItemProxy section */
6675

76+
/* Begin PBXCopyFilesBuildPhase section */
77+
DDD462F124DB54C600F14CD6 /* Embed Frameworks */ = {
78+
isa = PBXCopyFilesBuildPhase;
79+
buildActionMask = 2147483647;
80+
dstPath = "";
81+
dstSubfolderSpec = 10;
82+
files = (
83+
DDD462EE24DB54C600F14CD6 /* FNMNetworkMonitor.framework in Embed Frameworks */,
84+
);
85+
name = "Embed Frameworks";
86+
runOnlyForDeploymentPostprocessing = 0;
87+
};
88+
/* End PBXCopyFilesBuildPhase section */
89+
6790
/* Begin PBXFileReference section */
6891
1FA99E1422F96E2000C084BF /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
6992
4055D74E21BFBDDE0058EC1D /* FNMNetworkMonitorURLProtocol+Protocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FNMNetworkMonitorURLProtocol+Protocols.swift"; sourceTree = "<group>"; };
@@ -78,8 +101,8 @@
78101
A395FFE31FD83AB1001D6086 /* FNMNetworkMonitorURLProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMNetworkMonitorURLProtocol.swift; sourceTree = "<group>"; };
79102
A395FFE91FD83AB1001D6086 /* FNMRecordExporter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMRecordExporter.swift; sourceTree = "<group>"; };
80103
A395FFEC1FD83AB1001D6086 /* FNMDebugListingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMDebugListingViewController.swift; sourceTree = "<group>"; };
81-
A395FFEF1FD83AB1001D6086 /* FNMAppLaunchRecord.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMAppLaunchRecord.swift; sourceTree = "<group>"; };
82-
A395FFF01FD83AB1001D6086 /* FNMAppLaunchRequestNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMAppLaunchRequestNode.swift; sourceTree = "<group>"; };
104+
A395FFEF1FD83AB1001D6086 /* FNMRecord.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMRecord.swift; sourceTree = "<group>"; };
105+
A395FFF01FD83AB1001D6086 /* FNMRequestNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMRequestNode.swift; sourceTree = "<group>"; };
83106
A395FFFA1FD83AB1001D6086 /* FNMNetworkMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMNetworkMonitor.swift; sourceTree = "<group>"; };
84107
A395FFFC1FD83AB1001D6086 /* FNMAdditions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMAdditions.swift; sourceTree = "<group>"; };
85108
A3DA63ED201B3637002CB2C0 /* FNMViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FNMViewController.swift; sourceTree = "<group>"; };
@@ -113,8 +136,8 @@
113136
F7DA82FC24093AF40095D93F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
114137
F7DA82FF24093AF40095D93F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
115138
F7DA830124093AF40095D93F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
116-
F7EDC61B20ADB2670027B771 /* FNMAppLaunchCurrentRunCodableContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMAppLaunchCurrentRunCodableContainer.swift; sourceTree = "<group>"; };
117-
F7EDC61D20ADB2670027B771 /* FNMAppLaunchTimestamps.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMAppLaunchTimestamps.swift; sourceTree = "<group>"; };
139+
F7EDC61B20ADB2670027B771 /* FNMCurrentRunCodableContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMCurrentRunCodableContainer.swift; sourceTree = "<group>"; };
140+
F7EDC61D20ADB2670027B771 /* FNMElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMElement.swift; sourceTree = "<group>"; };
118141
F7EDC62520ADE0C30027B771 /* FNMHTTPRequestRecordCodableContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FNMHTTPRequestRecordCodableContainer.swift; sourceTree = "<group>"; };
119142
F7FA58A72084A5E700CEFB88 /* FNMProfile+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FNMProfile+Codable.swift"; sourceTree = "<group>"; };
120143
/* End PBXFileReference section */
@@ -139,6 +162,7 @@
139162
isa = PBXFrameworksBuildPhase;
140163
buildActionMask = 2147483647;
141164
files = (
165+
DDD462ED24DB54C600F14CD6 /* FNMNetworkMonitor.framework in Frameworks */,
142166
);
143167
runOnlyForDeploymentPostprocessing = 0;
144168
};
@@ -177,7 +201,7 @@
177201
children = (
178202
A395FFE91FD83AB1001D6086 /* FNMRecordExporter.swift */,
179203
F7EDC62420ADD2180027B771 /* RequestRecord */,
180-
F7EDC62320ADD2110027B771 /* AppLaunch */,
204+
F7EDC62320ADD2110027B771 /* Records */,
181205
);
182206
path = Exporter;
183207
sourceTree = "<group>";
@@ -219,6 +243,13 @@
219243
path = Resources;
220244
sourceTree = "<group>";
221245
};
246+
DDD462EC24DB54C600F14CD6 /* Frameworks */ = {
247+
isa = PBXGroup;
248+
children = (
249+
);
250+
name = Frameworks;
251+
sourceTree = "<group>";
252+
};
222253
F737BF1E2080F35B00ECCDE3 /* Debug */ = {
223254
isa = PBXGroup;
224255
children = (
@@ -253,6 +284,7 @@
253284
F793CA671F9E474200AA9C41 /* Tests */,
254285
F7DA82F224093AF20095D93F /* Sample */,
255286
F793CA4E1F9E361900AA9C41 /* Products */,
287+
DDD462EC24DB54C600F14CD6 /* Frameworks */,
256288
);
257289
sourceTree = "<group>";
258290
};
@@ -335,15 +367,15 @@
335367
path = Sample;
336368
sourceTree = "<group>";
337369
};
338-
F7EDC62320ADD2110027B771 /* AppLaunch */ = {
370+
F7EDC62320ADD2110027B771 /* Records */ = {
339371
isa = PBXGroup;
340372
children = (
341-
A395FFEF1FD83AB1001D6086 /* FNMAppLaunchRecord.swift */,
342-
F7EDC61D20ADB2670027B771 /* FNMAppLaunchTimestamps.swift */,
343-
A395FFF01FD83AB1001D6086 /* FNMAppLaunchRequestNode.swift */,
344-
F7EDC61B20ADB2670027B771 /* FNMAppLaunchCurrentRunCodableContainer.swift */,
373+
A395FFEF1FD83AB1001D6086 /* FNMRecord.swift */,
374+
F7EDC61D20ADB2670027B771 /* FNMElement.swift */,
375+
A395FFF01FD83AB1001D6086 /* FNMRequestNode.swift */,
376+
F7EDC61B20ADB2670027B771 /* FNMCurrentRunCodableContainer.swift */,
345377
);
346-
path = AppLaunch;
378+
path = Records;
347379
sourceTree = "<group>";
348380
};
349381
F7EDC62420ADD2180027B771 /* RequestRecord */ = {
@@ -412,10 +444,12 @@
412444
F7DA82ED24093AF20095D93F /* Sources */,
413445
F7DA82EE24093AF20095D93F /* Frameworks */,
414446
F7DA82EF24093AF20095D93F /* Resources */,
447+
DDD462F124DB54C600F14CD6 /* Embed Frameworks */,
415448
);
416449
buildRules = (
417450
);
418451
dependencies = (
452+
DDD462F024DB54C600F14CD6 /* PBXTargetDependency */,
419453
);
420454
name = Sample;
421455
productName = Sample;
@@ -514,20 +548,20 @@
514548
A395000D1FD83AB1001D6086 /* FNMAdditions.swift in Sources */,
515549
A3DA63EE201B3637002CB2C0 /* FNMViewController.swift in Sources */,
516550
4055D74F21BFBDDE0058EC1D /* FNMNetworkMonitorURLProtocol+Protocols.swift in Sources */,
517-
A39500041FD83AB1001D6086 /* FNMAppLaunchRecord.swift in Sources */,
551+
A39500041FD83AB1001D6086 /* FNMRecord.swift in Sources */,
518552
F737BF262080FC9100ECCDE3 /* FNMProfile.swift in Sources */,
519553
F7FA58A82084A5E700CEFB88 /* FNMProfile+Codable.swift in Sources */,
520554
F737BF222080F9B700ECCDE3 /* FNMHTTPRequestRecord+Codable.swift in Sources */,
521555
F737BF202080F97D00ECCDE3 /* FNMHTTPRequestRecord.swift in Sources */,
522556
A3391C841FE2837B00BBBC18 /* FNMDebugDetailInfoTableViewCell.swift in Sources */,
523-
F7EDC62220ADB2670027B771 /* FNMAppLaunchTimestamps.swift in Sources */,
524-
A39500051FD83AB1001D6086 /* FNMAppLaunchRequestNode.swift in Sources */,
557+
F7EDC62220ADB2670027B771 /* FNMElement.swift in Sources */,
558+
A39500051FD83AB1001D6086 /* FNMRequestNode.swift in Sources */,
525559
A39500011FD83AB1001D6086 /* FNMRecordExporter.swift in Sources */,
526560
A39500101FD84F96001D6086 /* FNMDebugSummaryTableViewCell.swift in Sources */,
527561
433A1A0C2355DAA000CB0A8D /* DebugDetailHeadersViewController.swift in Sources */,
528562
A395FFFD1FD83AB1001D6086 /* FNMNetworkMonitorURLProtocol.swift in Sources */,
529563
A3391C821FE27F8200BBBC18 /* FNMDebugDetailViewController.swift in Sources */,
530-
F7EDC62020ADB2670027B771 /* FNMAppLaunchCurrentRunCodableContainer.swift in Sources */,
564+
F7EDC62020ADB2670027B771 /* FNMCurrentRunCodableContainer.swift in Sources */,
531565
A395000C1FD83AB1001D6086 /* FNMNetworkMonitor.swift in Sources */,
532566
A39500031FD83AB1001D6086 /* FNMDebugListingViewController.swift in Sources */,
533567
F7BD0C5B20A4A3F900B1E3EA /* FNMLogger.swift in Sources */,
@@ -563,6 +597,11 @@
563597
/* End PBXSourcesBuildPhase section */
564598

565599
/* Begin PBXTargetDependency section */
600+
DDD462F024DB54C600F14CD6 /* PBXTargetDependency */ = {
601+
isa = PBXTargetDependency;
602+
target = F793CA4C1F9E361900AA9C41 /* FNMNetworkMonitor */;
603+
targetProxy = DDD462EF24DB54C600F14CD6 /* PBXContainerItemProxy */;
604+
};
566605
F793CA6D1F9E474200AA9C41 /* PBXTargetDependency */ = {
567606
isa = PBXTargetDependency;
568607
target = F793CA4C1F9E361900AA9C41 /* FNMNetworkMonitor */;

NetworkMonitor/Classes/Exporter/FNMRecordExporter.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct FNMRecordExporter {
4141
}
4242
}
4343

44-
static func exportAppLaunchRecord(_ appLaunchRecord: FNMAppLaunchRecord,
44+
static func exportRecord(_ record: FNMRecord,
4545
requestRecords: [FNMHTTPRequestRecord]) {
4646

4747
DispatchQueue.global().async {
@@ -51,7 +51,7 @@ struct FNMRecordExporter {
5151
// Current run
5252
let currentRunConfigurationFilenameURL = try self.currentRunConfigurationFilenameURL()
5353

54-
let currentRunSerializableObject = FNMAppLaunchCurrentRunCodableContainer(appLaunchRecord: appLaunchRecord,
54+
let currentRunSerializableObject = FNMCurrentRunCodableContainer(record: record,
5555
requestRecords: requestRecords)
5656
try self.encodeObject(currentRunSerializableObject,
5757
fileUrl: currentRunConfigurationFilenameURL)
@@ -122,8 +122,8 @@ extension FNMRecordExporter {
122122

123123
var path = try self.baseFolder(title: title)
124124

125-
path.appendPathComponent(Constants.exportAppLaunchGeneralFolderPath)
126-
path.appendPathComponent(Constants.exportAppLaunchCurrentRunFolderPath)
125+
path.appendPathComponent(Constants.exportGeneralFolderPath)
126+
path.appendPathComponent(Constants.exportCurrentRunFolderPath)
127127

128128
return path
129129
}
@@ -133,7 +133,7 @@ extension FNMRecordExporter {
133133

134134
var filePath = path
135135

136-
filePath.appendPathComponent(Constants.exportAppLaunchCurrentRunFilename + Constants.exportFileExtension)
136+
filePath.appendPathComponent(Constants.exportCurrentRunFilename + Constants.exportFileExtension)
137137

138138
return filePath
139139
}
@@ -208,10 +208,10 @@ private extension FNMRecordExporter {
208208
private enum Constants {
209209

210210
static let exportMonitorGeneralFolderPath = "NetworkMonitor"
211-
static let exportAppLaunchGeneralFolderPath = "AppLaunch"
212-
static let exportAppLaunchCurrentRunFolderPath = "CurrentRun"
211+
static let exportGeneralFolderPath = "AppLaunch"
212+
static let exportCurrentRunFolderPath = "CurrentRun"
213213
static let exportRecordsGeneralFolderPath = "Records"
214-
static let exportAppLaunchCurrentRunFilename = "configuration"
214+
static let exportCurrentRunFilename = "configuration"
215215
static let exportRecordsSimpleFilename = "records"
216216
static let exportFileExtension = ".json"
217217
static let exportFileSeparator = "-"

0 commit comments

Comments
 (0)