草庐IT

Get-AppxPackage

全部标签

ios - CLBeacon : How can I get the distance from the IBeacons?

如何获取iBeacon的距离?我能够获取它们的proximity,但如何获取与CLBeacon的距离?我使用过EstimoteSDK,它给出了距离值,但我不知道如何使用CLBeacon获取它。-(void)locationManager:(CLLocationManager*)managerdidRangeBeacons:(NSArray*)beaconsinRegion:(CLBeaconRegion*)region{if(self.beaconRegion){if([beaconscount]>0){//getclosesbeaconandfinditsmajorCLBeacon*

ios - Swift Vapor 服务器 : how to return nested dictionaries in get request?

我开始在Xcode中使用Vapor来构建一个简单的服务器来支持我的应用程序。我试图了解如何正确构建我可以在get请求中返回的JSON对象。我有以下内容:drop.get{requestinletdate:TimeInterval=Date().timeIntervalSince1970letdictionary:[String:String]=["name":"e2","age":"3"]returntryJSON(node:["time":date,"t1":"abc","t2":dictionary])}这不起作用,它告诉我“参数标签(节点:)不匹配任何可用的重载”如何构建包含字符

iphone - 为什么 get-task-allow 没有显示在我的 Entitlements.plist 文件中?

因此,我正在尝试设置我的第一个ios应用程序以进行临时分配,但我得到了可怕的“无效配置文件:开发人员构建权利必须将get-task-allow设置为true。”错误。因此,在我寻求帮助之前,我在互联网上摸索着试图弄清楚,并想出更改我的“Entitlements.plist”文件并将get-task-allow更改为true。好吧……当我转到xcode4并查看我的“Entitlements.plist”文件时,它不在那里。我尝试添加它,结果出现了。知道我做错了什么以及如何解决这个问题吗?谢谢。 最佳答案 CanBeDebugged键是

ios - Mapkit didSelectAnnotationView : How to get at custom properties?

我试图在用户点击图钉时打开详细ViewController。我还定义了一个自定义注释,我想将它的一些信息传递到详细ViewController中。它看起来像这样:@interfaceSquatAnnotationClass:NSObject{NSString*name;NSString*address;NSString*gendered;NSString*availability;NSString*directions;NSString*commments;CLLocationCoordinate2Dcoordinate;}@property(nonatomic,readonly)CL

iphone - iOS SDK 问题 : how do I cast a UIView to a UIImage View (alternativly how do I get a UIImageView from a GestureRecognzer? )

期望的最终结果:用户点击一个UIImageView并且图像更改为另一个图像(随后的点击将图像返回到原始状态)问题:我将一个(唯一的)选择器添加到一堆UIImageView(在一个数组中)并将操作指向同一个函数-让我们暂时将此函数称为imageTapped:。到目前为止,这是我的代码:-(void)imageTapped:(UITapGestureRecognizer*)tapGesture{UIImageView*view=tapGesture.view;//restofcode...}这段代码实际上工作正常,但在我运行它时收到警告:“不兼容的objective-c类型正在初始化‘st

ios - 如何使用 NSMutableURLRequest 对 GET 请求中的特殊字符进行编码

我将如何为GET请求编码url字符串?我特别遇到了一个问题,即我要发送的字段的值包含一个与号(&),它被解释为字段之间的分隔符。我目前正在按如下方式创建我的请求(实际进行调用的代码取自Apple的MVC网络示例,因此它可能与此问题无关,但为了完整性而包括在内)NSString*urlString=[[NSStringalloc]initWithFormat:@"http://.../?name=%@&nameupdated=%@",name,nameUpdated];NSMutableURLRequest*request;NSString*webStringUrl=[urlString

objective-c - 代码/LLDB : How to get information about an exception that was just thrown?

好的,假设我在objc_exception_throw中的断点刚刚触发。我正坐在调试器提示符下,我想获得有关异常对象的更多信息。我在哪里可以找到它? 最佳答案 异常对象作为第一个参数传入objc_exception_throw。LLDB提供了$arg1..$argn变量来引用正确调用约定中的参数,从而使打印异常详细信息变得简单:(lldb)po$arg1(lldb)po[$arg1name](lldb)po[$arg1reason]确保在执行这些命令之前选择调用堆栈中的objc_exception_throw帧。请参阅WWDC15s

ios - Restkit GET 调用不是异步发送的吗?

我在我的iOS应用程序中使用Restkit对我的服务器进行GET调用。我能够让调用正常工作,除了它应该是异步的并且它阻塞了我的主线程。我基本上使用他们的确切样本从他们的github页面发出请求,如下所示:NSURLRequest*request=[NSURLRequestrequestWithURL:[NSURLURLWithString:@"http://mywebapi.com/Article"]];RKObjectRequestOperation*operation=[[RKObjectRequestOperationalloc]initWithRequest:requestre

ios - viewControllerAfterViewController : does not get called with UIPageViewController

我遇到了UIPageViewController的一个非常奇怪的行为。我正在使用UIPageViewController显示一组ViewController,因此我遵循UIPageViewControllerDataSource协议(protocol),并实现了以下方法:-(UIViewController*)pageViewController:(UIPageViewController*)pageViewControllerviewControllerAfterViewController:(NHBufferRoomViewController*)viewController{NS

iOS 推送通知 : How to get the "Notification identifier" within the delegate

当我通过APNs向我的iOS应用程序发送推送通知时,大多数情况下一切正常。将收到通知,我可以从application:(UIApplication*)applicationdidReceiveRemoteNotification:(NSDictionary*)userInfofetchCompletionHandler:(void(^)(UIBackgroundFetchResult)的userInfo字典中读取负载))completionHandler方法。但是userData不包含NotificationIdentifier,它是自iOS7以来新的NotificationForma