You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2012/06/12 10:53:42 UTC

[jira] [Created] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Shazron Abdullah created CB-902:
-----------------------------------

             Summary: iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
                 Key: CB-902
                 URL: https://issues.apache.org/jira/browse/CB-902
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
         Environment: iOS 6 DP1
            Reporter: Shazron Abdullah
            Assignee: Shazron Abdullah
            Priority: Critical
             Fix For: 2.0.0


Currently crashes if the user does not have AddressBook permission on iOS 6.

The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Braden Shepherdson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Braden Shepherdson reassigned CB-902:
-------------------------------------

    Assignee: Braden Shepherdson  (was: Shazron Abdullah)
    
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446527#comment-13446527 ] 

Shazron Abdullah commented on CB-902:
-------------------------------------

It is only documented in the beta 4 Release Notes: https://developer.apple.com/library/prerelease/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html

This is a huge change and may not go in 2.1.0
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446509#comment-13446509 ] 

Shazron Abdullah commented on CB-902:
-------------------------------------

No crashes anymore, but mobile-spec reports 4 failures related to Contacts with beta 4.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Braden Shepherdson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440366#comment-13440366 ] 

Braden Shepherdson commented on CB-902:
---------------------------------------

I can't reproduce this with MobileSpec on the iOS 6 simulator, iPhone or iPad. There doesn't seem to be anything in Settings to turn on the protection, and my MobileSpec app is not listed in the Privacy > Contacts list, which should show applications that have requested access to the contacts (and been allowed).

Possibly Xcode is deliberately disabling that permissions check? I'm still investigating.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464084#comment-13464084 ] 

Becky Gibson commented on CB-902:
---------------------------------

Other posts related to this issue:  https://groups.google.com/forum/?fromgroups=#!searchin/phonegap/contacts$20crash/phonegap/c95P4L8sENk/Vq50C_Xc5o4J

https://groups.google.com/forum/?fromgroups=#!topic/phonegap/x7i187AM9Q8

                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454474#comment-13454474 ] 

Shazron Abdullah commented on CB-902:
-------------------------------------

Documentation:
1. https://developer.apple.com/library/prerelease/ios/#documentation/AddressBook/Reference/ABAddressBookRef_iPhoneOS/Reference/reference.html#//apple_ref/c/func/ABAddressBookRequestAccessWithCompletion
2. https://developer.apple.com/library/prerelease/ios/#documentation/AddressBook/Reference/ABAddressBookRef_iPhoneOS/Reference/reference.html%23//apple_ref/c/func/ABAddressBookGetAuthorizationStatus
3. https://developer.apple.com/library/prerelease/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446525#comment-13446525 ] 

Shazron Abdullah commented on CB-902:
-------------------------------------

It seems with beta 3 they added a manual function to request AddressBook access, which we need to implement. Details here: 

1. https://devforums.apple.com/message/708024#708024
2. https://devforums.apple.com/message/720708#720708

Note that the function used is NOT in the pre-release docs. Thanks Apple!

                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Becky Gibson reassigned CB-902:
-------------------------------

    Assignee: Becky Gibson  (was: Braden Shepherdson)
    
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Becky Gibson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-902:
--------------------------------

    Fix Version/s:     (was: 2.1.0)
                   2.2.0

Punting to 2.2.0

If you look at the links with sample code, usage of this new authorization API requires blocks in the authorization completion handler, thus we have to re-factor our code to use this - which is not trivial.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Braden Shepherdson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440301#comment-13440301 ] 

Braden Shepherdson commented on CB-902:
---------------------------------------

I'm taking a look at this. This is my first venture into Objective-C and iOS development, so we'll see how it goes.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-902:
--------------------------------

    Affects Version/s: 1.8.0
    
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Ronnie Schaniel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468432#comment-13468432 ] 

Ronnie Schaniel commented on CB-902:
------------------------------------

After using your fix I got an CFNetwork internal error on ios6 simulator or device. 
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468575#comment-13468575 ] 

Becky Gibson commented on CB-902:
---------------------------------

Can you provide more specifics?  What api's are you calling what is the xcode log?  I never had any crashes with the original code - just empty contact list.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468078#comment-13468078 ] 

Becky Gibson commented on CB-902:
---------------------------------

Fix is here:  https://github.com/becka11y/incubator-cordova-ios/tree/cb902 

Would love to have some additional testing before I commit.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469339#comment-13469339 ] 

