Undefined symbol trying to link XCTest target - swift

I am trying to test my application that uses Core Data. In order to test the my "save" method, I am using XCTNSNotificationExpectation for the notification NSManagedObjectContextDidSave, as shown below.
However, when I run it, I get the following errors.
I have other test files that test synchronous methods, which work perfectly if I comment this file, so I think the problem is with the notification or the expectation.
Could someone help me please?
Thank you!

The error states that it couldn't find the API NSManagedObjectContextDidSave which belongs to Core Data
You have to import the framework
import CoreData

Related

OroCRM: import csv contacts function not working. How do I fix it?

I'm stumped at first post with OroCRM because I can't import data. I've tried using the template to test an import but it just tells me "Import started successfully. You will receive an email notification upon completion." and then I get nothing back. No new records are visible. I don't get any statistics back from the import attempt either to tell me nothing has been imported.
There's no step-by-step manual for the community version so would really appreciate some noob-friendly pointers on the basics!
If it's a local instance, make sure the message consumer is running and validate the email transport configuration.

Parse class not created through swift code

I am experiencing an issue when I try to create a new parse class through swift. My code for creating a new class is the following:
let query = PFQuery(className: "newClass")
The issue is that a "newClass" class is not created in my Parse dashboard and I don't get an error message. And since some other code is dependent on retrieving information from this class the app does not function properly.
I have created classes through swift previously and have never run into this problem. I also know that I can create a new class directly through Parse, but that doesn't really help me since there seems to be an issue with the connection between my swift code and Parse.
Thank you in advance for any help!
Is Allow client class creation turned on?
Try using PFObject to create the new class
PFObject(className: "yourNewClass")
I managed to solve it to some extent. After quite some while I got the idea to try to simulate the app on my iPhone instead of only on the simulator that xcode provides. For some reason everything then worked as planned... This is good news for me, but I would like to know why xcode couldn't do it.
Thanks for taking time and giving me some tips Brett!

PFUser registration error when using Swift

I used Parse lots of times before. We have a complicated relation with it. Now I'm in the hate phase of our relation. Just downloaded the latest SDK, linked it with my project and put the sample code to test if the integration works. It didn't. Here's what I did: https://parse.com/apps/quickstart#parse_data/mobile/ios/swift/existing
I did nothing other than copying and pasting the sample code into my project. This is the error I get, I know many of you already know this error:
PFUser must be registered with registerSubclass before using Parse
Note that I didn't subclass PFUser yet.

iphone coredata with two xcdatamodel

I've been working with core data (successfully ;) , following some tutorials and kind of getting all, but now I have a question about some basic tutorial I found some time ago (the author is not responding so here we go!)
this is the tutorial, and the code for it is here
in this tutorial, there are 2 xcdatamodels??, why? what is the timeStamp on the Event does?? I checked it in sqlitemanager, and after creating some data, timestamp doesnt save anything,
so was it a mistake to leave the Event entity? with its datamodel?
or is there something Im missing?
thank you!
It looks like CoreDataTutorialPart1.xcdatamodel (the model file containing the Event entity) was auto-generated by the Core Data Xcode template and isn't actually used anywhere in the project.

OCUnit will not allow me to use my own data types

I am using XCode 3.2.2 to unit test some custom data types. The tests run properly without those data types, but when I use said data types, I get this error:
"_OBJC_CLASS_$_classname", referenced from:
(where "classname" is the, well, class name...)
I have seen hints online that it could be linker related. The strange thing is, I originally followed these instructions http://www.mobileorchard.com/ocunit-integrated-unit-testing-in-xcode/ and they worked for me the first time I tried them. Now, after following the same instructions, I'm getting the same error. Any help would be greatly appreciated.
Thanks!
-Matt
Unfortunately your question is pretty ambiguous.
First, is the example working given in the mentioned tutorial?
Second, I'd double check your code:
Right click the class (.m) you're trying to use with OCUnit and click get info. Make sure the target in the class file is pointing to OCUnit! This is key for the linking.
Are you importing your .h for the associated class in the test case?
Check the spelling of the class names?