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.
Related
I have 3 build configurations, Debug, Release and Development. For Development I have created a new Scheme with a new bundleID, Product name etc so I can see which one is DEV and DEBUG on my phone.
I am using Core Data and for the DEBUG with the original bundleID everything works fine, but when I switch to use the Development one, I get an error when I try to create a new entity with name:
NSEntityDescription.insertNewObject(forEntityName: "MyEntity", into: managedContext)
The error I get:
Could not cast value of type 'NSManagedObject_MyEntity_' (0x600002d62b20) to 'AppName_DEV.MyEntity' (0x102bf9368).
It seems like it is trying to get the MyEntity class from my "AppName DEV" scheme not the "AppName". I can't find any Build Settings where I could point it to use the same model?
Any ideas on how to use core data with multiple build configurations?
Ok, I found the problem. Since I was trying to revive a very old app originally written in swift 2, it occurred to me that I might double check how was the data model created. After hours of tinkering with the core data set up process, I changed 2 things that finally get it to work.
1.) In the .xcdatamodeld file, on the right side in the Data Model Inspector, make sure that you have the Module field EMPTY I had my AppName Inside, which was the same as the original target name.
2.) I added #objc(EntityName) to the NSManagedObject subclass I had.
Of course I cleaned the project, deleted the app from the simulator and installed it again.
If you have an issue like that, hope that whis will help you, good luck!
I was trying to restore a version of a content I am editing.
in my administrator/components/com_joomprosubs/tables/subscription.php
in the construct function I added this following line:
JObserverMapper::addObserverClassToClass('JTableObserverContenthistory',
'JoomprosubsTableSubscription', array('typeAlias' =>'com_joomprosubs.subscription'));
from what I have read in this link:
https://docs.joomla.org/Using_Content_History_in_your_Component
but when I try to restore a version, an error is displayed:
"Error restoring item version from history."
I have followed the procedures step by step from that link. The storing of content history works, the only problem is when I try to restore the older versions. I even downloaded the finished sample file on the link's above.
The error is being return due to the blank value of typeAlias. I don't know where I got it wrong. from the code that I added above, I have included the typeAlias with its corresponding value. The weird thing is, if my code above does not work, it would not been also able to store content history.
Has anybody tried adding versioning in their custom component in Joomla? Please leave your comments.
For now, I temporarily overridden the loadHistory function from the Base Class.
from there, i passed the alias as 'com_joomprosubs.subscription'. The restoring of version history is now working.
Is there a disadvantage in my resolution?
I'm trying to make an app with swift/Obj-c (Bridging Header) with parse.com
So here's my question:
I saw on many sites that you can use Parse.setApplicationId("appid","clientid")
When I try this code it says Use of unresolved Identifier 'Parse'
I imported the framework and set the bridging header in the properties.
I also imported the frameworks which are required like it's written on parse.com
All other Classes/Objects from parse can be used by swift in the code.
This problem was because of a bug in xcode... (I think the compiler failed)
After I restarted Xcode the error was gone.
I am trying to build a simple gwt project that fetches tweets and displays them.The server passes back the tweets of type twitter4j.Tweet to the client.
Both modules import twitter4j.Tweet.
But when I run I get the following error:
--- ERROR: Line 37: No source code is available for type twitter4j.Tweet; did you forget to inherit a required module?.
I seem to have problems in inheriting twitter4j. All the posts I have seen about inheriting a jar file are not clear about how to do so. I understand I must write an inheritance instruction into gwt.xml file, something like
---
but if I try
---
it does not work. Can anyone please explain?
In a post I found on the Web one person suggested not to inherit it but:
-- Don't put twitter4j to your gwt.xml. Just add it your project class path. and make all functionalities like status updating and all in your serviceImpl. Try
This confuses me even more. I have added the jar file to my project libraries. But it does not work
I suspect I am missing something quite elementary here, but I am totally stuck. Is there something like a GWT path?
Many thanks for any help
Keep in mind that everything in your client package is compiled to JavaScript and executed in the user's browser. Thus, you'll only be able to use twitter4j's classes on the server-side of your application; you'll have to create some sort of light-weight GWT-serializable "proxy object" to pass data back and forth between your client and server tiers.
Since you can't use twitter4j on the client side of your app, you will not need anything in your .gwt.xml file referencing it. Instead, you'll add twitter4j to your classpath and do all your updating on the server side (as mentioned toward the bottom of your question). You do mention that it "does not work," but there's not enough information in your question to try to figure out why.
I get warnings in Xode 4 using “imageTitle” as an attribute name for a Core Data entity? In Xcode 3 there was no warning...any idea why?
The exact warning is: Naming Conflict: imageTitle conflicts with a method already on NSObject or NSManagedObject
Very annoying is that I get this warning for every single past Model Version...
Any idea how I get rid of these warnings for past Model Versions?
EDIT: You easily can reproduce this warning, if you create a new project using the "Navigation-based Application" with CoreData support and adding just the attribute "imageTitle"...
I can't answer why imageTitle is specifically targeted. My only guess is that it conflicts with some internal method or core data attribute.
In the past, if you had a core data attribute that used one of the reserved words, Xcode would let you build and your project would display very strange behavior. The most common example is "description". Cocoa assumes that description returns an NSString that describes your object, usually for logging. If you had a dynamically generated core data attribute named description, then bad things would happen. Especially if it was data or transformable.
Current versions of Xcode give the same error dialog if you try to name an attribute description.
While this is irritating, I highly recommend changing your attribute name to something else, such as pictureTitle or imageTitleString. Even though "imageTitle" doesn't get many hits in the documentation, it likely conflicts with something internal.
As a last resort, file a bug with Apple. It may actually just be a bug in Xcode.