Object used to create a new set of entitlements.

This object is used in the setEntitlements method to grant entitlements to a device. It must be initialized with a valid referenceID that has been defined in the Nami Control Center.

public class NamiEntitlementSetter : NSObject, Codable {
    var expires : Date?
    var referenceID : String
    var platform : String?
    var purchasedSKUid : String?
@interface NamiEntitlementSetter : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull referenceID;
@property (nonatomic, copy) NSString * _Nullable purchasedSKUid;
@property (nonatomic, copy) NSDate * _Nullable expires;
@property (nonatomic) enum NamiPlatformType platform;
data class NamiEntitlementSetter {
  referenceId: String,
  platform: NamiPlatformType,
  purchasedSKUid: String?,
  expires: Date?
NamiEntitlementSetter(String referenceId);
NamiEntitlementSetter(String referenceId, NamiPlatformType type);
NamiEntitlementSetter(String referenceId, NamiPlatformType type, String purchasedSKUid);
NamiEntitlementSetter(String referenceId, NamiPlatformType type, String purchasedSKUid, Date expires);
NamiEntitlementSetter = {
    "expires": Date,
    "referenceID": String,
    "platform": String,
    "purchasedSKUid": String
class NamiEntitlementSetter {
  final String referenceId;
  final NamiPlatformType platform;
  final String? purchasedSKUid;
  final DateTime? expires;

      {required this.referenceId,
      this.platform = NamiPlatformType.other,
interface NamiEntitlementSetter : INativeObject {
  string ReferenceID { get; }
  string PurchasedSKUid { get; set; }
  NSDate Expires { get; set; }
  NamiPlatformType Platform { get; set; }
  IntPtr Constructor (string id);
  IntPtr Constructor (string id, NamiPlatformType platform);
  IntPtr Constructor (string id, NamiPlatformType platform, [NullAllowed] string purchasedSKUid, [NullAllowed] NSDate expires);

Note that parameter names differ slightly by platform.


  • referenceID / referenceId - The id of the entitlement, from the Control Center.
  • expires (optional) - Date object for when the entitlement will expire.
  • platform (optional) - The platform that controls the entitlement.
  • purchasedSKUid (optional) - the id for the NamiSKU that was purchased.