Post

Replies

Boosts

Views

Activity

Xcode terminated due to memory issue
I have a loop which saves caller ids to the call directory extension. If there are too many records to save it will crash and XCode gives the error "Terminated due to memory issue". I've read elsewhere that the correct way to manage large loops is to use autoreleasepool but it doesn't solve the problem in this case. for i in stride(from: rows.count - 1, through: 0, by: -1) { autoreleasepool {    //Separating the contact name from the phone number     let columns = rows[i].components(separatedBy: ",")     //Skip results which don't have both a name and number     if(columns.count == 2){      //Adding record to the call directory       context.addIdentificationEntry(withNextSequentialPhoneNumber: Int64(columns[0])!, label: columns[1])     }   } } If I remove the context.addIdentificationEntry() line then it doesn't crash. Is autoreleasepool used correctly here or is there another way to prevent out-of-control memory usage?
0
0
744
Nov ’22
Error enabling extension Caller ID
I have an app which uses the Call Directory Extension to identify callers. It has been downloaded a few hundred times and a small percentage of users are reporting this error. They are logged in to the app but when they go to phone -> settings -> call blocking & identification they get one of two error messages. "An error occurred while attempting to enable app." "Failed to request data for app. You may try enabling the extension again and if the problem persists contact the application developer." I'm not sure how this could be an issue with the app because it works for the majority of users. Furthermore users still experience the error when I ask them to log in with a test account. One user even reported that they could enable it in settings but a little while later it will disable itself. I have seen similar posts where it's been suggested that the error may be due to bad data (out of order, duplicate contacts, etc) but this error shows before the app even begins to load the data. Does anyone know under what conditions this error popup shows? Many thanks
4
1
2.5k
Apr ’22