Built and IAP rejected multiple times

Hello, I have an app that has 2 consumable in app purchase, and now I added a 3rd non-consumable purchase which removes the ads. My problem is that they rejected the build and the ad removal in app purchase as well multiple times because of this in app purchase. Sometimes the problem was that the in app purchases wasn't loaded for them, but now they problem is network errors. With the rejection they sent my screenshots. Once they got a network error saying: The request timed out. Another time they got another network error saying: The network connection was lost. For me it works perfectly every time on my iPhone and iPad.

On the main screen so when the app starts I check internet connection and then fetch in app purchases.

.task { adatok.InternetEllenorzes() await adatok.fetchApponbeluliVasarlasok() }

Then in the main menu when you click on the store button I check the internet property that was set to true if there's is internet connection. If there's no internet an alert appears saying no internet. and if there was no internet when you launched the app but then you suddenly got internet after then the fetch runs again before navigate to the shop(in app purchase view). So by the time you're in the shop view the fetch must run.

Now here's the purchasing part:

purchase:

 func Vasarlas(termek: Product) async {

        do {
       
            print("itt várakozás van hogy jó e vagy nem")
            vasarlasFolyamatban = true // teszt
            let vasarlasEredmenye = try await termek.purchase()
           
            switch vasarlasEredmenye {
            case .success(let verificationResult):
                print("A vásárlás sikeresen végigment")
                
                switch verificationResult {
                case .verified(let transaction):
                    VasarlasAllapotEllenorzes()
                    
                   await transaction.finish()
                    print("tényleg megvette van blokk")
                    switch termek.id {
                    case "A_tudatlansag_ara_betuVasarlas":
                        BetuVasarlas()
                        megvasaroltBetuk += 1
                        VasarlasSzamMentese()
                        print("sikeres betű vásárlás")
                        vasarlasFolyamatban = false
                    case "A_tudatlansag_ara_teljesVerzioV2":
                       megvettemAReklamMentesseget = true
                        print("sikeres reklámmentesség vásárlás")
                        vasarlasFolyamatban = false
                        reklamMutatva = false
                    case "A_tudatlansag_ara_UjEsely":
                    
                        if aktualisJatekMod == .egyjatekos {
                            UjEsely()
                        } else {
                            TobbjatekosUjEsely()
                        }
                        megvasaroltUjEselyek += 1
                        VasarlasSzamMentese()
                        print("sikeres új esély vásárlás")
                        vasarlasFolyamatban = false
                    default: return
                    }
                 
                    vasarlasFolyamatban = false
                    boltMutatasa = false
                    hibauzenet = nil
                    sikeresVasarlas = true
                    sikeresVasarlasok.append(termek)
                    break
                case .unverified(_, let hiba):
                    print("A vásárlás sikeres de mivel nincs blokkk nincs megerősítve: \(hiba.localizedDescription)")
                 
                    vasarlasFolyamatban = false
                    boltMutatasa = false
                    hibauzenet = nil
                    break
                }
            case .userCancelled:
                hibaCim = "Vásárlás hiba"
                if boltMutatasa {
                    hibauzenet = "A vásárlás megszakítva"
                    boltHibaMegjelenites = true
                    vasarlasFolyamatban = false
                 
                } else {
                    vasarlasFolyamatban = false
                    hibauzenet = "A vásárlás megszakítva"
                    boltHibaMegjelenites = true
                }
                break
            case .pending:
                print("a vásárlás folyamatban")
                break
            @unknown default:
                vasarlasFolyamatban = false
                hibauzenet = "Ismeretlen hiba történt"
                boltHibaMegjelenites = true
                break
            }
        } catch {
        
            hibaCim = "Hálózati hiba cim"
            hibauzenet = error.localizedDescription
            boltHibaMegjelenites = true
            vasarlasFolyamatban = false
        }
    }

And here's the purchase check:

  func VasarlasAllapotEllenorzes() {

        Task {
            for await VerificationResult in Transaction.updates {
                switch VerificationResult {
                case .verified(let vasarlas):
                    print("sikeres vásárlás: \(vasarlas.signedDate)")
                    await vasarlas.finish()
                    vasarlasFolyamatban = false
                case .unverified(_, _):
                    print("Hiba történt a vásásrlás közben)")
                    boltHibaMegjelenites = true
                    vasarlasFolyamatban = false
                }
            }
        }
    }

Anyone got any suggestion why it runs perfectly for me on 2 different device but the review team can't get it working? Is there a problem with the code or the problem is on the side? I even asked them because in the screenshots they sent, which I show here doesn't show any network icon no wifi or cellular in the notification area, so I asked them if they have a network connection but they said they did not experience any network issues during the review.

Replies

Internet check:

 func InternetEllenorzes() {

      let halozatEllenorzes = NWPathMonitor()
        let halozatQueue = DispatchQueue(label: "hálózat ellenőrzés")
        halozatEllenorzes.pathUpdateHandler = { allapot in
            
            DispatchQueue.main.async {
                switch allapot.status {
                case .satisfied: 
                    print("Van internet")
                    self.vanInternet = true
                    
                case .unsatisfied:
                    print("nincs hálózathoz csatlakozva")
                    self.vanInternet = false
                    
                case .requiresConnection:
                    print("hálózathoz van csatlakozva de nincs internet")
                    self.vanInternet = false
                    
                @unknown default:
                    print("nem tudom mivan a hálózattal")
                    self.vanInternet = false
                    
                }
            }
        }
            halozatEllenorzes.start(queue: halozatQueue)
    }

And here's the fetch:

func fetchApponbeluliVasarlasok() async {

       boltiTermekekLetolteseFolyamatban = true
        do {
            let fetch = try await Product.products(for: ["A_tudatlansag_ara_betuVasarlas", "A_tudatlansag_ara_UjEsely", "A_tudatlansag_ara_teljesVerzioV2"])
            print("sikeres fetch")
            

            
            for vasarolhato in fetch {
                if !boltiTermekek.contains(vasarolhato) {
              
                    boltiTermekek.append(vasarolhato)
                    print("a termekekhez sikeresen hozzáadva: \(vasarolhato.id)") 
                } else {
                    print("a \(vasarolhato.id) már szerepel a boltiTermékek tömbben")
                }
            }
          
            
            

            let megvettReklammentesseg = fetch.firstIndex(where: { $0.id == "A_tudatlansag_ara_teljesVerzioV2" })
            if megvettemAReklamMentesseget && !sikeresVasarlasok.contains(where: { $0.id == "A_tudatlansag_ara_teljesVerzioV2" }) {
                if megvettReklammentesseg != nil {
                    sikeresVasarlasok.append(fetch[megvettReklammentesseg!])
                }
            }
            boltiTermekekLetolteseFolyamatban = false
        } catch {
            print("Hiba történt fetch közben: \(error.localizedDescription)")
        }
    }

I do wonder if your internet connection check is having issues with app review internal infrastructure. Is that logic new? Additionally could you file a ticket with details to Feedback assistant and post that FB# here?

I never used feedback assistant, but I tried my best. Here's the FB number: FB13706207