Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27380] iOS: Selecting a video from PhotoGallery does not work properly in ios13.1 beta device

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2019-10-21T16:02:18.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsengSchedule
ReporterRakhi Mitro
AssigneeUnknown
Created2019-09-05T11:12:41.000+0000
Updated2019-10-21T20:39:40.000+0000

Description

Selecting a video from PhotoGallery does not work properly in *ios13.1 beta device*.The customer is facing this on latest sdk (ti sdk 8.1.1.GA). There is no problem for still images.There are no errors in the trace log. *Test project:* Click [here| https://drive.google.com/file/d/1El4E6UTvTwFuu9R6V2J1pk3_SVEF4YUC/view?usp=sharing] to download or check attachment sections. *Test steps:* 1) Download the project and integrate it via studio 2) Add the following into tiapp.xml:
    <key>NSCameraUsageDescription</key>
        <string>To allow you to take photos of documents for uploading</string>
        <key>NSMicrophoneUsageDescription</key>
        <string>Can we use your microphone?</string>
        <key>NSPhotoLibraryAddUsageDescription</key>
        <string>To allow you to upload photos of documents</string>
        <key>NSPhotoLibraryUsageDescription</key>
        <string>To allow you to upload photos of documents</string>
3)Run the project 4) After run, will get two buttons *Open camera*:Click openCamera to shoot and use a video, provides success result. *Open Photogallery*:Clicking openPhotoGallery and selecting a video from the photo gallery will fail. *Note:* We tested this on ti sdk 8.1.1.GA and IOS ios12.3.1,iphone 5s v12.4 and unable to reproduce the issue.Clicking openPhotoGallery and selecting a video from the photo gallery is working expected on our end. Check attachment section for the testing output *(IMG_0076(1).jpg)*. *Console logs*:
[INFO] :   Finished building the application in 31s 453ms

[INFO] :   Installing app on device: Mostafizur Rahman’s iPhone

[INFO] :   App successfully installed on device: Mostafizur Rahman’s iPhone

[INFO] :   symbols: /Users/macbookpro/Documents/Appcelerator_Studio_Workspace/alloyTest/build/iphone/build/Products/Debug-iphoneos/alloyTest.app.dSYM

Please manually launch the application

[INFO] :   alloyTest 1.0 (Powered by Titanium 8.1.1.0148ee6e79)

[INFO] :   Click openCamera to shoot and use a video, succeed.

[INFO] :   Clicking openPhotoGallery and selecting a video from the photo gallery is also working.

Attachments

FileDateSize
app.zip2019-09-05T11:15:35.000+00005502804
IMG_0076 (1).jpg2019-09-05T11:11:44.000+0000110674
trace_log.rtf2019-09-17T03:06:15.000+00002661900
UNADJUSTEDNONRAW_thumb_2.jpg2019-09-05T11:19:46.000+000035433
UNADJUSTEDNONRAW_thumb_3.jpg2019-09-05T11:19:46.000+000072172
UNADJUSTEDNONRAW_thumb_4.jpg2019-09-05T11:19:46.000+000051408
UNADJUSTEDNONRAW_thumb_5.jpg2019-09-05T11:19:46.000+000019885

Comments

  1. Vijay Singh 2019-09-05

    [~rmitro] I tried with attached test code from app.zip. It is working fine for me. Can you please give access to the attached project on link? Thanks!
  2. Rakhi Mitro 2019-09-11

    Hello, The customer is asking for update.The official version of ios13 will be released soon.
  3. Satyam Sekhri 2019-09-11

    Tried the provided test project on iPhone XR (v13.1 beta) and titanium SDK 8.1.1.GA as well as 8.2.0.v20190905150915 build. Could not reproduce the issue. App functionality through "OpenCamera" and "OpenPhotoGallery" buttons works fine. Recording of video, playing a video from photo gallery and selection of a video from photo gallery all works fine.
  4. Matt Poole 2019-10-21

    @rmitro Were you able to determine what the issue was here in your tests? I'm running into a similar issue when I go to send the video to my server, though I'm still trying to track down the exact reason why. Only seems to be an issue on 13.1 or 13.2 and not 12.4 or below for me SDK 8.0.3 (i realize you are on newer, but again, same symptoms) iOS SDK 12.1 or 13.1 (tried both) I also realize this has been closed, just trying to figure out what my potential environmental/build/permission issue is here
  5. Matt Poole 2019-10-21

    FWIW, I have narrowed down my issue to code we had to move the video file after choosing it from the gallery. For a long time we have been moving it from the tmp directory into our Documents directory. As of iOS 13.1 we get this making that call (moveItemAtPath). As a test, I changed it to copyItemAtPath and that seems to work OK. Though I don't want to leave files around in tmp. {noformat} Error moving file (/private/var/mobile/Containers/Data/PluginKitPlugin/072A2C49-2387-4385-A67B-9CBB8D61A0B1/tmp/trim.C04B7472-1D2A-4CEB-8959-A910B16C84E8.MOV) to (/var/mobile/Containers/Data/Application/0488532F-D13A-44EB-8443-97C4C07BA15E/Documents/trim.C04B7472-1D2A-4CEB-8959-A910B16C84E8.MOV): "trim.C04B7472-1D2A-4CEB-8959-A910B16C84E8.MOV" couldn't be moved because you don't have permission to access "Documents". - You don't have permission. {noformat}

JSON Source