ios - phonegap 推送通知显示 Xcode 中的错误

标签 ios xcode cordova jquery-mobile

所以我将用于推送通知的 phonegap 插件合并到我的 phonegap 应用程序中,但在我的 consol 中收到错误消息说 #import <Cordova/JSONKit.h>错误,无法找到该文件。所以离开这个帖子here我能够解决该错误,但现在它提出了两个附加警告。

NSString* uuid = [[UIDevice currentDevice] uniqueIdentifier]; 已折旧的 uniqueIdentifier


NSString *jsStatement = [NSString stringWithFormat:@"window.plugins.pushNotification.notificationCallback(%@);", [userInfo cdvjk_JSONString]]; 实例方法 -cdvjk JSONString 未找到


有没有人遇到过这个?我正在使用 phonegap 2.4.0

最佳答案

第一个错误是由于 UUID 被弃用,除非您修复该警告,否则您的应用将永远不会被应用商店接受。修复很简单,将 [[UIDevice ...] ...] 替换为:

NSString *uuid = [[ASIdentifierManager sharedManager] advertisingIdentifier]

第二个问题,将cdvjk_JSONString修改为JSONString,下个版本的Cordova/PhoneGap会解决。

关于ios - phonegap 推送通知显示 Xcode 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15667305/

相关文章:

android - Cordova 3.4 和 Android 4.1 上的 Bootstrap 选择问题

iphone - XCODE NSXML更改元素值

android - 无法向 BLE 外设 (ZL-RC04A) 设备发送数据

ios - 无法在 UIView 中将 UITextField 居中

iphone - UIWebView 中横向模式的 Youtube 视频

android - 如何检查cordova/phonegap项目的cordova android版本?

android - Android应用无法播放mp3(本地存储的mp3)

ios - 警告 : itunes store operation failed error (null)

ios - 解析 - 从关系中获取对象

ios - 如何使页脚 UITableViewCell 不是静态的?