Posts

Post not yet marked as solved
2 Replies
2.8k Views
I am trying to set up a simple core data app. But after I create the NSManagedObject subclasses from the Editor menu I get numerous errors that I do not understand.<unknown>:0: error: filename "Fields2+CoreDataClass.swift" used twice: '/Current Projects/Stages/Stages/CoreData/Fields2+CoreDataClass.swift' and '/Users/me/Library/Developer/Xcode/DerivedData/Stages-bvmokbzazpxlmwaxrpiatcooijvt/Build/Intermediates.noindex/Stages.build/Debug-iphoneos/Stages.build/DerivedSources/CoreDataGenerated/Stages/Fields2+CoreDataClass.swift'<unknown>:0: note: filenames are used to distinguish private declarations with the same nameCommand /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1In the extension for Fields2 I get'Fields2' is ambiguous for type lookup in this contextthen I get@NSManaged only allowed on an instance property or method for all of the properties in Fields2Is this a bug? Or am I doing something wrong? What is going on and how do I fix it?
Posted
by russgum.
Last updated
.
Post not yet marked as solved
1 Replies
911 Views
When I run the CoreDataCloudKitDemo from:https://developer.apple.com/documentation/coredata/synchronizing_a_local_store_to_the_cloudIt works but I get output in the debug area like:CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(2089): <NSCloudKitMirroringDelegate: 0x282248b00>: Executing: <NSCloudKitMirroringDelegateSetupRequest: 0x281b319b0> 5B0647D2-4D0B-4334-AF22-235A1FD29D032019-10-17 10:33:22.978576-0700 CoreDataCloudKitDemo[523:29722] XPC connection interruptedCoreData: debug: CoreData+CloudKit: -[PFCloudKitMetadataModelMigrator calculateMigrationStepsWithConnection:error:](299): Skipping migration for 'ANSCKDATABASEMETADATA' because it already has a column named 'ZLASTFETCHDATE'This is useful for tracking progress of the app but I have no idea where it comes from and whether I could incorporate any of this output into my app to appear to users to enable them to track the progress of syncing their core data to Cloud Kit.
Posted
by russgum.
Last updated
.
Post marked as solved
1 Replies
1.1k Views
How do you reset the cloud kit data? There does not seem to be a reset option in the dashboard. I am still in the development environment working on an app that uses cloud kit and core data.How do you delete a cloudkit container? I am not able to either delete or add a cloudkit container either from Xcode or the dashboard. So I am having to use containers with names like BabiFud from a tutorial I tried years ago. This is anoying and seems that this problem has been around for years and should be fixed by now. Did the engineer in charge of the dashboard code quit years ago and was not replaced?If I can't delete a container or even hide its name in the Home list at least I should be able to add a new container.
Posted
by russgum.
Last updated
.
Post not yet marked as solved
1 Replies
817 Views
I would like to change the text size and font in my table view's section headers. Is there a way to do this in IB or in Swift?
Posted
by russgum.
Last updated
.
Post not yet marked as solved
1 Replies
502 Views
I want to view and edit a MLDataTable. The only way I have figured out to do this is to create a table in numbers edit it and then export it in csv format and then input to a MLDataTable. This is clumsy. After I run the ML I get a suggestion to increase the number of iterations. How do I do this?Then after I run a regression it would be nice to have a clue as to what variables were important to the model.Are there any good examples of using ML regression available?
Posted
by russgum.
Last updated
.
Post marked as solved
5 Replies
3.4k Views
In the following code the alert appears when I tap the alert button. The alert for missing data (bales == 0) from a text field on the same view controller as the button, does not appear.I think this is a problem with the self.present. Self does not appear to be correct abter the checkData() fuunc is called. How do I fix this?The error I get is Warning: Attempt to present <UIAlertController: 0x7fc5bd801400> on <Alert_test.ViewController: 0x7fc5bad122a0> whose view is not in the window hierarchy!TIARussimport UIKit class ViewController: UIViewController { @IBAction func showAlert(_ sender: Any) { showAlert1()//this shows alert } @IBOutlet weak var bales: UITextField! func showAlert1() { let alert = UIAlertController(title: "OOPS", message: "There is a problem with your data entry.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: NSLocalizedString("FIX", comment: "Default action"), style: .default, handler: { _ in NSLog("The \"FIX\" alert occured.") })) self.present(alert, animated: true, completion: nil) } func checkData() { if bales.text == "" { showAlert1() //this does not show alert when bales = "" }} override func viewDidLoad() { super.viewDidLoad() checkData() }
Posted
by russgum.
Last updated
.
Post not yet marked as solved
5 Replies
2.7k Views
How do I set the record id in cloudkit to prevent duplicate records. I am using swift to develop an app.
Posted
by russgum.
Last updated
.
Post not yet marked as solved
3 Replies
1.4k Views
I developed an app which displayed fine on my iphone 6S plus and my Ipad pros. I sent a Test Flight out to my partner and the test flight did not display correctly on his iPhone 6 plus. Next I checked the simulator for a 6S plus and the landscape view for my main page was not correct even though it ws rendering correctly on my test flight version on my iphone 6S plus. The simulator works fine in displaying the simulated iphone x views. This should be the same size class of the 6s plus and the 6s. Since I do not have access to every model of iphone and ipad this makes a big problem in making sure my views are correct in all orientations. Further, since size classes are the norm in interface builder if I fiddle with the layout to get the simulator to work with an iphone 6 plus I wonder what happens to all the other views in the same size class as I can only vary layout by size class.I am using xcode 9.2. Hopefully this problem will be fixed in the next release of X-Code.
Posted
by russgum.
Last updated
.
Post not yet marked as solved
1 Replies
4.1k Views
I am having problems with a core data app. (swift4 xcode 9.2) I thought I would start a new project and copy some of the old files into it. I tried copying the main storyboard and got the following error 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle </var/containers/Bundle/Application/952AF94B-62FA-4AEC-8C94-1E881D52043D/AZ5.app> (loaded)I closed the project and reopened it and got this message. Interface Builder could not open the document Main.storyboard" because it does not exist.I looked in the finder folder for the project in the autosave area and it does exist.I also tried copying the core data model file as well with similar results.The reason I am trying to build a new project is that the origional project was only showing a table for the first set of data added then displayed with fetchedResultsController. Adding aditional data and even restarting the app would not display all of the data.
Posted
by russgum.
Last updated
.
Post not yet marked as solved
2 Replies
2.6k Views
When I debug an error I end up with either the line of code causing the error or a dump with lots of things that are not of much help to me. Is there a way to force the line of code causing the error to show up?
Posted
by russgum.
Last updated
.
Post marked as solved
2 Replies
714 Views
If I am in debug mode running my app from xcloud connected to my iPad, I can fetch records from my private data base. If I disconnect from my iMac I can still fetch records from my private data base. If I install the same version and build using test flight, my testers can not fetch records from their private data base. In fact we are not sure they can upload records to their private data base as well. 1. Is their something that my testers need to do to be able to use their private records. The app is showing up in the list of apps using iCloud in their settings.2. Is there even any way for me to view the logs for the testers private data base activity.
Posted
by russgum.
Last updated
.
Post not yet marked as solved
3 Replies
945 Views
I have two apps in development. I want to share a CloudKit container. I specified a custom continer in the second app to be the container of the first app. The second app still defaults to its default container even though a custom container is selected in the capabilities page. What do I need to do to get this to work? Xcode 9.2 ios 11.2.5
Posted
by russgum.
Last updated
.
Post not yet marked as solved
1 Replies
436 Views
My app creates .pdf files in its documents folder. I need to be able to remove them after one week to keep the users device from filling up with out of date files.So far, I have discovered that the files can only be removed from the class they were written in. Is there a better way of removing files?I am considering a func in the creation class that can be called from my cleanup class to remove out of date files. How to I find the creation date for these files?As a workaround I could store the creation date in CoreData and fetch them with a predicate.
Posted
by russgum.
Last updated
.