You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/06/27 20:42:42 UTC

[1/4] git commit: CB-5698 ios: Check to see if photoData exists before using

Repository: cordova-plugin-contacts
Updated Branches:
  refs/heads/0.2.11 [created] edc744aa5


CB-5698 ios: Check to see if photoData exists before using

close #19


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/f5908a4f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/f5908a4f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/f5908a4f

Branch: refs/heads/0.2.11
Commit: f5908a4fcf8c819dafa9e0d605471c80ad61514f
Parents: 9075e13
Author: Sean Kladek <sk...@nerdery.com>
Authored: Mon Feb 17 22:35:52 2014 -0600
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Jun 27 14:32:41 2014 -0400

----------------------------------------------------------------------
 src/ios/CDVContact.m | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/f5908a4f/src/ios/CDVContact.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVContact.m b/src/ios/CDVContact.m
index 5bf9f3c..90310e1 100644
--- a/src/ios/CDVContact.m
+++ b/src/ios/CDVContact.m
@@ -1326,6 +1326,10 @@ static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
 
     if (ABPersonHasImageData(self.record)) {
         CFDataRef photoData = ABPersonCopyImageData(self.record);
+        if (!photoData) {
+            return;
+        }
+        
         NSData* data = (__bridge NSData*)photoData;
         // write to temp directory and store URI in photos array
         // get the temp directory path


[4/4] git commit: Updated RELEASENOTES.md for release 0.2.11

Posted by ia...@apache.org.
Updated RELEASENOTES.md for release 0.2.11


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/edc744aa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/edc744aa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/edc744aa

Branch: refs/heads/0.2.11
Commit: edc744aa50a0cf015e95933fa0be85c5603b4b5c
Parents: 432b014
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Jun 27 14:42:19 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Jun 27 14:42:19 2014 -0400

----------------------------------------------------------------------
 RELEASENOTES.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/edc744aa/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index fcad892..7c990de 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -83,7 +83,7 @@
 * CB-6460: Update license headers
 * Add NOTICE file
 
-### 0.2.11 (Jun 05, 2014)
+### 0.2.11 (Jun 27, 2014)
 * CB-6127 Spanish and French Translations added. Github close #25
 * Remove deprecated symbols for iOS < 6
 * CB-6797 Add license
@@ -95,3 +95,4 @@
 * Add ContactError codes to index.md doc (closes #28)
 * CB-6491 add CONTRIBUTING.md
 * Docs typo: navigator.contacts.length -> contacts.length
+* CB-5698 ios: Check to see if photoData exists before using


[2/4] git commit: CB-5698 Fix non-compiling code in previous commit

Posted by ia...@apache.org.
CB-5698 Fix non-compiling code in previous commit


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/337e159c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/337e159c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/337e159c

Branch: refs/heads/0.2.11
Commit: 337e159c4232c57b32325b083e1f690aab8c9e46
Parents: f5908a4
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Jun 27 14:19:54 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Jun 27 14:32:42 2014 -0400

----------------------------------------------------------------------
 src/ios/CDVContact.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/337e159c/src/ios/CDVContact.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVContact.m b/src/ios/CDVContact.m
index 90310e1..58a6310 100644
--- a/src/ios/CDVContact.m
+++ b/src/ios/CDVContact.m
@@ -1327,9 +1327,9 @@ static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
     if (ABPersonHasImageData(self.record)) {
         CFDataRef photoData = ABPersonCopyImageData(self.record);
         if (!photoData) {
-            return;
+            return nil;
         }
-        
+
         NSData* data = (__bridge NSData*)photoData;
         // write to temp directory and store URI in photos array
         // get the temp directory path


[3/4] git commit: Revert change to argument order in navigator.contacts.find

Posted by ia...@apache.org.
Revert change to argument order in navigator.contacts.find


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/432b0143
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/432b0143
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/432b0143

Branch: refs/heads/0.2.11
Commit: 432b0143442a689e349e347f33ee85aeb2d28663
Parents: 337e159
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Jun 27 14:13:34 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Jun 27 14:32:42 2014 -0400

----------------------------------------------------------------------
 doc/index.md    | 2 +-
 www/contacts.js | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/432b0143/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index c64d73e..6f9cd54 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -160,7 +160,7 @@ parameter to control which contact properties must be returned back.
     options.multiple = true;
     options.desiredFields = [navigator.contacts.fieldType.id];
     var fields       = [navigator.contacts.fieldType.displayName, navigator.contacts.fieldType.name];
-    navigator.contacts.find(onSuccess, onError, fields, options);
+    navigator.contacts.find(fields, onSuccess, onError, options);
 
 ## navigator.contacts.pickContact
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/432b0143/www/contacts.js
----------------------------------------------------------------------
diff --git a/www/contacts.js b/www/contacts.js
index 1ecd28c..3185176 100644
--- a/www/contacts.js
+++ b/www/contacts.js
@@ -41,8 +41,8 @@ var contacts = {
      * @param {ContactFindOptions} options that can be applied to contact searching
      * @return array of Contacts matching search criteria
      */
-    find:function(successCB, errorCB, fields, options) {
-        argscheck.checkArgs('fFaO', 'contacts.find', arguments);
+    find:function(fields, successCB, errorCB, options) {
+        argscheck.checkArgs('afFO', 'contacts.find', arguments);
         if (!fields.length) {
             errorCB && errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
         } else {