简体   繁体   English

C如何打印CFNumberRef

[英]C how to print CFNumberRef

Quick question im wondering how I could print CFNumberRef. 我想知道如何打印CFNumberRef。 Im currently working on a program that comunicate with mobiledevice framework (Apple) that will print the ecid of a iDevice. 我目前正在开发与移动设备框架(Apple)兼容的程序,该程序将打印iDevice的ecid。 And I currently have one problem, I read here link that to get the ECID you have "Call the AMDeviceCopyValue function in the MobileDevice Framework " and after some help here earlier ( link to last post ) now I have one last question, on theiphonewiki it say that "It returns the ECID as a CFNumber(kCFNumberSInt64Type) object. ", and the question I now have is how to a print to the console CFNumber(kCFNumberSInt64Type) object??? 目前,我有一个问题,我在这里阅读了链接 ,以获取具有“在MobileDevice Framework中调用AMDeviceCopyValue函数”的ECID,并且在此之前的一些帮助之后( 链接到上一篇文章 ),现在我在theiphonewiki上有最后一个问题说“它将ECID作为CFNumber(kCFNumberSInt64Type)对象返回。”,我现在遇到的问题是如何打印到控制台CFNumber(kCFNumberSInt64Type)对象??? (im working in c) (我在c中工作)

You can use CFShow() to print core foundation types to the console. 您可以使用CFShow()将核心基础类型打印到控制台。

CFShow(yourCFNumberInstance);

You can also use NSLog() if you want to format things: 如果要格式化内容,也可以使用NSLog()

NSLog(CFSTR("Number is %@"), yourCFNumberInstance);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM