Git Product home page Git Product logo

Comments (5)

ShVitaliy avatar ShVitaliy commented on July 4, 2024

Sorry it was my fault, mistake in logic. Library works fine both in android and ios

from laravel-fcm.

Abdulhmid avatar Abdulhmid commented on July 4, 2024

can you share your code send push notif to IOS platform,
i have follow instruction from documentation, and after i log downStreamResponse, i'm get response succes, but on my IOS developer say not received Push Notif has i'm send,
thanks before

from laravel-fcm.

keyurgwebplanex avatar keyurgwebplanex commented on July 4, 2024

I faced the same problem.
Can you please tell me how to send notifications in IOS?

from laravel-fcm.

ShVitaliy avatar ShVitaliy commented on July 4, 2024

unfortunatly, i haven't the source code of that project already. but, as i told before, the code was the same, as for android.

if you faced with troubles, you can easily send messages via curl, or write your own wrapper around it.
if you didn't tried yet, the simpliest curl code example is so:

`
$url = 'https://fcm.googleapis.com/fcm/send';

            $fields = [
            'registration_ids' => [
                $this->push_token
            ],
            'notification' => ['body' => $message, 'title' => $title, 'sound' => $sound, 'badge' => $badge],
            'priority' => 10
        ];
        $fields = json_encode ( $fields );
        $headers = [
            'Authorization: key=' . env('FCM_SERVER_KEY'),
            'Content-Type: application/json'
        ];

        $ch = curl_init();
        curl_setopt( $ch, CURLOPT_URL, $url );
        curl_setopt( $ch, CURLOPT_POST, true );
        curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
        curl_setopt( $ch, CURLOPT_POSTFIELDS, $fields );

        $out = curl_exec( $ch );
        curl_close( $ch );
        Log::info('FCM answer: ' . $out);

`
library examples you can find in documentation. Hope, it will help

from laravel-fcm.

tamirkonor avatar tamirkonor commented on July 4, 2024

Is the library working for ios >11
the server is using the library and push arrives on Android, not on ios when sending from the fcm console the push arrives.
the apps are in ionic but again it is received when sent from the fcm console.

from laravel-fcm.

Related Issues (20)

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.