Becky Gibson commented on CB-902:
---------------------------------

On quick inspection of your code I do see a few things that might be an issue.  First, iOS does not support displayName as specified in the docs:  "displayName: This property is not supported by iOS and will be returned as null unless there is no ContactName".  Can you try setting one of the other name fields just to see if that makes a difference?

I do my best to handle displayName in the code and I'll try and double check to make sure that is not the reason for the crash. Also, you should not be setting the contact.id - that field gets set by the mobile operating system when the contact is saved.  Also, what version of iOS are you using?  I assume at least 4.1 (and 4.3 if you are using xcode 4.5).  I think 4.1 is the minimum required to use blocks (which is where you are seeing the crash).  
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-902:
--------------------------------

    Fix Version/s:     (was: 2.0.0)
                   2.1.0
    
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Becky Gibson resolved CB-902.
-----------------------------

    Resolution: Fixed

Fixed with this commit:  https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=4a3b22064e67c90a4237397ee8205b52cd2e14f1
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Becky Gibson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Ronnie Schaniel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468432#comment-13468432 ] 

Ronnie Schaniel edited comment on CB-902 at 10/3/12 11:37 PM:
--------------------------------------------------------------

I use your updated CDVContacts.m and still get an EXC_BAD_ACCESS error. 
                
      was (Author: rschaniel):
    After using your fix I got an CFNetwork internal error on ios6 simulator or device. 
                  
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Ronnie Schaniel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469180#comment-13469180 ] 

Ronnie Schaniel commented on CB-902:
------------------------------------

Here is the javascript part of adding a contact:

function addToContacts()
{
  if(currentAddress != null)
  {
    console.log("Add " + currentAddress.company_name + " to contacts");
    var contact = navigator.contacts.create({ "displayName" : currentAddress.company_name });
    contact.id = currentAddress.company_name;
        
    var contactCompany = new ContactOrganization();
    contactCompany.name = currentAddress.company_name;
    contact.organizations = new Array(contactCompany);
    
    street_and_house = $.trim(currentAddress.street + ' ' + currentAddress.house);
    var address = new ContactAddress();
    address.type = 'work';
    address.streetAddress = street_and_house;
    address.postalCode = currentAddress.zip
    address.locality = currentAddress.city;
    address.country = 'Switzerland';
    contact.addresses = new Array(address);
    
    var phoneNumbers = new Array();
    if(currentAddress.phone != null)
    {
      phoneNumbers.push(new ContactField('work', currentAddress.phone, true));
    }
    if(currentAddress.fax != null)
    {
      phoneNumbers.push(new ContactField('work fax', currentAddress.fax, false));;
    }
    if(phoneNumbers.length > 0)
    {
      contact.phoneNumbers = phoneNumbers;
    }
    
    if(currentAddress.email != null)
    {
      contact.emails = new Array(new ContactField('work', currentAddress.email, true));
    }
    
    if(currentAddress.homepage != null)
    {
      contact.urls = new Array(new ContactField('work', currentAddress.homepage, true));
    }
        
    navigator.notification.confirm("Wollen Sie diese Adresse in Ihre Kontakte übernehmen?", function(button){ if(button == 1) { contact.save(); } }, "Kontakt speichern", "OK,Abbrechen");
  }
}

In CDVContacts.m I get a EXC_BAD_ACCESS at this point:
 [abHelper createAddressBook: ^(ABAddressBookRef addrBook, CDVAddressBookAccessError * errorCode) {


I think there is an error in my App and not in your Fix.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.2.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293455#comment-13293455 ] 

Shazron Abdullah commented on CB-902:
-------------------------------------

Tagged version as 2.0.0 since that's the latest version we have. iOS 6 is due in the "fall".
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-902) iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440627#comment-13440627 ] 

Shazron Abdullah commented on CB-902:
-------------------------------------

It's possible something has changed since iOS 6 beta 2 and/or we are handling the NULL better since we are using ARC? Not sure yet.
                
> iOS 6 - deal with new Privacy functionality in Contacts (ABAddressBook:: ABAddressBookCreateWithOptions)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-902
>                 URL: https://issues.apache.org/jira/browse/CB-902
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.0
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Braden Shepherdson
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> Currently crashes if the user does not have AddressBook permission on iOS 6.
> The user will get a popup dialog similar to the Geolocation permissions dialog. When creating an address book, we should handle the condition where the app does not have permission, and the address book returned is NULL. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira