Objective-C overlay for the Encore iOS SDK. Thin wrapper — zero business logic, only @objc-compatible types bridged over EncoreKit.
Add to your Podfile:
pod 'EncoreObjC', '~> 0.1'Then pod install. CocoaPods will transitively pull EncoreKit at the exact version this bridge was built against (see config/sdk-versions.json).
#import <EncoreObjC/EncoreObjC.h>
// In AppDelegate didFinishLaunching:
EncoreOptions *opts = [EncoreOptions new];
opts.logLevel = EncoreLogLevelInfo;
opts.unlockMode = EncoreUnlockModeOptimistic;
[[EncoreClient shared] configureWithApiKey:@"pk_live_…" options:opts];
// After auth:
EncoreUserAttributes *attrs = [EncoreUserAttributes new];
attrs.email = currentUser.email;
[[EncoreClient shared] identifyWithUserId:currentUser.id attributes:attrs];
// Show a placement:
[[[EncoreClient shared] placement:@"paywall_abandon"]
showWithCompletion:^(EncorePresentationResult *result, NSError *error) {
if (error) { NSLog(@"[Encore] error: %@", error); return; }
if (result.kind == EncorePresentationKindGranted) {
// extend subscription, apply credit, etc.
}
}];See docs/ARCHITECTURE.md for the full Swift→Obj-C mapping. Swift-only APIs (Combine.AnyPublisher, EncoreDelegate) are intentionally not exposed — callers wanting those should use EncoreKit directly from Swift.
| EncoreObjC | EncoreKit | iOS |
|---|---|---|
0.1.x |
1.4.42 |
15+ |
See docs/runbooks/local-development.md.
MIT — see LICENSE.