From 98597c69033c16714900f74cab3fcacd3670e746 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 20 Oct 2023 22:50:33 -0700 Subject: [PATCH] update README for new API --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3730201..03c2bce 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,14 @@ const objc = @import("objc"); pub fn macosVersionAtLeast(major: i64, minor: i64, patch: i64) bool { /// Get the objc class from the runtime - const NSProcessInfo = objc.Class.getClass("NSProcessInfo").?; + const NSProcessInfo = objc.getClass("NSProcessInfo").?; /// Call a class method with no arguments that returns another objc object. - const info = NSProcessInfo.msgSend(objc.Object, objc.sel("processInfo"), .{}); + const info = NSProcessInfo.msgSend(objc.Object, "processInfo", .{}); /// Call an instance method that returns a boolean and takes a single /// argument. - return info.msgSend(bool, objc.sel("isOperatingSystemAtLeastVersion:"), .{ + return info.msgSend(bool, "isOperatingSystemAtLeastVersion:", .{ NSOperatingSystemVersion{ .major = major, .minor = minor, .patch = patch }, }); }