Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added missing semicolon in AppDelegate / Fixed length check of device unique identifier #13

Merged
merged 2 commits into from

2 participants

@gonecoding

Two minor bug fixes.

gonecoding added some commits
@gonecoding gonecoding Added missing semicolon 76688c8
@gonecoding gonecoding Fixed check for the device UID's length when not using the UDID
If the 'official' UDID is not being used as the device's unique identifier (meaning a string generated by CFUUIDCreate is being used) the length of the UID is not 40 characters.
603b2be
@manifestinteractive

Thanks for the fix. Merging Pull Request now ;)

@manifestinteractive manifestinteractive merged commit 6a09004 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 29, 2011
  1. @gonecoding

    Added missing semicolon

    gonecoding authored
  2. @gonecoding

    Fixed check for the device UID's length when not using the UDID

    gonecoding authored
    If the 'official' UDID is not being used as the device's unique identifier (meaning a string generated by CFUUIDCreate is being used) the length of the UID is not 40 characters.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  src/delegate/Delegate.m
  2. +1 −1  src/php/classes/class_APNS.php
View
2  src/delegate/Delegate.m
@@ -47,7 +47,7 @@ - (void)application:(UIApplication *)application didRegisterForRemoteNotificatio
if (uuid)
deviceUuid = (NSString *)uuid;
else {
- CFStringRef cfUuid = CFUUIDCreateString(NULL, CFUUIDCreate(NULL))
+ CFStringRef cfUuid = CFUUIDCreateString(NULL, CFUUIDCreate(NULL));
deviceUuid = (NSString *)cfUuid;
CFRelease(cfUuid);
[defaults setObject:deviceUuid forKey:@"deviceUuid"];
View
2  src/php/classes/class_APNS.php
@@ -266,7 +266,7 @@ private function _registerDevice($appname, $appversion, $deviceuid, $devicetoken
if(strlen($appname)==0) $this->_triggerError('Application Name must not be blank.', E_USER_ERROR);
else if(strlen($appversion)==0) $this->_triggerError('Application Version must not be blank.', E_USER_ERROR);
- else if(strlen($deviceuid)!=40) $this->_triggerError('Device ID must be 40 characters in length.', E_USER_ERROR);
+ else if(strlen($deviceuid)>40) $this->_triggerError('Device ID may not be more than 40 characters in length.', E_USER_ERROR);
else if(strlen($devicetoken)!=64) $this->_triggerError('Device Token must be 64 characters in length.', E_USER_ERROR);
else if(strlen($devicename)==0) $this->_triggerError('Device Name must not be blank.', E_USER_ERROR);
else if(strlen($devicemodel)==0) $this->_triggerError('Device Model must not be blank.', E_USER_ERROR);
Something went wrong with that request. Please try again.