Create a development iOS certificate of type “APNs Development iOS” – this is a certificate used to connect between your entity that sends the push (e.g a php script on a server or some other app) and the APN development (sandbox) gateway that delivers the push to the remove iOS device.

Creating a APMs push certificate is done by following the steps in adding a certificate in the development console, which includes selecting the certificate type, selecting the App ID it should be associated with (e.g. com.naturongo.mypush) downloading the certificate request, double-clicking the request file and using the KeyChain Access application to fill out the request, uploading the resulting file and the signed certificate will be generated.

Click the download button for this certificate – this will download a .cer file to your local drive

Double click this .cer file – this should add it to your keychain via the Keychain Access application

Once you’ve identified it in your Keychain Access application, ctrl-click it and select the export option.

Export it to a .p12 file. You will be requested for a password to be used for accessing the private key in this file – lets suppose the password is “pass”

Once you have the .p12 file on your drive – lets call it cert_push_dev.p12 then convert it to a pem file via:
openssl pkcs12 -in APN_push_dev.p12 -out APN_push_dev.pem -nodes -clcerts

The assumption is that at this point you have the following:

An APN token from an iOS application that registered with an APN Server

The pem file created in the previous step

The password to this pem file

Given all this, you can now use the following php script to send a push notification to the remote iOS device associated with the APN token:

<?php// This is the APN token received by the iOS device when registering with the APN server$deviceToken="aba3213b06b13d33b881058bfe8c88478a1d1d07fbed6d3303afc904fe874e7d";$message='You have recieved new notification!';$ctx=stream_context_create();stream_context_set_option($ctx,'ssl','local_cert','APN_push_dev.pem');stream_context_set_option($ctx,'ssl','passphrase','pass');// Open a connection to the APNS server//$APNS = 'ssl://gateway.push.apple.com:2195'; // production server$APNS='ssl://gateway.sandbox.push.apple.com:2195';// development$fp=stream_socket_client($APNS,$err,$errstr,60,
STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT,$ctx);if(!$fp){exit("Failed to connect: $err$errstr". PHP_EOL);}echo'Connected to APNS'. PHP_EOL;// Create the payload body$body['aps']=array('alert'=>$message,'sound'=>'default','data'=>'test data');// Encode the payload as JSON$payload=json_encode($body);// Build the binary notification$msg=chr(0).pack('n',32).pack('H*',$deviceToken).pack('n',strlen($payload)).$payload;// Send it to the server$result=fwrite($fp,$msg,strlen($msg));//echo "send result=$resultn";if(!$result){echo'Message not delivered'. PHP_EOL;}else{echo'Message successfully delivered'. PHP_EOL;}// Close the connection to the serverfclose($fp);?>

If the above file is named push_ios.php then
Sending a push notification can now be done by running php from the command line:php -f push_ios.php

To quickly run an iOS app, open the XCode project (in this case myproj.xcodeproj) in the ios directory. After it completes indexing and doing it’s thing, run it (click the play button in XCode). This will start the react packager, and launch the basic compiled application in the simulator. The packager enables you to make changes in the code and immediately view them in the react application by pressing +R. You can check this very cool feature of React native development by making a small change in index.ios.js , saving, switching to the simulator running the application and pressing +R

Should you add new resources (e.g source code files) you’ll need to relaunch the react packager. You do this from the command line in the project directory by:

I installed a fresh Ubuntu 14.04 on an old MacAir (how to do that is explained here) and took me hours to get it to see the Wifi networks. There were many suggestions on many sites but the solution that finally worked for me was Hadaka’s answer from ubuntuforums

Next, you should download and install Graphviz which will install the dot tool

in a nutshell, you create the documentation by running:

doxygen my_conf_file

Where my_conf_file contains all the required parameters for the generated documentation. If you use the doxygen wizard from the UI, a configuration file will be generated with some default parameters, however you need to change the following parameters in the generated configuration file if you want caller and/or called function graphs to be generated:

There really isn’t such a mathematical term – it was introduced at the latest Al Zimmermann’s Programming Contests and is defined in the contest rules (at azpcs.net – site should be back up around mid December January, a replacement is currently up at trdb.org ).

As I’m participating in this contest and have created some useful C++ classes to solve these types of optimisation problems I’ll be publishing them on github after cleaning them up when the contest is over (January 3rd).