Objective c 找不到id类型的对象
我正在绑定自己的应用程序,当我绑定构建应用程序时,我有一个错误:Objective c 找不到id类型的对象,objective-c,snapchat,Objective C,Snapchat,我正在绑定自己的应用程序,当我绑定构建应用程序时,我有一个错误: Severity Code Description Project File Line Suppression State Error property 'timeIntervalSince1970' not found on object of type 'id' SnapchatHax (SnapchatHax\SnapchatHax) C:\re\SnapchatHax-maste
Severity Code Description Project File Line Suppression State
Error property 'timeIntervalSince1970' not found on object of type 'id' SnapchatHax (SnapchatHax\SnapchatHax) C:\re\SnapchatHax-master\SnapchatHax\Snapchat\Internal\SCAPIRequest.m 14
以下是出现错误的代码:
// SCAPIRequest.m
// SnapchatHax
//
// Created by Alex Nichol on 12/17/13.
// Copyright (c) 2013 Alex Nichol. All rights reserved.
//
#import "SCAPIRequest.h"
@implementation SCAPIRequest
+ (NSString *)timestampString {\
NSTimeInterval time = [NSDate date].timeIntervalSince1970;
return [NSString stringWithFormat:@"%llu", (unsigned long long)round(time * 1000.0)];
}
谢谢大家原因是
[NSDate date]
正在返回NSDate类型的对象,并且您已直接从该对象访问了不同类型的timeIntervalSince1970。
使用
希望你的问题能得到解决
谢谢+(NSString*)timestampString{\
NSTimeInterval value = ((NStimeInterval*)[anArray objectAtIndex:0]).aVariable;