[TIMOB-20589] iOS: Allow editing contacts in iOS9 and above
GitHub Issue | n/a |
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-05T06:17:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | contacts, qe-.5.4.0 |
Reporter | Srikanth Sombhatla |
Assignee | Srikanth Sombhatla |
Created | 2016-03-18T06:26:25.000+0000 |
Updated | 2016-06-09T22:30:38.000+0000 |
Description
In >= iOS 9 we are not allowing to edit contacts, thought this is editable in iOS 8. The TiContactsPerson object being returned in immutable because of which attempting to edit a contact will result in crash.
Attachments
File | Date | Size |
app.js | 2016-03-21T07:22:25.000+0000 | 4300 |
master PR: https://github.com/appcelerator/titanium_mobile/pull/7870 Use attached [^app.js] for testing. Problem is we are maintaining immutable
CNContact
objects internally. This fix changes them to mutable objects and also puts an observer so that the changes are collected and saved. In essence any method returningTiContactPerson
returns an mutable object like in Android.[~ssombhatla] Tested with your app.js but setting jobTitle and department is not working. Can you check?
[~cng] Fixed the issue. Please review.
CR and FT passed. PR Merged.
Verified as fixed, using the provided app.js, contacts are able to be edited on iOS9. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7.-2 App CLI: 5.4.0-11 Xcode 7.3 Node v4.2.6 *Closing ticket.*