I already have analytics enabled and working
i have added:
#import "FlurryAdDelegate.h"
#import "FlurryAppCircle.h"
#import "FlurryOffer.h"
#import "FlurryAnalytics.h"
this line throws this error -Use of undeclared identifier "FlurryAPI":
[FlurryAPI setAppCircleEnabled:YES];
The right call for that is [FlurryAppCircle setAppCircleEnabled:YES];
I don't think there's a FlurryAPI class at all.
See sample code at the Flurry documentation site.
Are you sure you imported the class that has FlurryAPI? Did you follow all the instructions for flurryAPI? If that was all you needed to import you most likely need to create a string (or whatever flurry uses!)
Another thing is, you could have possibly forgot to import the framework!
Related
I'm trying to import my speech recognition framework into my project. Sadly my project is in Swift and speech rec is in objc. I don't see a problem with this. I have created a bridging header file before importing the framework and compiled to make sure it has no errors. Then I dragged the framework into my project. Got a successful compile again. Now I type this in my header file:
#ifndef Bridging_Header_h
#define Bridging_Header_h
#import "SpeechKit/SpeechKit.h"
#endif
And then I get the error: "SpeechKit/SpeechKit.h" file not found
I have tried reimporting the framework. Deleting and making a new header file etc. Nothing seems to work. I don't get why it's not picking up the header files from the framework.
Does anyone have any ideas? All help would be greatly appreciated.
Thank you so much.
Try #import "SpeechKit.h" or #import <SpeechKit/SpeechKit.h> instead #import "SpeechKit/SpeechKit.h"
use #import <SpeechKit/SpeechKit.h> in bridging header and don't forget to place import SpeechKit in your swift file
So after an hour of research, I've found that most people seem to agree that the function at http://www.thismuchiknow.co.uk/?p=71 is the way to go for implementing a Haversine function into an iPhone project for ordering results by distance when you have a database full of latitudes and longitudes. There seems to be little help on how to actually include it in your project though, and I'm having no luck on my own.
No matter where I add the function into my ViewController.m file, I get the error expected ')' before '*' token. Some people have mentioned you need to put static void distanceFunc(sqlite3_context *context, int argc, sqlite3_value **argv); into your .h file, but I get the same error there too.
Can anyone provide a brief example of including this function in an iPhone project?
your can use this,
+(void)distanceFunc(sqlite3_context *context, int argc, sqlite3_value **argv);
or change .m extention of your viewController file to .mm.(You can try this one also)
updated
+(void)distanceFunc:(sqlite3_context *)context arg1:(int)argc arg2:(sqlite3_value **)argv;
try updated one.
Thanks,
There should be no problem with inserting the code in the link you gave anywhere in a .m file. If you are getting the error on the function definition line, it is likely that the compiler doesn't know what an sqlite3_context is. This means you haven't include the sqlite3.h header in your .m file.
Ok, so my problem was a combination of not using #import <sqlite3.h> and not adding the libsqlite3.0.dylib framework to my project. As far as where to place the function from http://www.thismuchiknow.co.uk/?p=71, I put it between my #import tags and #synthesize in my controller's .m file, appearing just as it does in the blog post.
I am using iAd in my iphone 4.0 application but after adding the ADBannerView on view and when i try to set the ADBannerView properties using below code :-
adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
I get the below error message:-
error:
'ADBannerContentSizeIdentifier320x50'
undeclared (first use in this
function)
and i also check the sample provided by apple "iAdSuite" i get the same error in this sample.
so can any one suggest how i solve this issue.
Thanks
Make sure you have imported the iAds Franework and included the import statement.
#import <iAd/iAd.h>
Not just the header, add the Framework. In Frameworks on the left, cmd-click, choose Add Existing Frameworks, select the iAd framework.
So I suspect this to be a project problem as opposed to a code problem. I am still relatively new to xcode. I am trying to access the ABAddressBook libraries and have included them in the project alright.
![alt text][1][1]: http://i.stack.imgur.com/lBaW0.png
Now when I try to say import "ABAddressBook.h", it doesn't know what I am talking about. Is there anything else I need to do to get that set up? Thanks!
Try
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>
You have to import two frameworks one is the
AddressBook and the other is AddressBookUI and then you have to import those files into your viewController subclass file and you are done
Can anyone please help me to solve the following error:
Error cannot find interface declaration for 'NSManagedObject', superclass of
Try
#import <CoreData/CoreData.h>
Are you missing an include statement?
Are you subclassing NSManagedObject? If so, go here in Apple's documentation and scroll to Xcode Generated Subclasses. They give you instructions to have Xcode generate class files from your data model.
A suggestion: Core Data is rather difficult, and you should be comfortable with iPhone development before you start working with it.
import CoreData to your xxx-Bridging-Header.h will make sense.