Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在发出服务器请求时附加一个唯一的 ID 以避免重复请求。
只需使用此代码创建唯一 ID,在点击服务时使用每个项目。
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); NSString *uuidString = (__bridge NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); NSLog(@"Uni ID %@",uuidString);