Skip to content

Objective-C's lightweight generics let you specify element types for collections like NSArray<NSString *>. They catch type mismatches at compile time and improve Swift bridging.

License

Notifications You must be signed in to change notification settings

BleepingSwift/lightweight-generics-objc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightweightGenericsObjc

Sample Objective-C code demonstrating Objective-C's lightweight generics let you specify element types for collections like NSArray<NSString *>. They catch type mismatches at compile time and improve Swift bridging..

This project accompanies the article: Lightweight Generics in Objective-C

Requirements

  • Xcode 26.2+
  • iOS 26.0+

Getting Started

  1. Clone this repository
  2. Run xcodegen generate (requires XcodeGen)
  3. Open LightweightGenericsObjc.xcodeproj
  4. Build and run

What's Included

  • main.m: Source file
  • AppDelegate.h: Source file
  • AppDelegate.m: Source file
  • Stack.h: Source file
  • Stack.m: Source file
  • User.h: Source file
  • User.m: Source file
  • UserManager.h: Source file
  • UserManager.m: Source file
  • DemoResult.h: Source file
  • DemoResult.m: Source file
  • ViewController.h: Source file
  • ViewController.m: Source file

Language

This project is written in Objective-C to demonstrate traditional iOS development patterns.

Learn More

Read the full article at BleepingSwift for detailed explanations and additional examples.

License

MIT License - see LICENSE for details.

About

Objective-C's lightweight generics let you specify element types for collections like NSArray<NSString *>. They catch type mismatches at compile time and improve Swift bridging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors