Facebook SDK 3.5 in iOS 5 needs Social.framework - iphone

Quick question. I'm getting to grips with the FB SDK 3.5 and I was following this tutorial on the Facebook site: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
The problem is, it says the SDK needs Social.framework. As far as I'm aware, that's not available on iOS 5. Obviously I can set some frameworks to optional but I don't know if that will stop me from posting status updates on iOS 5. Any ideas?
Regards,
Mike

It's fine to use the SDK in iOS5, the social.framework is used for the built-in Facebook account function in iOS6, on iOS5, the SDK will skip it.

It's okay to use the Facebook SDK, it needs you to add the Social.framework to your project, but this isn't available in iOS 5, not to worry the Facebook SDK will only use it if it's available (for the iOS built in Facebook integration).
But you do need to include it... so you should mark the Social.framework as "optional" in the Target's Build phases. This means it won't force it when you compile. Which can make you run into problems for iOS 5 which doesn't have Social.framework available.

Related

Can I update my iphone application for iOS7 only?

I have developed application for iphone4/5 with iOS 7 support. Recently I found issue in that and wanted to update application only for iOS7.
Does Apple allow me to update application for iOS 7 only? Do i have to give support for iOS 8 right now?
If you submit with Xcode 5.1.1, you'll compile with iOS 7's SDK (and your app will behave as it behaves currently).
If you submit with Xcode 6.0, you'll compile with iOS 8's SDK (and you'll have to update your app due to new API and possible bugs).
use Xcode 5.1.1 if you want to fix issues only for iOS7 for time been and submit the app..but users might face issues if they are using iOS8 on their devices.
if I understood you correctly, I believe you should check in code for the user's iOS version and then update based on that.
See How to check iOS version? how to do that.

Simple posts to Facebook and Twitter iOS 5 & 6

I'm currently implementing a simple button that posts to social networking sites (giving my app a little exposure, you know the drill). However, I'm a little confused by all this social networking stuff. On one hand I know iOS 6 has a really nice framework for FB and Twitter (Social.framework) but for iOS 5 it's a little different. iOS 6, I think I've got figured... I find it a little weirder when we go into iOS 5 however. From what I understand Twitter was already integrated into iOS 5 and can be accessed using the Twitter.framework and Account.framework frameworks. What I don't get is in order to support both 5 & 6 for Twitter do I have to use Social.framework, Twitter.framework and Account.framework to support everything? I.e. two different methods depending on iOS version. Or, if I use the latest SDK will iOS 5 twitter work with Social.framework? That Twitter covered.
Now for Facebook, how do I go about posting in iOS 5? I'm pretty sure Social.framework won't work in iOS 5, even if I build the app with latest SDK. Therefore I think it's inevitable that I'll have to have two different methods which run depending on the iOS version installed. Is that correct? If so, how do I go about integrating FB into iOS 5? Do I have to use the SDKs provided by Facebook?
So to summarise my questions if all that was a little wordy.
1) Can I incorporate Twitter-posting into my app using only Social.framework for both iOS 5 & 6, or do I have to do one method using Social.framework (for iOS 6) and then another method using Twitter.framework and Account.framework (iOS 5)?
2) I can use Social.framework for Facebook in iOS 6, but can't for iOS 5, therefore, I have to do two separate methods, one with Social.framework (iOS 6) and then one with the FB SDK (iOS 5), correct?
Thanks in advance, Regards,
Mike
1) Social.Framework is available only on iOS6+ so you have to split between the two frameworks (or you can use only Twitter.Framework even though some methods have been deprecated on iOS6)
2) You can use the Facebook SDK both on iOS5 and iOS6 (latest version for iOS at the time i write this answer is 3.5). The Facebook SDK already takes care of using the user's Facebook account on iOS6 or relying on the Facebook app on iOS5 or iOS6 when the account is not already configured in the phone

AdSupport framework not added in ios5 with xcode 4.2

Im integrating FacebookSDK in my app with ios6 and Xcode4.5 .But when I run the app in prevoius versions of XCode (Xcode 4.2 with ios5) I couldn't be able to link Social.Framework and AdSupport.Framework .They are missing and I couldn't find it under Build Phases.Gone through Google and found they are not present in ios5.But when I make those Frameworks as optional .I have made them as optional.But that doesnot work for me .And I couldnot find any turnaround solution to this.
How can I get it worked in xcode4.2
iOS started supporting Facebook API which is Social.Framework is included in iOS 6. It's not available in earlier version for Facebook. You won't get a framework for iOS facebook api in XCode 4.2.
EDIT :
In this case what you have to do is, keep the framework optional which you have already done. Check if Facebook class exists before you call the function. If it does that means user is using iOS 6 or greater version then iOS 6. If it doesn't means user is using iOS version less then iOS 6. To give the reverse compatibility you'll have to implement the Facebook API.

Sharing and iOS versions in xcode

I am making an application that outputs text and would like to give the users the option to share this text on twitter and/or Facebook..... I know that iOS6 is linked with twitter and Facebook. but what would happen if an user that has iOS 5.1 for example installs that application? I guess I am trying to see if I should use ios6 and the built in sharing features or ios5 and use sharekit to share on twitter and facebook.
My other question that is also related.
If I build my application in xcode with ios6 will users with ios5 installed still be able to install this application? what would then happen to the features that are only in ios6 like sharing?
Thanks for all your help
If you set your application's target to iOS 6, users operating on previous iOS versions will not be able to install it. Also, if you set the target to iOS 5 for example, you will not have the facebook native facebook integration available. So, in my opinion, you should set the target for iOS 5, set the facebook framework as optional and when launching the application, check what iOS version it's running on. If it is not iOS 6, use shareKit.

AdMob SDK and iOS 5

I'm working on a lite version of my app in which I want to put AdMob's ads.
I have downloaded their SDK and followed their instructions, but I can't manage to show any ad in my app.
Also the sample project they let you download seems to be broken.
(After compiling it, an empty view appear in the simulator.)
Anyone with a solution?
I've seen no specific issues with running AdMob ads with iOS 5. Also, if you're using iAds in conjunction with AdMob, I wrote a small wrapper available on github that will handle both networks with as little as a single line of code. It's what I'm currently using in my apps, and I've seen no issue with it, even under iOS 5. I tried to make the integration instructions as clear as I could to make it easy.
The current iOS SDK, version 4.1.1, was not tested against iOS 5 as it was released a few months before iOS 5 was released. An iOS 5 compatible SDK will be released very shortly.