草庐IT

apple_push_notification_options

全部标签

iOS推送通知: How does an app get notified about a push notification,处于事件状态时?

我有一个应用程序在事件状态下运行。突然收到推送通知,应用程序如何收到通知,如何处理? 最佳答案 您可以在appledocumentation中阅读相关内容.您需要在AppDelegate中使用didReceiveNotificationRequest:withContentHandler:。之后,您可以向用户显示通知。如果您想在事件状态下显示通知,您可以在应用程序中显示警报或使用系统横幅。 关于iOS推送通知:Howdoesanappgetnotifiedaboutapushnotifi

ios - 错误域=com.apple.healthkit 代码=5

HKSampleType*stepType=[HKQuantityTypequantityTypeForIdentifier:HKQuantityTypeIdentifierStepCount];当我想要这些步骤时,它起作用了;我想要DistanceWalkingRunning或ExerciseTime,xcode会显示下一条消息。ErrorDomain=com.apple.healthkitCode=5“AuthorizationnotdeterminedUserInfo={NSLocalizedDescription=Authorizationnotdetermined}”HKSa

ios - 无法将类型 'Swift.Optional<Swift.AnyObject>' (0x7f9d44715db0) 的值转换为 'NSArray' (0x60000004f4f8)

我正在尝试检查responseObject!=nil但它始终返回true。我不知道(如何检查ANY的nil值?)这是我的代码:success:{(operation:AFHTTPRequestOperation?,responseObject:Any?)inprint("viewservicereponse:\(String(describing:responseObject))")print("viewservicereponse:\(responseObject!)")ifresponseObject!=nil{letjsonObjects:NSArray=responseObje

ios - 需要帮助解决 Apple 崩溃报告

Apple阻止了我的应用程序,因为“它在启动时崩溃”但实际上正在进行内部测试,因为几个星期和3(包括我在内)正在测试相同的构建并且它工作正常......所以我无法理解这是怎么回事...有人可以这么温柔地帮助我翻译Apple发给我的崩溃日志吗?谢谢!PS:由于“bodylimitedto30000characters”,我不得不在最后删减了一小部分{"app_name":"ARMeter","timestamp":"2017-09-0118:06:11.90-0700","app_version":"1.0","slice_uuid":"6a8afc68-3287-3de8-89a4-b

ios - 从 Apple 服务器获取空白响应订阅状态 URL IAP,状态更新通知,statusUpdateNotification

状态更新通知,statusUpdateNotification我在iTunes帐户的应用程序中设置订阅状态URL,如https://www.xxxxxx.xx/iospushnotification.php我还成功测试了nscurl--ats-diagnosticshttps://www.xxxxxx.xx/iospushnotification.php我还在iospushnotification.php文件中实现了php代码来获取JSON响应我成功购买了自动续订订阅沙盒,但我没有收到任何状态更新通知我收到从苹果服务器到我的服务器的空白[]JSON响应。https://develope

iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications

我有很多用户提示说,当他们从iOS10.3.3迁移到昨天发布的iOS11时,他们停止接收静默推送通知。需要注意的是,如果我已经要求用户注册推送通知,我在NSUSerDefaults中有一个设置。我这样做:[[UIApplicationsharedApplication]registerUserNotificationSettings:settings];仅当用户之前没有被询问过。现在,如果用户在使用iOS10.3.3时已经注册了通知,并升级到iOS11,代码registerUserNotificationSettings:settings将永远不会被调用,直到他重新安装。这可能是个问题

ios - 提交 App Store 后出现无效二进制错误(捆绑使用与 Apple 应用关联的捆绑名称或显示名称)

我们尝试向iTunesConnect提交新构建以更新现有应用程序。这是一个用于修复一个服务器url的快速补丁。我们更改了两个文件:REST.plist用于更新一个服务器url和app_info.plist用于将bundleShoreVersionString从4.0.0更新到4.0.1以及BundleVersion从4000000更新到4000001。三周前提交的4.0.0版本没有任何问题。但是,我们因4.0.1版本的无效二进制文件而被拒绝,并向我们发送了以下电子邮件:Deardeveloper,Wehavediscoveredoneormoreissueswithyourrecent

ios - 如何在 Swift 中将文件写入位于 Apple 的文件应用程序中的文件夹

我的Xcode项目中有一个XML文件,我试图先将它保存到磁盘,然后如何判断我是否已成功保存它?这是正确的方法吗?使用模拟器,我导航到iOS11中的新"file"文件夹,但我没有看到它,但我不确定它是否应该在那里?guardletpath=Bundle.main.url(forResource:"sample",withExtension:"xml")else{print("NOURL");return}letsample=try?Data(contentsOf:path)print("sampleXML=\(String(describing:sample?.debugDescript

ios - fatal error : unexpectedly found nil while unwrapping an Optional value in inheriting class

我创建了一个CustomTopTabbarController来自定义标签栏。@objcMemberspublicclassCustomTopTabbarController:UITabBarController{@IBOutletweakvarcustomBar:UITabBar!publicoverridefuncviewDidLoad(){super.viewDidLoad()customBar.frame=CGRect(x:0,y:0,width:customBar.frame.size.width,height:customBar.frame.size.height)}pub

ios - Apple Watch 套件在启动时加载数据

如何在AppleWatch上快速加载数据?从watchOS2开始,UserDefaults不工作了,所以我们只能使用WCSessionDelegate,对吧?现在,在WatchApp启动时我调用wcSession?.sendMessage(someThing,replyHandler:someFunc,errorHandler:otherFunc),然后在iPhone应用程序中我发回一些数据funcsession(_session:WCSession,didReceiveMessagemessage:[String:Any],replyHandler:@escaping([String