| name | Objective-C |
| description | Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow). |
| version | 1.0.0 |
| category | languages |
| author | Rulebook |
| tags | ["languages","language"] |
| dependencies | [] |
| conflicts | [] |
Objective-C Project Rules
Agent Automation Commands
CRITICAL: Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
xcodebuild clean build
xcodebuild test -scheme YourScheme
Objective-C Configuration
CRITICAL: Use Modern Objective-C with ARC and strict warnings.
- Version: Xcode 15+
- ARC: Automatic Reference Counting required
- Formatter: clang-format
- Testing: XCTest
- Analyzer: clang static analyzer
Code Quality Standards
Mandatory Quality Checks
IMPORTANT: These commands MUST match your GitHub Actions workflows!
clang-format --dry-run --Werror **/*.{h,m}
xcodebuild analyze -scheme YourScheme -sdk iphonesimulator
xcodebuild build -scheme YourScheme -sdk iphonesimulator \
ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
xcodebuild test -scheme YourScheme -sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15'
Why This Matters:
- Example: Using
clang-format -i locally but --dry-run in CI = failure
Testing Example (XCTest)
@import XCTest;
#import "DataProcessor.h"
@interface DataProcessorTests : XCTestCase
@property (nonatomic, strong) DataProcessor *processor;
@end
@implementation DataProcessorTests
- (void)setUp {
[super setUp];
self.processor = [[DataProcessor alloc] initWithThreshold:0.5];
}
- (void)testProcessValidInput {
NSArray *input = @[@1, @2, @3];
NSArray *result = [self.processor process:input];
XCTAssertNotNil(result);
XCTAssertGreaterThan(result.count, 0);
}
- (void)testProcessHandlesNil {
XCTAssertThrows([self.processor process:nil]);
}
@end