Saturday, October 14, 2023
HomeiOS Developmentios - App working when take a look at on system however...

ios – App working when take a look at on system however crash when downloaded from App Retailer


i made app with swift and Xcode utilizing WordPress Web site to fetch information. i’m utilizing relaxation api to fetch information from Web site, my app is working nice on take a look at system however when i add it on app retailer after which it crashes, i discovered this error in my Xcode – organizer

enter image description here

that is how i implement searchbar

@IBOutlet weak var searchBar: UISearchBar!

in viewdid

  searchBar.delegate = self

extension StatusViewController: UISearchBarDelegate {

func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {
    self.searchBar.showsCancelButton = true
    self.collectionView.reloadData()
}

func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
    self.searchBar.textual content = ""
    self.searchBar.showsCancelButton = false
    self.searchBar.endEditing(true)
    self.dismiss(animated: true, completion: nil)
    SVProgressHUD.present()
    sortBy = ""
    web page = 1
    self.fetchPostData { (posts) in
        self.newsData = posts }
    self.collectionView.setContentOffset(CGPoint(x:0,y:0), animated: true)
}

func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
    print("searchText (searchText)")
    
    
}

func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
    print("searchTextclicked (String(describing: searchBar.textual content))")
    
    sortBy = "&search=" + searchBar.textual content!
    web page = 1
     self.fetchPostData { (posts) in
         self.newsData = posts }
    self.collectionView.isUserInteractionEnabled = false
    SVProgressHUD.present()
     self.collectionView.setContentOffset(CGPoint(x:0,y:0), animated: true)
     refreshControl.endRefreshing()
    self.searchBar.endEditing(true)
    
   
}

}

please are you able to inform me the difficulty ?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments