Ios Swift-应用商店拒绝-部分应用转发器重新提取thunk helper
我的应用程序被苹果拒绝了。作为一个临时构建的系统,它工作得非常好,但当苹果进行测试时,它崩溃了。任何帮助都将不胜感激 im获取的错误为(崩溃日志): 我的密码是-Ios Swift-应用商店拒绝-部分应用转发器重新提取thunk helper,ios,swift,thunk,Ios,Swift,Thunk,我的应用程序被苹果拒绝了。作为一个临时构建的系统,它工作得非常好,但当苹果进行测试时,它崩溃了。任何帮助都将不胜感激 im获取的错误为(崩溃日志): 我的密码是- func sendUpdate(){ //Activity Indicator activityIndicator = UIActivityIndicatorView (frame: CGRectMake (0, 0, 50, 50)) activityIndic
func sendUpdate(){
//Activity Indicator
activityIndicator = UIActivityIndicatorView (frame: CGRectMake (0, 0, 50, 50))
activityIndicator.center = self.view.center
activityIndicator.hidesWhenStopped = true
activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray
view.addSubview(activityIndicator)
activityIndicator.startAnimating()
UIApplication.sharedApplication().beginIgnoringInteractionEvents()
//Make request to server
var request = NSMutableURLRequest(URL: NSURL(string: "http://******(actual site value hidden)/sendUpdate.php")!)
request.HTTPMethod = "POST"
var todaysDate:NSDate = NSDate()
var dateFormatter:NSDateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "MMMM dd, yyyy"
var date:String = dateFormatter.stringFromDate(todaysDate)
println(date)
dateFormatter.dateFormat = "h:mm a"
var time:String = dateFormatter.stringFromDate(todaysDate)
println("The time is \(time)")
let id = NSUserDefaults.standardUserDefaults().objectForKey("id") as! String!
println(id)
let postString = "adminId=\(id)&date=\(date)&time=\(time)&site1=\(siteDescriptions[0])&site2=\(siteDescriptions[1])&site3=\(siteDescriptions[2])&site4=\(siteDescriptions[3])&site5=\(siteDescriptions[4])&site6=\(siteDescriptions[5])&site7=\(siteDescriptions[6])&site8=\(siteDescriptions[7])&site9=\(siteDescriptions[8])&site10=\(siteDescriptions[9])&site11=\(siteDescriptions[10])&site12=\(siteDescriptions[11])&site13=\(siteDescriptions[12])&site14=\(siteDescriptions[13])&site15=\(siteDescriptions[14])&site16=\(siteDescriptions[15])&site17=\(siteDescriptions[16])&site18=\(siteDescriptions[17])&site19=\(siteDescriptions[18])&site20=\(siteDescriptions[19])&site21=\(siteDescriptions[20])&site22=\(siteDescriptions[21])&site23=\(siteDescriptions[22])&site24=&site25="
println("\(postString)")
request.HTTPBody = postString.dataUsingEncoding(NSUTF8StringEncoding)
let task = NSURLSession.sharedSession().dataTaskWithRequest(request) {
data, response, error in
dispatch_sync(dispatch_get_main_queue()){
self.activityIndicator.stopAnimating()
UIApplication.sharedApplication().endIgnoringInteractionEvents()
}
if error != nil {
println("error=\(error)")
let alert = UIAlertController(title: "Alert", message: "Please check your internet connection", preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "Ok", style: .Cancel, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
return
}
var err: NSError?
var json = NSJSONSerialization.JSONObjectWithData(data, options: .MutableContainers, error: &err) as? NSDictionary
// Did the JSONObjectWithData constructor return an error? If so, log the error to the console
if(err != nil) {
println(err!.localizedDescription)
let jsonStr = NSString(data: data, encoding: NSUTF8StringEncoding)
println("Error could not parse JSON: '\(jsonStr)'")
let alert = UIAlertController(title: "Alert", message: "Something went wrong. Please try again later.", preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "Ok", style: .Cancel, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
}
else{
if(json!["status"] as! String == "success"){
//Message went successfully
let alert = UIAlertController(title: "Success", message: "Updates sent successfully", preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: {
action in
self.performSegueWithIdentifier("backToList", sender: self)
// siteDescriptions = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
// self.listTableView.reloadData()
}))
self.presentViewController(alert, animated: true, completion: nil)
}else{
var message = json!["message"] as! String!
let alert = UIAlertController(title: "Alert", message: message, preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "Ok", style: .Cancel, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
}
}
}
task.resume()
}
下面代码段的最后一行是第109行-
alert.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: {
action in
self.performSegueWithIdentifier("backToList", sender: self)
// siteDescriptions = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
// self.listTableView.reloadData()
}))
self.presentViewController(alert, animated: true, completion: nil)
由于无法解决这个问题,我向苹果审查小组提出了上诉。不久之后,他们批准了该应用程序,现在该应用程序已在应用程序商店上线 希望这对其他人有帮助
alert.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: {
action in
self.performSegueWithIdentifier("backToList", sender: self)
// siteDescriptions = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
// self.listTableView.reloadData()
}))
self.presentViewController(alert, animated: true, completion: nil)