PhoneGap推送插件未在ioS上注册

PhoneGap推送插件未在ioS上注册,ios,cordova,phonegap-pushplugin,Ios,Cordova,Phonegap Pushplugin,我在phonegap应用程序中使用以下插件。在注册事件中,我没有在ioS版本上获得任何信息。在安卓系统上,它100%工作。我请求帮助,看看我是否遗漏了什么。代码如下。我有证书并启用了推送服务。我创建了一个分发证书,应用程序在苹果商店中。基本上,在启动时,我有一个自调用功能,并通过http将注册发送到我们的服务器,我们没有从ioS获得任何信息。我们使用phonegapbuild构建ioS版本,并通过macincloud.com上传。我在这里读了一些帖子,但没有一篇能解决我的问题 <gap:p

我在phonegap应用程序中使用以下插件。在注册事件中,我没有在ioS版本上获得任何信息。在安卓系统上,它100%工作。我请求帮助,看看我是否遗漏了什么。代码如下。我有证书并启用了推送服务。我创建了一个分发证书,应用程序在苹果商店中。基本上,在启动时,我有一个自调用功能,并通过http将注册发送到我们的服务器,我们没有从ioS获得任何信息。我们使用phonegapbuild构建ioS版本,并通过macincloud.com上传。我在这里读了一些帖子,但没有一篇能解决我的问题

<gap:plugin name="phonegap-plugin-push" source="npm" >
   <param name="SENDER_ID" value="15971xxxxxxx" />
</gap:plugin>
解决

作为更新。结果证明代码没有问题。有两个主要问题

我最终借用了一台mac电脑(来自macincloud),并用它构建了这个项目

phonegap build ios
第一个问题:我犯了这个错误

Build Error
===========
ld: '/Users/user000516/Downloads/my-app - ioS/platforms/ios/samplePush/Plugins/phonegap-plugin-push/GCM/Libraries/libGGLCloudMessaging.a(GGLContext+CloudMessaging.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这意味着推送插件无法在启用位码的情况下编译。我在xCode中禁用了位代码,项目成功构建。我不确定这是否是Phonegap构建失败的原因

第二个问题:我在XCode中做的另一件事是获得“功能”选项卡并启用推送通知功能

在这些更改之后,代码按预期工作


希望这能帮助那些不确定我是否应该编辑我的问题或者提供解决方案作为答案的人

解决

作为更新。结果证明代码没有问题。有两个主要问题

我最终借用了一台mac电脑(来自macincloud),并用它构建了这个项目

phonegap build ios
第一个问题:我犯了这个错误

Build Error
===========
ld: '/Users/user000516/Downloads/my-app - ioS/platforms/ios/samplePush/Plugins/phonegap-plugin-push/GCM/Libraries/libGGLCloudMessaging.a(GGLContext+CloudMessaging.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
构建错误 叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用)

这意味着推送插件无法在启用位码的情况下编译。我在xCode中禁用了位代码,项目成功构建。我不确定这是否是Phonegap构建失败的原因

第二个问题:我在XCode中做的另一件事是获得“功能”选项卡并启用推送通知功能

在这些更改之后,代码按预期工作


希望这对某人有所帮助

嗨!我也有同样的问题。我试图在project.pbxproj文件中禁用位代码,但尚未生效。你还有别的解决办法吗?提前感谢Hi eliangela您是否也在使用phonegap推送插件。你犯了什么错误?是的。我正在使用Phonegap推送插件。但我没有任何错误:(我的iPhone没有注册,也没有返回令牌
ld: '/Users/user000516/Downloads/my-app -          ioS/platforms/ios/samplePush/Plugins/phonegap-plugin-push/GCM/Libraries/libGGLCloudMessaging.a(GGLContext+CloudMessaging.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode   for this target. for architecture arm64