objective-c
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Objective-C assistance covering message passing, runtime dynamic method resolution, ARC, and Foundation/Cocoa. Use when maintaining Apple legacy codebases, developing native iOS/macOS frameworks, or C++ interop.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- testdino-hq/google-styleguides-skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- testdino-hq/google-styleguides-skills★ 15same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 95
Use the weakSelf / strongSelf dance in completion blocks:
- Very specific: line 110
Add Nullability Annotations (_Nonnull, _Nullable): Ensure smooth, idiomatic bridging into modern Swift codebases.
- Very specific: line 111
Use Weak References for Delegates: Mark all delegate properties as weak to eliminate memory retain cycles.
- Very specific: line 112
Use Objective-C Generics: Parameterize collections (NSArray<NSString *> *) for compile-time type safety.
- Distinctive: line 117
Start new greenfield Apple applications in Objective-C: Build all new iOS/macOS applications in Swift and SwiftUI.
- Very specific: line 119
Use manual retain/release (MRR): Ensure modern ARC (-fobjc-arc) is enabled across all targets.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Objective-C
Objective-C is in maintenance mode. New features are rare, but it powers the Apple ecosystem's foundation. It allows mixing C++ (.mm) loosely.
When to Use
- Legacy iOS and macOS Codebase Maintenance: Maintaining established Apple applications built before Swift.
- C/C++ and Swift Bridging (Objective-C++): Acting as a high-performance interoperability bridge between native C++ engines and modern Swift.
- Dynamic Runtime Introspection: Leveraging the dynamic Objective-C runtime for method swizzling and dynamic message forwarding.
- High-Performance Audio & Core Audio Frameworks: Interfacing with low-level Apple media frameworks where C pointer interop is required.
Quick Start
#import <Foundation/Foundation.h>
@interface Person : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, assign) NSInteger age;
- (void)sayHello;
@end
@implementation Person
- (void)sayHello {
NSLog(@"Hello, my name is %@", self.name);
}
@endCore Concepts
Dynamic Message Passing ([receiver message])
Method calls in Objective-C are dynamic messages resolved at runtime via objc_msgSend:
#import <Foundation/Foundation.h>
@interface OrderService : NSObject
- (BOOL)processPayment:(double)amount forCustomer:(NSString *)customer;
@end
@implementation OrderService
- (BOOL)processPayment:(double)amount forCustomer:(NSString *)customer {
NSLog(@"Charging %@: $%.2f", customer, amount);
return amount > 0.0;
}
@end
// Invocation syntax
OrderService *service = [[OrderService alloc] init];
[service processPayment:150.0 forCustomer:@"Alice"];Automatic Reference Counting (ARC) & Nullability Annotations
Manages object memory automatically at compile time with strong/weak ownership semantics:
@property (nonatomic, strong) NSString *accountNumber;
@property (nonatomic, weak) id<OrderDelegate> delegate; // Prevents retain cycles
@property (nonatomic, copy) void (^completionHandler)(BOOL success);Objective-C++ (.mm) Bridging
Seamlessly mixes C++ standard library types with Cocoa objects in the same file:
// ProcessorBridge.mm (Objective-C++)
#include <vector>
#import "ProcessorBridge.h"
@implementation ProcessorBridge {
std::vector<double> _signalBuffer;
}
- (void)addSample:(double)sample {
_signalBuffer.push_back(sample);
}
@endCommon Patterns
Safe Block Self-Capture to Prevent Retain Cycles
Problem: Strong reference cycles in asynchronous blocks cause permanent memory leaks under ARC.
Solution:
Use the weakSelf / strongSelf dance in completion blocks:
__weak typeof(self) weakSelf = self;
[self.networkClient fetchProfileWithCompletion:^(NSDictionary *data) {
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) return;
[strongSelf updateUIWithData:data];
}];Best Practices
Do:
- Add Nullability Annotations (
_Nonnull,_Nullable): Ensure smooth, idiomatic bridging into modern Swift codebases. - Use Weak References for Delegates: Mark all delegate properties as
weakto eliminate memory retain cycles. - Use Objective-C Generics: Parameterize collections (
NSArray<NSString *> *) for compile-time type safety. - Wrap Bridged Code with Modern Swift Interfaces: Plan incremental migrations by creating Swift wrapper classes.
Don't:
- Start new greenfield Apple applications in Objective-C: Build all new iOS/macOS applications in Swift and SwiftUI.
- Invoke methods on deallocated objects without weak-strong dancing: Use
__weak typeof(self) weakSelf = self;in asynchronous blocks. - Use manual retain/release (MRR): Ensure modern ARC (
-fobjc-arc) is enabled across all targets.
Troubleshooting
| Error | Cause | Solution |
unrecognized selector sent to instance ... | Invoking a method not implemented by the receiving object. | Verify method name and colons (e.g. doAction: vs doAction), or check with respondsToSelector:. |
EXC_BAD_ACCESS (code=1, address=...) | Dereferencing deallocated memory or zombie object. | Enable Zombie Objects in Xcode scheme diagnostics to locate deallocated reference. |
Property with 'copy' attribute is not copied | Custom setter failed to call [newValue copy]. | Implement custom setters using _prop = [newValue copy];. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

