iOS Question APP crash when saving bitmap

abarnett

Member
Licensed User
Longtime User
B4X:
Sub lblSnapshot_Click
    Dim SnapBitmap As Bitmap
    Dim myPhone As Phone
    If panLayout.Tag="list" Then
        cvs.Initialize(gmapD)
    Else
        cvs.Initialize(gmap)
    End If
    SnapBitmap=cvs.CreateBitmap
    myPhone.AddImageToAlbum(SnapBitmap)
    ImageView1.Bitmap=SnapBitmap
End Sub

APP crashes under ios 13.3.1 but was working ok before ios update.

Stack Trace: (
"0 ViatorMobile SignalHandler + 120",
"1 libsystem_platform.dylib 0x000000019031c884 F77366E7-EF17-3E34-A4BA-F938756212C2 + 34948",
"2 libsystem_kernel.dylib 0x0000000190408f24 1B7D7184-05D6-3A83-BB1B-F9AF6AEF61F3 + 163620",
"3 libsystem_kernel.dylib 0x0000000190408f54 1B7D7184-05D6-3A83-BB1B-F9AF6AEF61F3 + 163668",
"4 TCC FF3F25A5-A6F6-3873-9A44-8464B4930400 + 7368",
"5 TCC FF3F25A5-A6F6-3873-9A44-8464B4930400 + 7176",
"6 TCC FF3F25A5-A6F6-3873-9A44-8464B4930400 + 23336",
"7 libxpc.dylib E3530448-A171-371F-9E54-6EFDA87582CA + 97304",
"8 libxpc.dylib E3530448-A171-371F-9E54-6EFDA87582CA + 48800",
"9 libdispatch.dylib B9D95EAB-9269-367D-B2F4-C2B45821A32D + 377348"
)
 

abarnett

Member
Licensed User
Longtime User
I have this in the Project Attributes

B4X:
[CODE=b4x]    #PlistExtra: <key>NSPhotoLibraryUsageDescription</key><string>This app needs access to photos.</string>
[/CODE]
 
Upvote 0

abarnett

Member
Licensed User
Longtime User
running the same code on a device running ios 10.3.3 it displays the popup message 'This app needs access to photos.'. When I Allow is saves.

I don not get the popup message running on an ios 13.3.3 device
 
Upvote 0

abarnett

Member
Licensed User
Longtime User
Thanks Erel. I found it needs this line also for ios 13

B4X:
#PlistExtra:<key>NSPhotoLibraryAddUsageDescription</key><string>Save photo in albums.</string>
 
Upvote 0
Top