IOS App Rejected When Connected to IPV6 Connection

Hi Every 1,
My IOS app is just keep rejected after submitting for the 4th time , i have a button that download some image to a table view from Backendless storage via image url stored in the Backendless database i used SDWebImage Library for downloading and cash the images i used some connection class to check the internet connection which i suspect will be the cause of rejection so i did some modification on that class and resubmitted and it was rejected again .
then i suspect the SDWebImage library but according to there feedback on this link
https://github.com/rs/SDWebImage/issues/1566 they had resolve this issue since June 2016
i remove the internet connection class and re submit my app with the code below


import UIKit
import SDWebImage
class Codingtbl: UITableViewController {
 @IBOutlet var imgtbl: UITableView!
 
 
 var imgarray = [Images]()
 
 let backendless = Backendless()
 
 override func viewDidLoad() {
 super.viewDidLoad()
 imgtbl.delegate=self
 imgtbl.dataSource=self
 }
 
 override func viewDidAppear(_ animated: Bool) {
 loaddatawithquery()
 }
 override func numberOfSections(in tableView: UITableView) -> Int {
 // #warning Incomplete implementation, return the number of sections
 return 1
 }
 override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
 // #warning Incomplete implementation, return the number of rows
 return imgarray.count
 }
 
 override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
 
 if let cell = self.imgtbl.dequeueReusableCell(withIdentifier: "csmcell") as? csmcell{
 
 let imgurl = URL(string : imgarray [(indexPath as NSIndexPath).row].imgurl)
 
 cell.imgiv.sd_setImage(with: imgurl)
 
 return cell
 }else{
 
 let imgurl = URL(string : imgarray [(indexPath as NSIndexPath).row].imgurl)
 
 let cell = csmcell()
 
 
 cell.imgiv.sd_setImage(with: imgurl)
 
 
 return cell
 }
}
 func loaddatawithquery(){
 
 
 let whereClause = "catogary ='telecom'"
 let dataQuery = BackendlessDataQuery()
 dataQuery.queryOptions.pageSize=50
 dataQuery.whereClause = whereClause
 backendless.data.of(Images.ofClass()).find(dataQuery,response: {(result: BackendlessCollection?) -> Void in
 let data = result?.getCurrentPage()
 
 for obj in data! as! [Images] {
 
 self.imgarray.append(obj)
 
 self.imgtbl.reloadData()
 }
 },
 error: { (fault: Fault?) -> Void in
 let alert = UIAlertController(title: "info", message:"يرجى الاتصال بالانترنيت", preferredStyle: .alert)
 alert.addAction(UIAlertAction(title: "OK", style: .default) { _ in
 let viewController = self.storyboard?.instantiateViewController(withIdentifier: "mainmenu") as! Main_Menu
 self.navigationController?.pushViewController(viewController, animated: true)
 })
 self.present(alert, animated: true){}
 
 
 })
 }
}

Note : I have test my app versions on both simulator and real devices with no crash issues before submitting, i even run it under the Hot Spot of iPV6 recommended by Apple in this link https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1
and its also run with out a crash !! (apple review team reported that my app crashes on offline and wifi connection when pressing on the button)
now i really confused what is the main cause of this IPV6 crash , if any 1 had the same issue and solve it any ideas would be much appreciated

We need to investigate this issue. Internal task BKNDLSS-13304 is created.

Backendless SDK uses high-level networking frameworks ( NSURLRequest, NSURLConnection). They are recommended by Apple as supporting ipv6. And the calls to Backendless don’t crash.
So we suppose, that a cause of the issue is somewhere in your code, maybe in SDWebImage Library, which you use for image downloading.

I know you are guys doing a great job their , but i think apple recommending the use of NSURLSession instead of NSURLConnection & Request , any way i have failed in symbolicated crash log so i have no other chance to figure out the issue than make my app use only the backendless to download some text form the database . i f its pass the review then it will be definitely by SDWebImage library .

i will update after trying

BR

