albaraam / php-gcm-apns Goto Github PK
View Code? Open in Web Editor NEWA PHP Library for sending messages to devices (Android & IOS) through GCM and Apns respectively .
License: MIT License
A PHP Library for sending messages to devices (Android & IOS) through GCM and Apns respectively .
License: MIT License
Well after performing the necessary 'composer require's (which I think I've rarely done before), I uploaded php, restarted apache, and attempted to run... getting error "PHP Fatal error: Uncaught Error: Class 'albaraam\gcmapns\Message' not found in /var/www/html/notifier_basic.php:6\nStack trace:\n#0 {main}\n thrown in /var/www/html/notifier_basic.php on line 6"
PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )
...
When there are no targets in the Android section, I get an albaraam\gcm\exceptions\AuthenticationException: HTTP Authentication Error
.
The backtrace tells me it is at:
albaraam\gcm\GCMClient->send(Object(albaraam\gcm\GCMMessage))
/vendor/albaraam/php-gcm-apns/src/Client.php (90)
I have managed to temporarily fix the issue by changing Client->send()
to check if there is a target before trying to send the message.
if($this->getAndroidClient() && count($message->android->getTo()) > 0) $response['android'] = $this->sendAndroid($message);
if($this->getIOSClient() && count($message->ios->getTo()) > 0) $response['ios'] = $this->sendIOS($message);
Is there a reason such a check is not made that I am not aware of?
hi
im trying to install it but i have this errors
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for albaraam/php-gcm-apns ~1.0.0 -> satisfiable by albaraam/php-gcm-apns[v1.0.0].
- albaraam/php-gcm-apns v1.0.0 requires duccio/apns-php dev-master -> satisfiable by duccio/apns-php[dev-master] but these conflict with your requirements or minimum-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.