GithubHelp home page GithubHelp logo

请问一下为什么ios有时候收不到消息,使用透传方式,即使收到也是弹窗,而不是通知栏信息 about getui HOT 11 CLOSED

cncal avatar cncal commented on July 18, 2024
请问一下为什么ios有时候收不到消息,使用透传方式,即使收到也是弹窗,而不是通知栏信息

from getui.

Comments (11)

cncal avatar cncal commented on July 18, 2024

这只是 server 端的代码,推送成功还需要 client 端的支持。我现在手头没有现成的 ios app,所以没法帮你测试到底是什么问题,很抱歉!

from getui.

zotopteam avatar zotopteam commented on July 18, 2024

首先感谢你的回复,然后问一下,ios推送你的这个包是可以支持的对吗,可以推送到通知栏?

from getui.

cncal avatar cncal commented on July 18, 2024

对的,之前也有朋友推送成功了的,我看到个推的 ios client 端 sdk 在上个月做了一次更新,不知道会不会有关系

from getui.

zotopteam avatar zotopteam commented on July 18, 2024

这样啊,那我们再调试一下,还有一点,ios使用透传的时候,需要传递category参数,在你的类(IGtAPNPayload.php)里面有这段

   if ($this->category != null && $this->category != "") {
                $apsMap["category"] = $this->category;
      }

但是前面却没法往里传递这个参数 ,请问我们有什么办法可以传递嘛

from getui.

zotopteam avatar zotopteam commented on July 18, 2024

另外,请问一下,这个有没有交流的QQ群,可以找用过的朋友咨询一下他们的使用经验?

from getui.

cncal avatar cncal commented on July 18, 2024
  • 不好意思,没有交流的QQ群
  • 关于 category,你需要
  1. 在入参 template_data 中添加 key: category 及其对应的 value;
  2. GetuiTemplate.phpIGtTransmissionTemplate 方法中,添加如下代码:
if (isset($sound)) {
     $apn->sound = $sound;
}
//  以下是添加的代码
if (isset($category)) {
    $apn->category= $category;
}
  • 如果就这个功能需要我去做 enhancement,迭代新的版本,请告诉我,我会尽快完成

from getui.

zotopteam avatar zotopteam commented on July 18, 2024

真的非常感谢,这个 $apn->category= $category; 传递是需要的,就是不想直接改源码,所以才问你有没有别的方式可以传递,如果方便,请及时迭代一下

from getui.

cncal avatar cncal commented on July 18, 2024
  • 我已经将版本更新到了 v0.1.1
  • 如果你们发现错误的原因在于此扩展包,请斧正,谢谢

from getui.

zotopteam avatar zotopteam commented on July 18, 2024

好的,谢谢你的帮助!非常感谢!

from getui.

zotopteam avatar zotopteam commented on July 18, 2024

调试安卓和ios均已经能正常发送信息,再次感谢你的帮助!

from getui.

cncal avatar cncal commented on July 18, 2024

那请问之前是因为什么调试失败的呢?以后如果有朋友遇到类似的问题,就有解决的方向了。

from getui.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.