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){}
})
}
}
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 .
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
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
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)
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