{ "id": "159974", "key": "TIMOB-23306", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2016-05-03T13:51:40.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "51631", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "160062", "key": "TIDOC-2516", "fields": { "summary": "Media guides/reference should advice to add auto-focus-camera capability", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-06-30T12:41:38.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "I know you hate tickets like this...I can't provide a reproduceable test case. But I'm going to file it anyway so that it's documented for someone else who might encounter the same issue.\r\n\r\nI’ve been struggling with camera focus issues on iOS. In our app, focus on some iPhones is fixed at 15-20 cm. But I can’t reproduce it outside our app. You can try with the attached, which mimics our app's use of the camera. On affected devices, it doesn't matter whether you use the full-screen camera or the camera with an overlay like our app uses. And, it's not consistent to device type...some iPhone 6's are affected, others are not for example. But on those devices affected, the issue is constant. On my iPhone 5, the camera is always fixed focus with our app (though works fine in other apps, native camera app, etc.).\r\n\r\nAdding {{auto-focus-camera}} to the UIRequiredDeviceCapabilities in tiapp.xml seems to have fixed it. I would assume that that key is added automatically to the plist whenever you use the camera. But, maybe not?\r\n\r\n{code}\r\nUIRequiredDeviceCapabilities\r\n\r\n auto-focus-camera\r\n front-facing-camera\r\n camera-flash\r\n ...\r\n{code}", "attachment": [ { "id": "59128", "filename": "app.js", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-03T13:49:22.000+0000", "size": 2767, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Include auto-focus-camera in UIRequiredDeviceCapabilities to fix focus issues on some iPhone/SDK combinations", "creator": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "384584", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "BTW, this problem started happening sometime around the switch to the 5.x line of SDKs. We didn't have this problem in the past. I don't have record of an exact date/release when the problem appeared.", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-03T13:52:50.000+0000", "updated": "2016-05-03T13:52:50.000+0000" }, { "id": "384592", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nThe issue is fixed when \"auto-focus-camera\" is defined in \"UIRequiredDeviceCapabilities\" in tiapp.xml. For referance see https://developer.apple.com/library/ios/qa/qa1397/_index.html\r\n\r\nregards,\r\nSharif.\r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-05-03T14:32:25.000+0000", "updated": "2016-05-03T16:30:43.000+0000" }, { "id": "384598", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "I'm not sure why you would resolve this as \"Fixed\" when you have done nothing. I filed this as a bug because: a) {{auto-focus-camera}} should be added to the plist automatically when you use the camera, but it is apparently not. And b) if developers need to add that key, it should be documented, which it is not. So, either this is an SDK bug (key not added when it should be) or a docs bug (it's not documented that developers need to add it).", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-03T15:17:53.000+0000", "updated": "2016-05-03T15:17:53.000+0000" }, { "id": "384612", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, \r\n\r\nThe issue here is camera won't focus on some of the devices (random devices, all of are iphone 6 and up), as the reporter mentioned . The issue started in SDK 5.x and up. To avoid that issue you need to define \"auto-focus-camera\" key in \"UIRequiredDeviceCapabilities\" in tiapp.xml. But this should automatically be added in there when camera is used. And if that's not the case, the solution should be added to the docs for developers to follow. \r\n\r\nThanks,\r\nSharif.\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-05-03T16:29:55.000+0000", "updated": "2016-05-12T20:37:15.000+0000" }, { "id": "384620", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "It should be documented in the _Appcelerator Ti.Camera_ documentation that this is required. In most cases, Titanium developers do not need to specify device capabilities (or Android uses-permission settings) because these are typically handled by the Titanium build scripts. The fact that this required device capability is not handled automatically, and not documented is a *Titanium bug*", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-03T18:06:41.000+0000", "updated": "2016-05-03T18:06:41.000+0000" }, { "id": "384761", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "We need to punt this to Titanium 6. The iOS build currently writes the Info.plist before it copies and analyzes the JavaScript files, so that means it doesn't know which Titanium APIs are even being used until much later in the build. I'm not confident that we can simply move the writing of the Info.plist after the resources have been processed without introducing other issues. Given we have a workaround today whereby users can just set the UIRequiredDeviceCapabilities in tiapp.xml, I believe this can wait until Titanium 6.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-05-04T19:34:41.000+0000", "updated": "2016-05-04T19:34:41.000+0000" }, { "id": "384777", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "That's fine by me", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-04T21:13:31.000+0000", "updated": "2016-05-04T21:13:31.000+0000" }, { "id": "384863", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~cbarber] makes sense. I've created TIDOC-2516 to request it to be added to docs in the meanwhile.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-05-05T15:01:49.000+0000", "updated": "2016-05-05T15:01:49.000+0000" }, { "id": "385531", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "I just tried submitting my app update with the new auto-focus-camera device capability and was blocked. \r\n\r\n_The app's Info.plist can't contain values for the UIRequiredDeviceCapabilities key that would prevent this app from opening on any iOS device that was supported by previous versions. For more information, see Understanding the UIRequiredDeviceCapabilities Key._\r\n\r\nSo, any fix you might do needs to be for only new apps not existing ones. ", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-12T14:46:54.000+0000", "updated": "2016-05-12T14:46:54.000+0000" }, { "id": "385660", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Wow, that makes this even more critical if only when you first publish the app you can set this capability.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-05-13T11:54:57.000+0000", "updated": "2016-05-13T11:54:57.000+0000" }, { "id": "385683", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "Since I can't add the plist tag, I would love to hear other options for fixing the focus issues we're seeing. ", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-13T17:45:22.000+0000", "updated": "2016-05-13T17:45:22.000+0000" }, { "id": "385739", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I'm reading up on this issue which is actively discussed by Xcode iOS developers as well:\r\n\r\n* http://stackoverflow.com/questions/28107124/the-apps-info-plist-cant-contain-values-for-the-uirequireddevicecapabilities-k/32940562\r\n* https://devforums.apple.com/message/1137785#1137785\r\n* http://oleb.net/blog/2011/12/uirequireddevicecapabilities-cannot-be-changed-in-app-updates/\r\n\r\nThe following quote from Apple might be hint on a possible workaround:\r\n\r\n{quote}Engineering has determined that this issue behaves as intended based on the following information: Developers can add restrictions to UIRequiredDeviceCapabilities on app updates provided any device that is dropped cannot support the min os version specified.{quote}\r\n\r\nYou could try to add the key but also increase the [min-ios-ver|http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-min-ios-ver] and hope that the device(s) that don't support the capability will also not support the minimum iOS version, which should allow you to add the key still.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-05-15T15:54:39.000+0000", "updated": "2016-05-15T15:54:39.000+0000" }, { "id": "389576", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "Not including this capability has permanent and damaging consequences for iOS app developers. If you publish your app without understanding that you have to manually add this flag, you're stuck. You will be permanently incapable of fixing the blurry photos your users will take without switching app IDs / app names (i.e. publishing a new app).\r\n\r\nGiven that Titanium is supposed to make app publishing easier, not more difficult for developers, I don't see how you can put off fixing this issue. At minimum, there should be a huge warn message in the build logs, maybe even a dialog in Studio that is shown if the developer uses the Ti.Camera module without setting the UIRequiredDeviceCapabilities flag. ", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-06-30T12:41:38.000+0000", "updated": "2016-06-30T12:41:38.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }