iOS Question Silent Push Notifications

Discussion in 'iOS Questions' started by iCAB, Jan 3, 2018.

  1. iCAB

    iCAB Well-Known Member Licensed User

    Hi Erel,

    Sorry if the thread is too long, but I tried to give as much details as possible so I am not leaving anything out.
    I am receiving the silent notifications for 10-15 seconds only after the app is sent to the background and then they stop coming.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Make sure to run your app in release mode and don't kill it with a swipe.

    Test it after 30+ minutes.
     
  3. iCAB

    iCAB Well-Known Member Licensed User

    Hi Erel

    Somehow I can't get this to work. Can you please let me know if there is anything more than this to get it going.

    B4J Code

    Code:
    #if NORMAL_PUSH_CODE 'This code works perfect for normal push
        Dim iosalert As Map =  CreateMap("title": "", "body": "open the message", "sound": "default")
        m.Put("notification", iosalert)
        
        m.Put("priority", 10)
        m.Put("time_to_live": 0)
    '    m.Put("priority": "high")
    #Else
        m.Put("priority", 10)
        m.Put("content_available", True)
    #end if
    B4I code
    Is there any difference between normal and silent other than this line

    Code:
    #PlistExtra: <key>UIBackgroundModes</key><array><string>remote-notification</string></array>

    I should say, that I do receive one or two messages in the background then everything stops.

    I have also noticed that sometimes I see the following output with iRelease logger

    Code:
    +[CATransaction synchronize] called within transaction
    +[CATransaction synchronize] called within transaction
    +[CATransaction synchronize] called within transaction
    +[CATransaction synchronize] called within transaction
    Thanks in advance
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    The logs do not look relevant.

    Your code looks correct. I guess that Application_RemoteNotification is not raised, right?
     
  5. iCAB

    iCAB Well-Known Member Licensed User

    Hi Erel, sorry for the late reply, but somehow I didn't see your reply until today

    Correct, it is not raised
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    iCAB likes this.
  7. iCAB

    iCAB Well-Known Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice