Using FBNativeDialogs in an iOS 6 app - ios

I'm implementing a feature where users can share photos on Facebook from an iOS app. The presentShareDialogModallyFrom method looks promising however I'm having trouble using it. Specifically I don't know what to #import if anything. Also I'm not sure if I need to add additional frameworks.
Integrating Twitter was pretty easy: just add the Twitter framework and import the relevant header file.
What do I need to import/add to my iOS 6 app in order to use FBNativeDialogs?

According to the Facebook SDK documentation, you should have Social.framework, Accounts.framework, and AdSupport.framework in your Linked Frameworks and Libraries. If you support any iOS below version 6.0, they should be Optional instead of Required.
In the class where you wish to use the presentShareDialogModallyFrom function, add #import <FacebookSDK/FacebookSDK.h>.

Related

How to integrate BRLMPrinterKit with iOS for a Flutter App?

I have been trying to integrate the Brother's SDK for printing with the iOS part of my Flutter project.
The following are the steps that I followed :
I added the BRLMPrinterKit.framework & BRLMPrinterKitW.framework to the Framework folder in my Xcode project.
Added $(PROJECT_DIR)/Frameworks to the Framework Search Paths and Header Search Paths.
I then added #import <BRLMPrinterKit/BRLMPrinterKit.h> to the Runner-Bridging-Header.h.
After performing the above steps, when I try to import BRLMPrinterKit in the appdelegate file, I am getting a "No such module BRLMPrinterKit" error.
Any Help will be appreciated.
You don't need to add "import BRLMPrinterKit" in your Swift file. So, just delete this line and you should be OK.
Adding #import <BRLMPrinterKit/BRLMPrinterKit.h> as you did to the Bridging Header is sufficient to be able to use SDK APIs in a Swift file.
A few other tips:
Do NOT include both frameworks in your project.
Use BRLMPrinterKitW.framework if you are ONLY supporting WIFI
Use BRLMPrinterKit.framework if you are supporting Bluetooth (and also WIFI)
You must "embed and sign" the framework via the General tab for the target. Otherwise your app will crash as soon as you run it.
You may need to add #import <BRLMPrinterKit/BRPtouchPrinterKit.h> to your Bridging Header too, if you need to access any APIs from the older v3 SDK (BRPtouchPrinterKit) that do not have equivalent APIs yet in the v4 SDK (BRLMPrinterKit).

iOS app - Non-Public API usage- app references non-public selectors: cancelButtonClicked, setResult:

After I have uploaded app to itunes i get mail saying that my app using non public api methods- cancelButtonClicked, setResult:
But cancelButtonClicked is used as IBAction method for various buttons and searchBar. Do I need to rename it? Also, this is very common please suggest..
For setResult: Method I have not used this method any where also, I haven't found this method used in my complete workspace.
I have used multiple third party APIs some of them are below:
AFNetworking
Google Maps SDK
Google Places SDK
Google Analytics
RSK Image Cropper
Facebook SDK
Twitter SDK
ASIHTTP
MBProgressHud
Reachability
SDWebImageCache
Please suggest what I can do.
Also, I am using Xcode 6.3.2 with deployment target iOS 8.0. In some SO's answers it was suggested to use Xcode 6.0.1 but I can't use it as Google Maps SDK POD suggested to use Xcode6.3 or later.
Any help appreciated.
You should make a search in your project directory for the method's call that you mentioned. This is a command line script to search in the whole project. This will return where these methods are called, and then you should modify the name of the method or update the library/framework containing the call.
grep -Rnis 'cancelButtonClicked' *
grep -Rnis 'setResult:' *

Facebook App Invite "FBSDKAppInviteContent" not recognized

I am currently trying to implement Facebook's new "App Invites for iOS". I'm using Objective C and I have added the following frameworks:
Bolts.framework
FBSDKCoreKit.framework
FacebookSDK.framework
I have also imported <FBSDKCoreKit/FBSDKCoreKit.h> and <FacebookSDK/FacebookSDK.h>. It's like the code isn't recognized, why? I get the following errors:
What do I need to do so that I can use FBSDKAppInviteContent. Also, is there a special URL or PHP/JS equivalent?
I think you also need to import FBSDKShareKit/FBSDKShareKit.h
Don't forget to link FBSDKShareKit.framework to your library.

Facebook SDK 3.1 - send app requests

Is it possible to send app requests using the Facebook SDK of iOS 3.1?
The documentation Facebook provides doesn't work with the new SDK: http://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/
Here are the issues:
1) the documentation tells you to import Facebook.h and create an Facebook instance. This is not how they tell you to create a FB connection using 3.1
2) You cannot import Facebook.h with the new SDK
3) However, you can import Facebook.h with the new SDK if you import the deprecated headers into the app
4) Once you import the deprecated headers into the app and follow the instructions on the above link, you discover dozens of fatal errors (redefinitions/duplicate declarations).
I've been looking around for quite some time and cannot find any solution for this. At least I have found others struggling with the same issue.
I fixed all the errors by not having #import "Facebook.h" and #import <FacebookSDK/FacebookSDK.h> in the same file.
Anyway this way of supporting good features like app-requests sucks!
I use CocoaPods.org and let it do all the hard work for me :D
http://www.cocoapods.org

Duplicate Symbol SBJSON on iOS Facebook SDK V 3.0

In the current project, I used SBJSON everywhere and got it working fine with the previous version of iOS Facebook SDK since SBJSON was included in Facebook SDK.
I just upgraded to iOS Facebook SDK version 3.0 and having problem with SBJSON.
The first thing it complaint was about NOT finding SBJSON header file. So I thought, I could manually include the SBJSON lib into the project.
After I did that, then the compiler complaint that the SBJSON symbol was duplicated with the Facebook SDK.
I could not find the SBJSON.h anywhere in FB SDK headers.
So at the end, I went into a loop of problems.
Does anyone know how to solve this issue?
The worst case could be that I have to switch to use other JSON library for iOS.
Note: They are using framework for Facebook SDK, not the source code library like before
Cheers
What I ended up using to solve this are two approaches:
The first one
Firstly, not using the pre-built Facebook SDK framework that they
provided
Secondly, check out the Facebook SDK source code from Facebook SDK and integrate it to the project
The second one
Integrate the Json-framework using their source code here and change the name of any duplicate class to something unique to your project like SBJsonParser to MySBJsonParser

Resources