Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core into feature/clientParameter-refactor

This commit is contained in:
Scott Pfeil 2024-02-14 13:56:20 -05:00
commit 94b2f5b1e3
3 changed files with 10 additions and 3 deletions

View File

@ -11,6 +11,10 @@ import Foundation
public extension Date {
static func unixMillisecondsNow() -> Int64 {
return Int64(Self().timeIntervalSince1970 * 1000)
return Self().unixMilliseconds()
}
func unixMilliseconds() -> Int64 {
return Int64(self.timeIntervalSince1970 * 1000)
}
}

View File

@ -758,6 +758,9 @@
// Allows the view controller to handle specific errors (such as ensure it has all the required data).
shouldContinue = [viewController shouldFinishProcessingLoad:loadObject error:&error];
if (error) {
error = [[MVMCoreLoadHandler sharedGlobal] attachLoadInformation:loadObject toError:error];
}
if (!shouldContinue) {
viewController = nil;
}

View File

@ -43,9 +43,9 @@ extension Encodable {
return jsonArray
}
public func toJSONString() -> String? {
public func toJSONString(options: JSONSerialization.WritingOptions = .prettyPrinted) -> String? {
guard let json = self.toJSON(),
let data = try? JSONSerialization.data(withJSONObject: json, options: .prettyPrinted),
let data = try? JSONSerialization.data(withJSONObject: json, options: options),
let string = String(data: data, encoding: .utf8) else {
return nil
}