Lexical or Preprocessor Issue - Regarding FacebookSDK, Cordova 2.5.0, & Facebook Plugin - ios

I followed the instructions here (https://github.com/phonegap/phonegap-facebook-plugin) to set-up a Facebook connection using a Phonegap app. However, I never could successfully get the project to build after doing everything I was told.
At one point I attempted to fix the issue by removing my Framework Search Paths (which are now empty) and now I've tried referencing the header in "User Header Search Paths" like this ("$(SRCROOT)/../../FacebookSDK/FacebookSDK.framework/Headers/FacebookSDK.h") but I've still had no luck.
What do I need to do to get this project to build? I've tried cleaning then building, and restarting Xcode, but still no luck. I have "Always Search User Paths" set to yes.
Running Xcode 4.6, Cordova 2.5.0, the newest Facebook plugin, and Facebook SDK 3.5.1
Error screenshot here: http://imgur.com/6MTaLOQ

Actually, I figured it out. The issue was duplicate references in the Facebook Phonegap plugin.

Related

Twitter Kit Integration issues in iOS app

I want to integrate twitter in iOS Application, I tried using Fabric as well as by using Cocoa pod but getting same error every time.
Following are the Errors:
Could Not build TwitterCore
Cocoa/Cocoa.h file not found
Could Not build Module TwitterKit
I searched and tried some solutions as per given below links but nothing work for me. I am using xcode 6.4, ios 8.4.
Please give me any correct solution.
I went through below link
Twitter integration in iOS app
but didnt help
TwitterKit issue comming
https://twittercommunity.com/t/could-not-build-objective-c-module-twitterkit/49551
Cocoa/Cocoa.h file not found
Cocoa/Cocoa.h file not found
Go to project settings --> Build settings
Click on All tab and search "allow non"
then set YES to Allow Non-modular Includes in Framework option

ionic app archive failing in xcode 7.2 due to ‘Cordova/CDVViewController.h’ file not found

I am developing an ionic app for iOS and it is building fine, but when I archive it in xcode, it is throwing "‘Cordova/CDVViewController.h’ file not found" error in xcode 7.2.
I have tried usual suspects such as solution suggested in https://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232, but nothing worked. I have also tried archiving in xcode 7.1, 6.4 but the same error exists. I am using ionic 1.2.4.
Some of my project screenshots (if it helps)
let me know if you need more info.
2 things to try
1st)
you have screen shotted your header search paths i don't see a path to Cordova
try adding $(SRCROOT)/WhereCordovaIS to the header search paths
also do the same for Library Search Paths
2nd)
In the Cordova Lib make sure the headerFiles that are missing 'CDVViewController.h' is included in the 'copy files build step' in BuildPhases
is in the copy
Hi #David I tried your answer. Didn't work. However, I tried ionic's weather app and it worked. So I thought the issue might be with my environment. I cut out js, css and views folder and put it in a fresh repo and it worked like a charm.

FacebookSDK with Continuous Integration - Xcode

I've got a project on Xcode which works with FacebookSDK. As recommanded by facebook, the SDK is installed on ~/Documents/FacebookSDK, and in my Build Settings, I had this path to the "Framework Search Paths" part. Everything works fine, but I'm trying to use Continuous Integration with Xcode Server, and when I try to integrate my project, it can't find the FacebookSDK (I've got this error message : "Issue: 'FacebookSDK/FacebookSDK.h' file not found.").
I thought it was because the build is made on the server, so I installed FacebookSDK on "~/Documents/FacebookSDK" on the server, but the issue is still here. What can I do?
Ok I finally found the solution.
--> Simply add the path to "Libray Search Path". (something like "$(SRCROOT)/Vendor/FacebookSDK")
I don't understand why we don't need this stuff for build and run but for CI, but it works now.
Simply follow this steps:
Remove old path from Header Search path
Make sure your FacebookSDK is in your project folder
Go to Targets -> Build Phases -> Link Binary With Libraries
Click on + than go to app folder & select Facebook SDK
It will set the actual path of SDK
After that clean project & make build
Hope it will help.
For those who are working with React Native (React Native FBSDK), put $(PROJECT_DIR)/../Frameworks/FacebookSDK in Framework Search Paths on RCTFBSDK.xcodeproj after moving FB SDK to ios/Frameworks. It will work.

undeclared identifier 'FBAppCall' 'FBDialogs'

I'm recently trying to update the Facebook SDK on our application. I had no worries following the steps fom the Upgrade guide by Facebook.
I was able to compile without issues.
However, when I quit XCode, reopen my project and try to recompile I get an error about 'FBAppCall' (undeclared identifier). All others classes from the SDK are working except this one and 'FBDialogs'.
I am able to solve those errors by deleting the Facebook framework and adding it again. But I must do it every time I quit XCode.
I've tried to check or uncheck "Copy items into destination group's folder (if needed)" with no luck. Also tried older versions of Facebook SDK but it didn't changed anything.
Also tried to clear all the Facebook SDK references from the project.pbxproj before readding the frameworks, in vain.
Thank you for helping me with this annoying issue..
Note: Already did all the configuration Facebook SDK is requiring in the Getting Started page.
Finally found the solution.
Since I was upgrading from an older Facebook SDK, I had to delete the older FacebookSDK.framework file from $(PROJECT_DIR)/Frameworks and then re-add it in XCode.
did you add
#import <FacebookSDK/FacebookSDK.h>
in your AppDelegate.m file?

Integrating Facebook Docset with Xcode

So I downloaded the latest 3.1 Facebook iOS sdk and under the scripts I found a build_documentation.sh which I ran. It completed and generated a com.facebook.Facebook-SDK-3_0-for-iOS.docset file. I am trying to get it to integrate nicely with XCode. I know that apple docs can create documentation that shows up in the quick help panel. My own custom documentation works great.
Does anyone know what I have to do to get the same kind of documentation integration with Facebook?
EDIT:
I tried adding the docset to the corresponding folder according to the instructions here
and restarted Xcode but it didn't work
If you install the SDK from the package you don't have to generate the docset yourself.
Go to https://developers.facebook.com/ios
Click on the Download SDK button
You can get the Facebook Documentation working with the following:
Build the Facebook Documentation with the provided shell scripts
Move the .docset to /Library/Developer/Shared/Documentation/DocSets
If it doesn't work, you may have to check, if you moved the docset to ~/Library/Developer/Shared/Documentation/DocSets. This is sometimes WRONG
Why does it work by installing the Facebook Framework directly from the .pkg?
It moves it to /Library/..., not to ~/Library/...

Resources