diff --git a/main.swift b/main.swift index d131809..846449f 100644 --- a/main.swift +++ b/main.swift @@ -1,5 +1,5 @@ /* - SidecarPatcher - Version 5 + SidecarPatcher - Version 6 Enabling Sidecar on old Mac (2015 or older) But I don't have Sidecar-unsupported Mac so I don't know it works. @@ -56,7 +56,7 @@ func checkSystem(core: String, code: [PatchCode]) -> [PatchCode]{ } // Check SidecarCore is damaged - for value in code{ + for value in result{ if !core.contains(value.original){ assertionFailure("Not supported SidecarCore! or seems like damaged") } @@ -147,7 +147,7 @@ struct PatchCode{ let fileManager = FileManager() let SidecarCorePath = "/System/Library/PrivateFrameworks/SidecarCore.framework/Versions/A/" let macModel = PatchCode(original: "694d616331332c3100694d616331332c3200694d616331332c3300694d616331342c3100694d616331342c3200694d616331342c3300694d616331342c3400694d616331352c3100694d616331362c3100694d616331362c32004d6163426f6f6b382c31004d6163426f6f6b416972352c31004d6163426f6f6b416972352c32004d6163426f6f6b416972362c31004d6163426f6f6b416972362c32004d6163426f6f6b416972372c31004d6163426f6f6b416972372c32004d6163426f6f6b50726f392c31004d6163426f6f6b50726f392c32004d6163426f6f6b50726f31302c31004d6163426f6f6b50726f31302c32004d6163426f6f6b50726f31312c31004d6163426f6f6b50726f31312c32004d6163426f6f6b50726f31312c33004d6163426f6f6b50726f31312c34004d6163426f6f6b50726f31312c35004d6163426f6f6b50726f31322c31004d61636d696e69362c31004d61636d696e69362c32004d61636d696e69372c31004d616350726f352c31004d616350726f362c31", patched: "694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c30004d6163426f6f6b302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b50726f302c30004d6163426f6f6b50726f302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d61636d696e69302c30004d61636d696e69302c30004d61636d696e69302c30004d616350726f302c30004d616350726f302c30") -let iPadModel = PatchCode(original: "69506164342c310069506164342c320069506164342c330069506164342c340069506164342c350069506164342c360069506164342c370069506164342c380069506164342c390069506164352c310069506164352c320069506164352c330069506164352c340069506164362c31310069506164362c3132", patched: "69506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C300069506164302C30300069506164302C3030") +let iPadModel = PatchCode(original: "69506164342c310069506164342c320069506164342c330069506164342c340069506164342c350069506164342c360069506164342c370069506164342c380069506164342c390069506164352c310069506164352c320069506164352c330069506164352c340069506164362c31310069506164362c3132", patched: "69506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c30300069506164302c3030") let originalCore = importCore(path: SidecarCorePath) // get code let patchToCode = checkSystem(core: originalCore, code: [macModel, iPadModel]) // check availability