Hi Vyacheslav ,

my app issue seems not related to networking , after creating a n adhoc distribution and install it on real device there was a crash on my app when i press the button of loading data (even on IPV4 connection).
i have 2 days of searching the main reason of that crash and finally when i remove the loaddatawithquery() function the app didn’t crash !!
i made another tableview to display the imgesURL in a label with out the SDImage library and it has been crashed again when trying to load the data from backendless
i post a question on stackoverfolw and almost of the answers was about the force downcasting in my code

let data = result?.getCurrentPage() as! [Images]

i have seen your replays on below problem as well

http://support.backendless.com/t/app-store-release-problem

so i updated my cocoapod and re install Backendless v 3.0.43 to check again

and i end up with Use of unresolved identifier ‘Backendless’ error !! and couldn’t complete my test
i have create another project from the start and the same error just pop up , any way this could be a temporary issue but i really need to fix the crash issue caused by the casting
i have uploaded my project for u u can find it on below link

thank u and i’m waiting ur feedback

https://www.dropbox.com/s/0l9auov8jwudqv8/Updated%20Horizon%20Wave.zip?dl=0

See this README:

If you use Swift, add to your bridging header file the following

a. for ‘Backendless-ios-SDK’:

#import “Backendless.h”

#import “MediaService.h”

b. for other pods:

#import “Backendless.h”

If you don’t have your briging header file, set “Build Settings → Swift Compiler … → Objective-C Bridgeing Header” (SWIFT_OBJC_BRIDGING_HEADER) option

a. for ‘Backendless-ios-SDK’:

${PODS_ROOT}/Headers/Public/Backendless-ios-SDK/Backendless-With-Media-Bridging-Header.h

b. for other pods:

${PODS_ROOT}/Headers/Public/Backendless/Backendless-Bridging-Header.h

http://support.backendless.com/public/attachments/718d54d23e5fca56f166730bd840da29.png</img>

Hi Man , I have test my app with the new SDK and the crash issue is gone !! but i also noticed that after updating the SDK version the app registration for notifications is not working any more i have deleted my app and re install the old version with old Backendless v 3.0.28 and the registration works !! plz could u investigate this because

i didn’t change any thing related to notifications code

    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        backendless?.initApp(appid, secret:secretkey, version:appversion)
        backendless?.messaging.registerForRemoteNotifications()
        return true
    }
    
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        //backendless?.messaging.registerDeviceToken(deviceToken,responder:nil)
        backendless?.messaging.registerDeviceToken(
            deviceToken,
            response: {(result: String?) -> () in
                print("Device has been registered: \(result)")
            },
            error: { (fault : Fault?) -> () in
                print("Server reported an error: \(fault.debugDescription)")
        })
        
    }
    
    func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
        print("%%%%%%%%%%%%%%%%%%%%%%% \(error.localizedDescription)")
    }

note : according to apple notifications registeration take 24 hours to take place for the same app if it has been deleted or already been authenticated for notifications i had wait for 2 days before writing my replay

We cannot reproduce this issue with our sample project (see in attachment) and pod 3.0.43. Devices are registered, push notifications are received. Could you check our project with your bundle id, cert and backendless app?

Could you provide you sample project which demonstrates the problem (here or to support@backendless.com)

TestS3PushNotify.zip (19.31MB)

Mriyadh,

Could you please run the project Vyacheslav shared in the previous response and see if it works for you?

Regards,
Mark

Hi Mark,

first i noticed that apple made a lot of changes for the notification on IOS 10 + i saw that there is a lot of new functions has been added to the notifications in the test project to support IOS 10 which has not been mentioned in your documents i think !!.
if there is any updated functions and procedure that we have to add to our apps please to update the documentations which i think will save us both a lot of time

i have run the test project after changing the bundle id and project id,secret …keys , the registration is done but the publishing is not working
i have made a simple project and email it to ur support team under the subject

Push Notifications Registeration is not working after updating the SDK to 3.0.43

BR