Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.
/ ModernObjC Public archive

Header-only ObjC modernization pack ๐Ÿ˜Ž

License

Notifications You must be signed in to change notification settings

nzrsky/ModernObjC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ModernObjC

Build Status codecov.io CocoaPods Compatible Carthage compatible Platform Twitter

It adds lets, vars and typed copy/foreach functions for ObjC collections

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

	// Objective-C without types
	NSDictionary *notes = [document fetchNotes];
	printf("%d", [notes[@"default"] words]);

	// Before:
	NSDictionary<NSString*, NSArray<Note*>*> *notes = [document fetchNotes];
	printf("%d", notes[@"default"]);

	NSDictionary<NSString*, NSArray<Note*>*> *notes = [document fetchNotes];
	printf("%d", notes[@"default"]);

Requirements

Installation

ModernObjC is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ModernObjC'

Author

Alexey Nazarov, [email protected]

License

ModernObjC is available under the MIT license. See the LICENSE file for more info.