{"id":15286864,"url":"https://github.com/nzrsky/odstringify","last_synced_at":"2025-07-24T17:31:04.492Z","repository":{"id":62449272,"uuid":"61157253","full_name":"nzrsky/ODStringify","owner":"nzrsky","description":"Stringify ObjC variables. Safely 🈯️","archived":false,"fork":false,"pushed_at":"2024-10-10T16:57:41.000Z","size":524,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-01T01:06:51.926Z","etag":null,"topics":["cocoa","cocoapods","ios","macos","objc","objective-c","osx","runtime"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nzrsky.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-14T21:34:50.000Z","updated_at":"2024-10-10T16:57:45.000Z","dependencies_parsed_at":"2022-11-01T23:17:47.943Z","dependency_job_id":null,"html_url":"https://github.com/nzrsky/ODStringify","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2FODStringify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2FODStringify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2FODStringify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nzrsky%2FODStringify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nzrsky","download_url":"https://codeload.github.com/nzrsky/ODStringify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227463847,"owners_count":17778465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoa","cocoapods","ios","macos","objc","objective-c","osx","runtime"],"created_at":"2024-09-30T15:18:47.138Z","updated_at":"2024-12-01T01:06:59.615Z","avatar_url":"https://github.com/nzrsky.png","language":"Objective-C","readme":"# ODStringify\n\n[![Build Status](https://app.travis-ci.com/nzrsky/ODStringify.svg?branch=master)](https://app.travis-ci.com/nzrsky/ODStringify)\n[![codecov.io](https://codecov.io/github/nzrsky/ODStringify/coverage.svg?branch=master)](https://codecov.io/github/nzrsky/ODStringify?branch=master)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/ODStringify)](https://cocoapods.org/pods/ODStringify)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Platform](https://img.shields.io/cocoapods/p/ODStringify?style=flat)](http://cocoadocs.org/docsets/ODStringify)\n[![Twitter](https://img.shields.io/badge/twitter-@nzrsky-blue.svg?style=flat)](http://twitter.com/nzrsky)\n\n## Usage\n\nWith ODStringify, you can create strings from classes, properties, defines, and functions using one function—safely.\nAnd everything is done at compile time.\nNo more runtime overhead and calls like `NSStringFromClass` (although for this function, it was very small).\n\nFirst of all, you can create strings from defined values. It's amazing. For example:\n\n```objective-c\n#define MAX_NUMBER_OF_SOMETHING 10\n#define DEFAULT_HI_STRING @\"hello\"\n\nNSLog(@\"Hi string:%@\", ODStringify(DEFAULT_HI_STRING)); // \u003e @\"hello\" (@\"@\\\"hello\\\"\")\nNSLog(@\"Max number:%@\", ODStringify(MAX_NUMBER_OF_SOMETHING)); // \u003e 10 (@\"10\")\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/nzrsky/ODStringify/blob/master/assets/1.png?raw=true\" alt=\"ODStringify\"\u003e\n\u003c/p\u003e\n\n### ODStringifyClass\n\nClass name string with compile-time type checking.\n\n```objective-c\nNSLog(@\"Valid class:%@\", ODStringifyClass(AppDelegate)); // AppDelegate\nNSLog(@\"Invalid class:%@\", ODStringifyClass(App_Delegate)); // Error\n```\n\n### ODStringifyProtocol\n\nProtocol name string with compile-time type checking.\n\n```objective-c\nNSLog(@\"Valid protocol:%@\", ODStringifyProtocol(NSCopying)); // NSCopying\nNSLog(@\"Invalid protocol:%@\", ODStringifyProtocol(NSCopiing)); // Error\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/nzrsky/ODStringify/blob/master/assets/2.png?raw=true\" alt=\"ODStringify\"\u003e\n\u003c/p\u003e\n\n### ODStringifyProperty\n\nPretty much the same thing for properties.\n\n**Note:** You need to be inside a class implementation (and have access to `self`).\n\n```objective-c\n// AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n    NSLog(@\"Valid property:%@\", ODStringifyProperty(window)); // window\n    NSLog(@\"Invalid property:%@\", ODStringifyProperty(window_)); // Error\n    return YES;\n}\n```\n\n## Installation\n\nODStringify supports multiple methods for installing the library in a project.\n\n### Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C and Swift, which automates and simplifies the process of using third-party libraries like ODStringify in your projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n#### Podfile\n\nTo integrate ODStringify into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '12.0'\n\ntarget 'TargetName' do\n  pod 'ODStringify'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Installation with Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following commands:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate ODStringify into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"nzrsky/ODStringify\" ~\u003e 1.1\n```\n\nRun `carthage` to build the framework and drag the built `ODStringify.framework` into your Xcode project.\n\n## Author\n\nAlexey Nazarov, alexx.nazaroff@gmail.com\n\n## License\n\nODStringify is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzrsky%2Fodstringify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnzrsky%2Fodstringify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnzrsky%2Fodstringify/lists"}