[GADObjectPrivate changeState:]: and don't want to add -objC , -all_load - objective-c

I am having the error and it is AdMob crashes with [GADObjectPrivate changeState:]: unrecognized selector.
I know I need to add -objC but if I add, the following consequences occur.
Consequence
I am using Parse SDK and now I don't need to add facebook SDK (because I don't use -objC).
If I add facebook SDK, there are many other problems occur and it might need not to support iphone 3gs, 4,etc.
As a result, I need to know a way to solve this problem without adding -objC and also -all_load. I would like to know how to do.

I have found out a way to do.
Instead of using -objC, I can set to the required library only by using this.
-force_load <library file name>
So, -objC isn't required.

Related

Using categories in iOS 8 frameworks

I am trying to share some code between an app and an extension, using a framework. Mostly this works, but I have several categories that do not seem to load correctly in the extension. For example, I have a category on NSString to reverse the target string, but when I try to use that selector within the extension my code traps with an "unrecognized selector" exception. I tried adding the "-all_load" linker flag, first to just the framework, and then to the extension, to try and force load all the classes implemented in the framework, but this does not seem to work.
Any suggestions would be most welcome...
-David
If I remember correctly you need to set -ObjC in other linker flags in the parent project that is using your library/framework. The -all_load was being used to fix a bug in the -ObjC one, this is not needed anymore.

skpsmtp can not implement on my project

So, I want to send email inside my app, but when I import skpsmtp, there are just tones of errors, I added -ObjC flag, imported CFNetwork.framework, but I just got a lot of errors from ARC, is there any decent way to solve this problem?

Some Parse methods not working in iOS SDK

I added the Parse SDK today (1.2.15) to an existing project which targets iOS7 and is built in Xcode5. I followed the instructions on https://parse.com/apps/quickstart#ios/native/existing exactly. Some things work, like creating and saving a PFObject. Certain functions however cannot be found by the compiler. For instance [PFUser enableAutomaticUser]; generates the error
AppDelegate.m:21:13: No known class method for selector 'enableAutomaticUser'
and [PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions]; generates the error
AppDelegate.m:20:6: Use of undeclared identifier 'PFAnalytics'
Are the docs out of date and have these methods moved? I have tried restarting Xcode and cleaning my project. I can see the PFAnalytics.h file if I expand Parse.Framework in Xcode, and when I look at PFUser.h I can see a declaration of enableAutomaticUser;. Why can Xcode see some Parse classes and methods but not others?
My problem was that Framework Search Paths in Build Settings contained two directories, and one was invalid, resulting in this very strange behavior where some methods in Parse worked and others didn't.

How to create a 2nd app from a 2nd target in XCode?

So I created a simple project, which I can test as an iPhone app. Now I'd like to make a slight variation of it, with an iAd. I was able to duplicate the target and test to the iPhone, by managing schemes (http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Building/Building.html).
The issue is that no matter what scheme I test, I overwrite the other app. I'd like to be able to have two apps
AppName
AppName (Free)
living at the same time on my phone.
I want to avoid duplicating source files, because only the storyboard and the view controller are different, they both use the same images and model otherwise.
Any help is welcome!
Have you tried changing the bundle identifier in the new target you just created? So your full version would have bundle identifier: "com.yourcompany.AppName" and your lite version will have a bundle identifier of: "com.youcompany.AppNameLite"
I'm not currently on my Mac partition so sorry if I'm a bit off.
I would add a new configuration for your app. Call it something like "Release Free". Add a gcc preprocessor symbol "FREE" to this configuration.
Then everywhere you initialize and instantiate your iads put the code within some "#if" statements.
Something like this.
#if FREE
// Init iAds
#endif

How do I add the library to link the OpenGL framework in iPhone SDK?

I am trying to study OpenGL and I have the framework added, but I am getting linker errors. I believe the issue is adding the library to the project for linking and EVERY time I try to add a library, I hunt around for the configuration setting forever. Someone, please give me the simple click-n-go answer!
The linker cannot find the CAEAGLLayer framework to link against.
Add the QuartzCore.framework and the linker will be able to find the missing framework.
To do this right-click on the Frameworks the choose:
Add > Existing Frameworks > QuartzCore.framework.
alt text http://img19.imageshack.us/img19/223/screenshot20091206at544.png