{ "id": "171661", "key": "TIMOB-26047", "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": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-06-30T12:07:52.000+0000", "created": "2018-05-16T03:50:35.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "forceSplashAsScreenshot", "ios", "storyboard" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" }, { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-10-01T22:46:47.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When opening requesting permissions to open the camera on an iPhone X if the forceSplashAsSnapshot is set to true the splash screen will display instead of the camera and the application has to be killed.\r\n\r\nSteps to reproduce:\r\n\r\n1. Create a sample application\r\n2. Update the index.js with the attached\r\n3. Update the alloy.js with the attached\r\n4. Update the tiapp.xml with the NSCameraUsageDescription key in the attached tiapp.xml\r\n5. Run the application and click on \"Hello World\"\r\n6. Accept permissions\r\n7. Notice camera loads, but then default splash screen is displayed over the camera.\r\n\r\nExample:\r\n\r\n{code:js}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nfunction doClick(e) {\r\n\tvar _cameraSettings = {\r\n\t\tsaveToPhotoGallery : false,\r\n\t\tshowControls : true,\r\n\t\tallowEditing : false,\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t};\r\n\r\n\tif (Ti.Media.hasCameraPermissions()) {\r\n\t\t//we have permissions, open the camera\r\n\t\tTi.Media.showCamera(_cameraSettings);\r\n\t} else {\r\n\t\t//must request camera access\r\n\t\tTi.Media.requestCameraPermissions(function(_evt) {\r\n\t\t\tif (_evt.success) {\r\n\t\t\t\t//permissions were granted, open camera\r\n\t\t\t\tTi.Media.showCamera(_cameraSettings);\r\n\t\t\t} else {\r\n\t\t\t\talert('We need camera permissions');\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Trigger'\r\n});\r\n\r\nbtn.addEventListener('click', doClick);\r\n\r\nwin.add(btn);\r\n\r\nwin.open();\r\n{code}\r\n\r\ntiapp.xml:\r\n{code:xml}\r\n...\r\n NSCameraUsageDescription\r\n To allow you to take photos of documents for uploading\r\n...\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Opening camera on iPhone X shows splash screen after permissions accepted", "creator": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 6.3.0.GA & 7.1.1.GA", "comment": { "comments": [ { "id": "437694", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The issue is valid! Although the splash screen disappears when closing the camera again on my iPhone X test device. I will debug it this week and give an update afterwards.\r\n\r\nEDIT: Also, I think this should not be specific to the camera and the iPhone X but in general using storyboards + the forceSplashScreen + system dialogs (including all permission dialogs, low battery warning etc). Can you confirm that? I am not sure if this is even fixable, since system alert cannot really be controlled properly.\r\n\r\nEDIT 2: Found a fix, pushing now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-16T15:30:39.000+0000", "updated": "2018-05-16T16:05:52.000+0000" }, { "id": "437696", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10054\r\n\r\nTest-case: Above\r\n\r\n[~jceaser] You can patch your SDK today by replacing the references in the linked pull request locally. Thanks for raising this!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-16T16:19:57.000+0000", "updated": "2018-05-16T16:19:57.000+0000" }, { "id": "437697", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "body": "How do I apply a patch to my SDK, I've never done that?", "updateAuthor": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-16T16:23:16.000+0000", "updated": "2018-05-16T16:23:16.000+0000" }, { "id": "437698", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I just described that. For details, please reach out to the community via TiSlack or StackOverflow. This channel is only for bug reports, no general Titanium questions.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-16T16:25:30.000+0000", "updated": "2018-05-16T16:25:30.000+0000" }, { "id": "437933", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can this be applied to any version of the SDK or only the latest GA eg. 7.1.1.GA? I ask because I received an error when applying it to 6.3.0.GA.", "updateAuthor": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-24T19:57:36.000+0000", "updated": "2018-05-24T19:57:36.000+0000" }, { "id": "438884", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jceaser] It should be applied to 7.x at least, since there were other changes between 6 and 7 regarding that class. You can also try it out on master, since the PR was just integrated into the SDK.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-06-30T12:09:48.000+0000", "updated": "2018-06-30T12:09:48.000+0000" }, { "id": "441205", "author": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "body": "I had an issue where the camera was occasionally crashing with an \"unknown\" error when the app was paused with the camera open and then resumed from the background. Through dumb luck (and a lot of trial-and-error testing) I discovered that when I set `Ti.App.forceSplashAsSnapshot` to \"false\", the error did not occur (I, obviously, previously had it set to \"true\"). To get around this, I simply set `Ti.App.forceSplashAsSnapshot` to \"false\" when opening the camera and \"true\" when hiding it. My crash is gone. It sounds like it might be the same issue as listed here, and therefore I am posting this in the hope that it might save someone from pulling out their hair for hours as I have just done!", "updateAuthor": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "created": "2018-08-29T23:09:03.000+0000", "updated": "2018-08-29T23:09:03.000+0000" }, { "id": "441222", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~raefa], thanks for the feedback! This issue has been resolved and fixed for 7.5.0 (current master), did you try that version already? In any case, it sounds like a good workaround for current versions of the SDK, so again, thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-30T06:37:52.000+0000", "updated": "2018-08-30T06:37:52.000+0000" }, { "id": "441249", "author": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "body": "Hi [~hknoechel]. I just tried the 7.5.0 nightly build and it indeed seems to have fixed the issue I reported. Good stuff!", "updateAuthor": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "created": "2018-08-31T04:39:29.000+0000", "updated": "2018-08-31T04:43:58.000+0000" }, { "id": "442206", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 7.5.0.v20181001073642. Camera loads fine and no splash screen after permission accepted. Works fine. Closing.\r\n{code}\r\nName = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\nSDK =7.5.0.v20181001073642\r\nDevice =iPhone X iOS 11,Iphone 6s iOS 12\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-01T22:46:26.000+0000", "updated": "2018-10-01T22:46:26.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }