Skip to content

Plyer camera cannot save image to the IOS phone #561

Closed
@Junhano

Description

Error
2020-05-08 21:02:13.732079-0700 chiroview[25063:7296873] Image saved successfully
2020-05-08 21:02:24.039660-0700 chiroview[25063:7296873] [chiroview] IIOImageWriteSession:121: cannot create: '/private/var/containers/Bundle/Application/AC8438C9-24DC-42EF-886B-897FAE254901/chiroview.app/YourApp/test.png.sb-adbcd51c-fbT6Fo'
error = 1 (Operation not permitted)
2020-05-08 21:02:24.039745-0700 chiroview[25063:7296873] Error -> failed to create image destination.

My code

def capture(self):                                                                    
    try:                                                                              
        file_name = "test.png"                                                        
        camera.take_picture(filename = file_name,on_complete = self.camera_callback)  
                                                                                      
    except NotImplementedError:                                                       
        pass                                                                          
                                                                                      
def camera_callback(self, filename):                                                  
    if (exists(filename)):                                                            
        print('Hello')                                                                
    else:                                                                             
        pass       

I don't know what's wrong with my plyer camera. I can successfully start the camera, but when I click cancel, my console says image saved successfully. But when I actually took the picture and try to save it to my phone, it says operation not permitted error. I did some research and find some similar post, but I didn't find a good solution to my problem. The on_complete call back function never gets called. Anyone who knows what's going on can tell me what's wrong with my Plyer Camera?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions