Skip to main content

All Questions

Tagged with
1 vote
1 answer
952 views

application(:didFinishLaunchingwithOptions:) does not get called if apps is killed and opened immediately

I have noticed that if I kill the app from the multitasking view and open it immediately application(:didFinishLaunchingwithOptions:) lifecycle method is not called but the sceneDelegate's scene(:...
Nikhil Muskur's user avatar
1 vote
1 answer
2k views

How do I initialize the Core Data's persistent container in AppDelegate and use it throughout the app?

I'm trying to use NSPersistentContainer in a number of view controllers throughout the app for Core Data. Initially, I had set up the container in a single view controller, which worked fine: First ...
Kevvv's user avatar
  • 4,023
0 votes
0 answers
95 views

fetch core data date as string to display on label

I want my swift code to save 1 date in core data. on lbl1 i want the first core data date to be display. The label should only display the first date saved. Here is my code below which is not working. ...
user avatar
0 votes
1 answer
248 views

Is it possible to create a Fetch Request for core data entities within Scene Delegate for SwiftUI

I'm trying to keep synchronize my core data entities with a webservice i'm using. The issue is the web service updates the items every day, so I'm trying to create a fetch request to compare the ...
Lylaak's user avatar
  • 93
3 votes
1 answer
1k views

Setting Up CoreData with SceneDelegate - unknown identifier 'window' error - iOS 13 onwards

I was trying to use the official apple documentation for Core Data. Found here. I also ran into a question which was related to my issue, right here on stack. I ran into an issue where, it kept ...
Jay's user avatar
  • 3,010
0 votes
1 answer
281 views

save uiimageview to coredata as binary data swift (5)

I am trying to save a imageview as a image to binary data in core data. My code is not working. It has a compile error. In View controller it is not regisitering cdHandler. All i want to do is save ...
user avatar
0 votes
1 answer
22 views

I've embedded my ViewController in a Tab Bar Controller and now my coreDataStack.managedContext fails

My starting app works fine, however now I want to start adding extra functionality so I’ve embedded the initial view (which was already in a Navigation Controller) in a Tab Bar Controller. This when ...
artymis's user avatar
0 votes
0 answers
27 views

convert nsmanganedobject to array to find average of array

My code below fetches a string from core data and finds the sum of the array.I want to know find the average of all of the numbers in the array by dividing the sum by how many items are in the array. ...
user avatar
1 vote
3 answers
1k views

How to use core data into my swift framework

I have to create a reusable framework that is internally use the offline storage for api request, for this i want to use core data, as I am know that for core data using need appdelegate instance. So ...
Sazid Iqabal's user avatar
0 votes
1 answer
33 views

Swift - How to Properly Implement Updating/Setting Up of CoreData for use prior to ViewController loading

My situation is as follows: I will be using CoreData to store/fetch entity instances to be displayed in a tableView. At the start of the app, I have the app check the version of the current library, ...
Zohak Hartoonian's user avatar
0 votes
4 answers
1k views

Unable to save values to Core Data

I am trying to store data to Core-Data in AppDelegate itself and then fetch that data from ViewController. For some reason, it is not getting saved in Core-Data. I have tried searching for this issue ...
Saurabh's user avatar
  • 745
0 votes
0 answers
71 views

Swift: Passing managedObjectContext from AppDelegate to UINavigationController

I have some iOS project (Project) with an @escaping method in the AppDelegate that is used to create the NSPersistentContainer for this project. This method is then called within the ...
ajrlewis's user avatar
  • 3,048
0 votes
1 answer
189 views

uncaught exception 'NSInvalidArgumentException', reason: '-[SubResultComponent setDate:]: unrecognized selector sent to instance 0x60000046b640'

I have an error to which I am not sure on how to fix. Here is there error Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SubResultComponent setDate:]: ...
George Copeland's user avatar
0 votes
1 answer
633 views

Can not cast tabBarController.viewController to UINavigationController

I added an UITabBarController to my storyboard, as I load managedContext in my Appdelegate I want to pass it to my initial ViewController. But I can not cast viewControllers to UINavigationControllers ...
PaFi's user avatar
  • 920
2 votes
1 answer
3k views

Swift 4 ,CoreData: error: Failed to load model named textTabelView

When I using Swift4 in Xcode 9 gives me 2017-11-13 10:17:15.807151+0800 textTabelView[1146:53409] [discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "...
ManlinUp's user avatar

15 30 50 per page