iOS Question Performance issues with the app in Apple Review

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
Hello guys, greetings!
I will explain what is happening ...
On September 4, 2020 I uploaded my application (ipa) to Apple's AppStoreConnect ... However, since then the application has been "refused by the review team", for the following argument:

B4X:
Guideline 2.1 - Performance - App Completeness


We discovered one or more bugs in your app when reviewed on iPhone running iOS 13.7 on Wi-Fi.

Specifically, your app loaded indefinitely when we tapped the “Loja” feature.

Next Steps

To resolve this issue, please run your app on a device to identify any issues, then review and resubmit your app for review.

If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.

For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue. For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue.

Resources

For information about testing your app and preparing it for review, please see Technical Note TN2431: App Testing Guide.

For a networking overview, please review About Networking.

In short ... My application DOWNLOADS IMAGES using HTTPJOB and displays it in a CustomListView with ImageViews, but on APPLE devices it doesn't download and they accuse the problem above ...

The strange thing and what doesn't make me understand, is that "Release with Debug mode or Release Ad-hoc profile mobileprovision the application works perfectly without any problem." (Tested on 3 devices (Iphone X, Iphone SE 2020 and Ipad mini 4) .

it is the 7th time that they disapprove my application for the same reason ... I tried using ImageDownloader before and now I am using HttpJob directly to download the images and display it in ImageViews.

Does anyone have any idea what's going on?
 

hatzisn

Expert
Licensed User
Longtime User
Are you sure you have initialized the http job? When I started with B4i I faced this problem during debugging. It does not raise an error but jobdone never fires.
 
Upvote 0

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
Are you sure you have initialized the http job? When I started with B4i I faced this problem during debugging. It does not raise an error but jobdone never fires.

yes , I went back to using ImageDownloader .

Main Code is like this >
B4X:
Private DownloadImages As Map
Private Downloader As ImageDownloader

Private Sub Application_Start (Nav As NavigationController)
    
    analytics.Initialize
    
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.RootPanel.LoadLayout("Page1")
    NavControl.ShowPage(Page1)

    NavControl.NavigationBarVisible = False

    DownloadImages.Initialize
    Downloader.Initialize

    DownloadImages.Put(img1,"https://www.mydomain.com/img.png")
    DownloadImages.Put(img2,"https://www.mydomain.com/img2.png")
    
    Downloader.Download(DownloadImages)
    
End Sub

ImageDownloader Class b4i
B4X:
'Class module
Sub Class_Globals
    Private tasks As Map
    Private ongoingTasks As Map
End Sub

Public Sub Initialize
    tasks.Initialize
    ongoingTasks.Initialize
End Sub

Public Sub Download (ImageViewsMap As Map)
    
    Log("Lista de Imagens = "&ImageViewsMap.Size)
    
    For Each iv As ImageView In ImageViewsMap.Keys
        Dim link As String = ImageViewsMap.Get(iv)
        tasks.Put(iv, link)
        Log("initlizing")
        If ongoingTasks.ContainsKey(link) = False Then
            Log("open")
            ongoingTasks.Put(link, "")
            Dim j As HttpJob
            j.Initialize(link, Me)
            j.Download(link)
        End If
    Next
    
End Sub

Private Sub JobDone(Job As HttpJob)
    ongoingTasks.Remove(Job.JobName)
    If Job.Success Then
        Dim bmp As Bitmap = Job.GetBitmap
        If tasks.IsInitialized Then
            For Each iv As ImageView In tasks.Keys
                Dim link As String = tasks.Get(iv)
                If link = Job.JobName Then
                    tasks.Remove(iv)
                    iv.Bitmap = bmp
                    Log("done")
                End If
            Next
        End If
    Else
        Log("Error downloading image: " & Job.JobName & CRLF & Job.ErrorMessage)
    End If
    Job.Release
    
    If (tasks.Size = 0) Then
        Main.hd.ProgressDialogHide
    End If
    
End Sub

when I compile with the ad-hoc profile, it downloads normally, only when I compile with the Store Profile that is giving this problem ...
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The provision profile doesn't affect your app behavior.

only when I compile with the Store Profile that is giving this problem
This is not accurate. You cannot test your app with the store profile.

Maybe your server is unreachable, when Apple test it.

Have you tested your app with airplane mode turned on? Your app should show something even if there is a network problem.
 
Upvote 0

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
The provision profile doesn't affect your app behavior.


This is not accurate. You cannot test your app with the store profile.

Maybe your server is unreachable, when Apple test it.

Have you tested your app with airplane mode turned on? Your app should show something even if there is a network problem.

I put a MsgBox to see if the apple could print out the problem and send it to me, it ended up working and I found a bug in the API that I used, which was something very simple, but not downloading the images on the devices used by Apple ...
Thank you very much for your attention and excellent support !!
Love the B4X
 
Upvote 0
Top