As far as I understand from the error I got in Xcode I'm sending the data wrong. Cannot JSON serialize.
Error:
[objC] error: -[__NSSingleEntryDictionaryI dataUsingEncoding:]: unrecognized selector sent to instance 0x281c310a0
Incoming data type
NSLog(@"Data type: %@", [data class]);
result:
__NSSingleEntryDictionaryI
The data I send in my PHP script is as follows:
$payload = json_encode( array( 'aps' => array('alert' => 'Test'), 'data' => array( 'Caller' => array('Username' => 'user', 'ConnectionId' => 'user1') ) ) );
As far as I understand from the error I got in Xcode I'm sending the data wrong. Cannot JSON serialize.
Error:
[objC] error: -[__NSSingleEntryDictionaryI dataUsingEncoding:]: unrecognized selector sent to instance 0x281c310a0
Incoming data type
NSLog(@"Data type: %@", [data class]);
result:__NSSingleEntryDictionaryI
The data I send in my PHP script is as follows:
$payload = json_encode( array( 'aps' => array('alert' => 'Test'), 'data' => array( 'Caller' => array('Username' => 'user', 'ConnectionId' => 'user1') ) ) );