Posts

Post not yet marked as solved
2 Replies
No, App Store Connect API doesnt provide any endpoint to create an APNS key. The only method which apple provides to create one is through the App Store Connect portal. So even if any third-party solution is available, you will need to give them access to an account which is of at least ’App Manager’ role. I will not be comfortable in giving a third-party service such power for just creating an APNS key.
Post not yet marked as solved
4 Replies
I faced "Invalid update: Invalid number of rows" in iOS 16.4 alone when I added newly obtained data from a pagination API call to the data source and performed performBatchUpdates with empty updates closure to add the rows to my CollectionView. The issue persisted even after trying to update my data source within the updates closure of performBatchUpdates. I fixed this issue by manually creating indexpaths for the newly added data in datasource and appending the created indexpath array to the collectionView's index path. Here is the code for the same :- extension UICollectionView { func refreshCollectionView(from: Int, to: Int, completionHandler: (() -> Void)? = nil) { if from > to { print("'from' index is greater than 'to' index") return } self.performBatchUpdates({ [weak self] in if from < to { var indexpathArray: [IndexPath] = [] for index in from...to { let indexpath = IndexPath(row: index, section: 0) indexpathArray.append(indexpath) } self?.insertItems(at: indexpathArray) } else if from == to { self?.insertItems(at: [IndexPath(row: from, section: 0)]) } }, completion: {_ in if let completionHandler = completionHandler { completionHandler() } }) } }