Post

Replies

Boosts

Views

Activity

UIKeyCommand only for hardware keyboards?
UIMenu documentation uses UIKeyCommand to make a UIMenu. I made one for a UIBarButtonItem. UIKeyCommand documentation says Key command sequences are generated only for devices with an attached hardware keyboard. But it's working fine on my iPhone SE. I don't understand this. Can some explain please? Thanks.
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
803
Aug ’22
Pulldown Menu won't show in BarButtonItem even while showMenuAsPrimaryAction is selected.
I have set up a pulldown button in the navigation bar which automatically got embedded in a UiBarButtonItem. Menus have been set up from interface builder itself. since UIBarbuttonItem doesn't have a showMenuAsPrimaryAction property. Now when I run the code on device or simulator, I don't see the menu pop up. Neither on tap nor or long press. I don't know what I'm doing wrong. Please see the screenshot of storyboard. The button has no title just an Image which is not seen when double clicked on it (to reveal the menu) in interface builder. So don't be confused with the empty white space in place of the button.
2
0
923
Aug ’22
Train ML model via Test flight beta app and retrieve model for integration in release version?
The release version of my app will Not collect user data. I wanted to know if I can ask for users permission to collect trained ml models based on beta users data on test flight after presenting them the necessary documentations like privacy policy. I also don’t want the user to be able to use the beta app if they don’t agree to it. are these two things possible? Thanks
0
0
775
Apr ’22
app has black screen on device. works fine on simulator. no error messages.
macOS 10.15.3xcode 11.3.1 device iphone 6 iOS 12.4.5development target iOS 12problem - app shows launch screen and then shows a black screen without any UI.the app works fine on simulator ios 13 iphone 8. the app worked fine on the device until i accidentally deleted scene delegate, which I have added since.there are no error messages and the app hasn't crashed.what troubleshooting could i do.
Topic: UI Frameworks SubTopic: UIKit Tags:
3
1
18k
Jan ’22
Old local persistent store to new CloudKit store- lightweight migration
I have a new model which syncs to cloudkit. I'have to migrate my old core data store which is local to the new model which will store in cloudkit. I'm not sure how to perform this migration. The container is initialised correctly and the Mapping Model is mapping my entities and attributes correctly. There are no errors. Yet, I do not see my old records upon fetching. I found this lines of code here... NSDictionary *optionsDictionary = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, <#Ubiquitous content name#>, NSPersistentStoreUbiquitousContentNameKey, nil]; However, I'm not sure where to add it. Since, I had created a new project folder with core data + CloudKit (and imported the old model), this is the method i got in AppDelegate which initialises the store... - (NSPersistentCloudKitContainer *)persistentContainer {     // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it.     @synchronized (self) {         if (_persistentContainer == nil) {             _persistentContainer = [[NSPersistentCloudKitContainer alloc] initWithName:@"Expenses"];             [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) {                 if (error != nil) {                     NSLog(@"Unresolved error %@, %@", error, error.userInfo);                     abort();                 }             else #ifdef DEBUG                     NSLog(@"Store successfully initialized"); #endif             }];         }     }     return _persistentContainer; } Please help, Thanks.
5
0
879
Jan ’22
Cannot create an inferred NSMappingModel with a nil source model
I'm trying to see if the mapping of my two models is inferred using lightweight migration. This is because I'm not able to retrieve entities created using old model. I get empty array upon fetching. The code I've written is as follows... NSError *error; NSManagedObjectModel *expensesModel1 = [[NSManagedObjectModel alloc] initWithContentsOfURL:expensesModel1URL];  NSManagedObjectModel *expensesModel2 = [[NSManagedObjectModel alloc] initWithContentsOfURL:expensesModel2URL]; NSMappingModel *mappingModel = [NSMappingModel inferredMappingModelForSourceModel:expensesModel1 destinationModel:expensesModel2 error:&error]; Now, both URLs are set, i.e., they are not Nil. But, both the NSManagedObjectModel objects (expensesModel1, expensesModel2 )remain nil. The error I get is... 2021-12-28 14:39:21.226111+0530 Expenses Pro[2248:634959] [error] error:  Failed to load model as no file exists at path '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' CoreData: error:  Failed to load model as no file exists at path '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' 2021-12-28 14:39:21.226201+0530 Expenses Pro[2248:634959] [error] error: Unable model at path (file is zero bytes) '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' CoreData: error: Unable model at path (file is zero bytes) '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' I get a similar 4 line error for the destination model Expenses 2.xcdatamodel What is the issue here? Neerav
0
0
653
Dec ’21
No results (empty array) on fetching entity after lightweight migration
I have used lightweight migration and there are no errors in loading the new store but when i fetch an entity i get an empty array. What could be the reason? there is something worth considering. The old store had an entity A which had a relationship with entity B and C, both or which are no longer included in the new model. Just incase such a thing could be a issue. Thanks. Neerav
1
0
739
Dec ’21
API for event ‘Repeat’ scheduler for iOS app.
I am looking for an API that lets user schedule an auto repeat of a user generated event. Basically repeat adding of a new entry of user data, based on the current one where in Repeat has been selected. The scheduler should have predefined time intervals like daily, monthly, etc., apart from a calendar view to select dates or time ranges. Even if I can know what such kind of an API is called, it would be of great help. Thank you. Neerav
0
0
531
Nov ’21
UIKeyCommand only for hardware keyboards?
UIMenu documentation uses UIKeyCommand to make a UIMenu. I made one for a UIBarButtonItem. UIKeyCommand documentation says Key command sequences are generated only for devices with an attached hardware keyboard. But it's working fine on my iPhone SE. I don't understand this. Can some explain please? Thanks.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
803
Activity
Aug ’22
Pulldown Menu won't show in BarButtonItem even while showMenuAsPrimaryAction is selected.
I have set up a pulldown button in the navigation bar which automatically got embedded in a UiBarButtonItem. Menus have been set up from interface builder itself. since UIBarbuttonItem doesn't have a showMenuAsPrimaryAction property. Now when I run the code on device or simulator, I don't see the menu pop up. Neither on tap nor or long press. I don't know what I'm doing wrong. Please see the screenshot of storyboard. The button has no title just an Image which is not seen when double clicked on it (to reveal the menu) in interface builder. So don't be confused with the empty white space in place of the button.
Replies
2
Boosts
0
Views
923
Activity
Aug ’22
Train ML model via Test flight beta app and retrieve model for integration in release version?
The release version of my app will Not collect user data. I wanted to know if I can ask for users permission to collect trained ml models based on beta users data on test flight after presenting them the necessary documentations like privacy policy. I also don’t want the user to be able to use the beta app if they don’t agree to it. are these two things possible? Thanks
Replies
0
Boosts
0
Views
775
Activity
Apr ’22
app has black screen on device. works fine on simulator. no error messages.
macOS 10.15.3xcode 11.3.1 device iphone 6 iOS 12.4.5development target iOS 12problem - app shows launch screen and then shows a black screen without any UI.the app works fine on simulator ios 13 iphone 8. the app worked fine on the device until i accidentally deleted scene delegate, which I have added since.there are no error messages and the app hasn't crashed.what troubleshooting could i do.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
3
Boosts
1
Views
18k
Activity
Jan ’22
Old local persistent store to new CloudKit store- lightweight migration
I have a new model which syncs to cloudkit. I'have to migrate my old core data store which is local to the new model which will store in cloudkit. I'm not sure how to perform this migration. The container is initialised correctly and the Mapping Model is mapping my entities and attributes correctly. There are no errors. Yet, I do not see my old records upon fetching. I found this lines of code here... NSDictionary *optionsDictionary = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, <#Ubiquitous content name#>, NSPersistentStoreUbiquitousContentNameKey, nil]; However, I'm not sure where to add it. Since, I had created a new project folder with core data + CloudKit (and imported the old model), this is the method i got in AppDelegate which initialises the store... - (NSPersistentCloudKitContainer *)persistentContainer {     // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it.     @synchronized (self) {         if (_persistentContainer == nil) {             _persistentContainer = [[NSPersistentCloudKitContainer alloc] initWithName:@"Expenses"];             [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) {                 if (error != nil) {                     NSLog(@"Unresolved error %@, %@", error, error.userInfo);                     abort();                 }             else #ifdef DEBUG                     NSLog(@"Store successfully initialized"); #endif             }];         }     }     return _persistentContainer; } Please help, Thanks.
Replies
5
Boosts
0
Views
879
Activity
Jan ’22
Cannot create an inferred NSMappingModel with a nil source model
I'm trying to see if the mapping of my two models is inferred using lightweight migration. This is because I'm not able to retrieve entities created using old model. I get empty array upon fetching. The code I've written is as follows... NSError *error; NSManagedObjectModel *expensesModel1 = [[NSManagedObjectModel alloc] initWithContentsOfURL:expensesModel1URL];  NSManagedObjectModel *expensesModel2 = [[NSManagedObjectModel alloc] initWithContentsOfURL:expensesModel2URL]; NSMappingModel *mappingModel = [NSMappingModel inferredMappingModelForSourceModel:expensesModel1 destinationModel:expensesModel2 error:&error]; Now, both URLs are set, i.e., they are not Nil. But, both the NSManagedObjectModel objects (expensesModel1, expensesModel2 )remain nil. The error I get is... 2021-12-28 14:39:21.226111+0530 Expenses Pro[2248:634959] [error] error:  Failed to load model as no file exists at path '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' CoreData: error:  Failed to load model as no file exists at path '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' 2021-12-28 14:39:21.226201+0530 Expenses Pro[2248:634959] [error] error: Unable model at path (file is zero bytes) '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' CoreData: error: Unable model at path (file is zero bytes) '/Users/neeravkothari/Current Project/Expenses Pro v2/Expenses Pro/Expenses Pro/Model/Core Data/Expenses.xcdatamodeld/Expenses.xcdatamodel' I get a similar 4 line error for the destination model Expenses 2.xcdatamodel What is the issue here? Neerav
Replies
0
Boosts
0
Views
653
Activity
Dec ’21
No results (empty array) on fetching entity after lightweight migration
I have used lightweight migration and there are no errors in loading the new store but when i fetch an entity i get an empty array. What could be the reason? there is something worth considering. The old store had an entity A which had a relationship with entity B and C, both or which are no longer included in the new model. Just incase such a thing could be a issue. Thanks. Neerav
Replies
1
Boosts
0
Views
739
Activity
Dec ’21
API for event ‘Repeat’ scheduler for iOS app.
I am looking for an API that lets user schedule an auto repeat of a user generated event. Basically repeat adding of a new entry of user data, based on the current one where in Repeat has been selected. The scheduler should have predefined time intervals like daily, monthly, etc., apart from a calendar view to select dates or time ranges. Even if I can know what such kind of an API is called, it would be of great help. Thank you. Neerav
Replies
0
Boosts
0
Views
531
Activity
Nov ’21