diff --git a/include/library/Crunchbutton/Message/Push/Ios.php b/include/library/Crunchbutton/Message/Push/Ios.php index db58c876a..eccc9e764 100644 --- a/include/library/Crunchbutton/Message/Push/Ios.php +++ b/include/library/Crunchbutton/Message/Push/Ios.php @@ -28,6 +28,8 @@ class Crunchbutton_Message_Push_Ios extends Crunchbutton_Message { $category = $to['category']; } + $env = $to['env'] ? $to['env'] : c::getEnv(); + $to = $to['to']; } @@ -41,12 +43,10 @@ class Crunchbutton_Message_Push_Ios extends Crunchbutton_Message { $message = trim($message); - $env = c::getEnv(); - $certs = c::config()->dirs->root.'ssl/'; // @todo: change this after aproved - if (1==2 && $env == 'live') { + if ($env == 'live') { $push = new ApnsPHP_Push( ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION, $certs.'aps_production_com.crunchbutton.cockpit.pem'