Posts

Post not yet marked as solved
0 Replies
188 Views
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
Posted Last updated
.
Post marked as solved
3 Replies
10k Views
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
248 Views
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
167 Views
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
Posted Last updated
.
Post not yet marked as solved
1 Replies
176 Views
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
Posted Last updated
.
Post not yet marked as solved
0 Replies
174 Views
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
Posted Last updated
.
Post not yet marked as solved
2 Replies
378 Views
I am on a MBA 2013 running Big Sur. I'm trying to learn swift UI and have just one file with SwiftUI code that loads a List. However, I'm unable to get a preview. The activity indicator goes on and on and the CPU usage is 100%, also affecting all other activity like browsing and keyboard input. Even when I used storyboard a few weeks back, when navigating to the storyboard file from any other file in Xcode, I see activity indicator and it takes a while to load the storyboard. In case of the SwiftUI preview, it simply fails after the activity period. Overall, my mac takes about few seconds to launch apps. But from what I read on the internet thats normal for ssd's to slow down over time. Could something be wrong. Have tried reboots. Or is it just an old mac?
Posted Last updated
.
Post marked as solved
1 Replies
281 Views
In my application with deployment target ios 14.0 and iphone only, neither app delegate methods like applicationDidEnterBackground or applicationDidEnterForeground, Nor, scenedelegate methods sceneWillEnterForeground or sceneDidBecomeActive are called. I checked it on ios 14.3 simulator for iPhone Se 2020 and also on my iPhone Se 2020 running iOS 14.4.2 What could I be doing wrong?
Posted Last updated
.
Post not yet marked as solved
2 Replies
575 Views
I am using statistical collection queries to query data like steps, average walking speed, etc, from the health kit store. Following is my initial result handler code... NSCalendar *calendar = [NSCalendar currentCalendar];     NSDate *endDate = date;     NSDate *startDate = [calendar dateByAddingUnit:NSCalendarUnitYear                                              value:-1                                             toDate:endDate                                             options:0];     [yearlyResults enumerateStatisticsFromDate:startDate                                   toDate:endDate                                withBlock:^(HKStatistics *result, BOOL *stop) {          if (identifier== HKQuantityTypeIdentifierWalkingSpeed) {         HKQuantity *quantity = result.averageQuantity;         value = [quantity doubleValueForUnit:[HKUnit countUnit]];     }              }]; In the last line of code I get the following error message... 'Attempt to convert incompatible units: m/s, count' Even Meter unit doesn't work. I need to know which is the right HKUnit to get walking speed.
Posted Last updated
.
Post not yet marked as solved
17 Replies
3.7k Views
my call makes a call to HKSampleQuery method initWithSampleType that queries information from healthkit store. I want the main thread to wait until the the query is over so that the block handler updates the global variables in the custom class.I understand concurrency but haven't used it enough. Please help me with this one.my code goes like this...[self methodone]; do something based on result -(void)methodone { api call with blockhandle { set result to global variables in block}; }
Posted Last updated
.
Post not yet marked as solved
0 Replies
212 Views
In my healthkit based app I am thinking of using HKWorkout object. Steps taken, energy burned and other data are late and cannot be saved at the time of creating the workout. The documentation says HKworkout objects are immutable. how do I update data that is late? Should i wait for the relevant data and then create the object, or, is there a better way? Thanks. Neerav
Posted Last updated
.