FacebookSDK with Continuous Integration - Xcode - ios

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.

Related

Linker Command Failed Facebook Sdk

I am new to iOS and trying to implement Facebook SDK in a project using AppGuru Facebook integration in Swift tutorial. But I am facing this linker command error while building my app:
error is framework not found Bolts for architecture x84_64(linker command failed with exit code 1)
Here is a screenshot:
Download demo project with facebook login from below URL. you have to configure your facebook app id.
Download
You have to import this 3 frameworks in your project.
Check on this
https://developers.facebook.com/docs/ios
https://developers.facebook.com/docs/facebook-login/ios
Framework search path - add below line
$(PROJECT_DIR)/Projectname/FacebookSDK
Also check, bolts, core and login kit of facebook has to be in build phase -> Link binary with libraries
Follow steps -
Go to your project setting page
Select your project (left side)
Click the Build Settings tab
Search Bitcode
Set Enable Bitcode to No
I had the same error. I deleted the ParseFacebookUtils.framework library from my project and kept only the ParseFacebookUtilsV4.framework.
When using the AWS Mobile SDK for iOS and Facebook SDK together, you should not import Bolts.framework in your project. If you remove it, it should compile.
Copy the frameworks into the project but, unlike what Facebook tutorial suggests, select "Copy items into destination group's folder". I did that and it worked fine for me.

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.

Error with Google Play Game Service on iOS

I am getting this error:
ERROR: GPGSAppController.mm GIDSignIn.h File not found error
I am using Google Play Game Service plugin for Unity for leaderboard and Achievements, and every thing is working fine in android but when I build to IOS and try to run my project to an iOS device I keep getting this error and I couldn't find a solution to it for hours now.
I tried to deleted everything related to Google Play service (After creating a back up of course) and the app installed and worked ok, except it was a bit laggy but that is a another issue. So I'm sure the problem comes from Google Play Service, but I have no clue how to fix it. Again I'm new to Xcode and iOS development in general and even Mac.
I also get this message after building the project in Unity:
TO FINISH CONFIGURING THE EXPORTED XCODE PROJECT
Add these frameworks:
AddressBook.framework
AssetsLibrary.framework
CoreData.framework
CoreTelephony.framework
CoreText.framework
Security.framework
libc++.dylib
libz.dylib
Add the following bundles and frameworks from the Google Plus
and the Google Play Games C++ SDKs. These can be downloaded from
https://developers.google.com/games/services.
GoogleOpenSource.framework
GoogleSignId.bundle
GoogleSignId.framework
gpg.bundle
gpg.framework
Note: Make sure the bundles are copied to application. This can be
verified under Build Phases/Copy Bundle Resources.
Add the '-ObjC' linker flag. To do this, select the top-level project
object, select the 'Unity-iPhone' build target, then go to the
Build Settings tab. Search for Other Linker Flags and add
the '-ObjC' flag to that list.
** Note: To run in the simulator, use Unity 4.6.8 or greater.
ios_instructions on plugin repository
But I have no idea how to do any thing above as am not familiar with iOS development. Any help is appreciated.
#aimozs answer was right for indicating where to add required files, a few google search gave me the answers;
From instructions (didn't work for me, scroll down)
AddressBook.framework
AssetsLibrary.framework
CoreData.framework
CoreTelephony.framework
CoreText.framework
Security.framework
libc++.dylib
libz.dylib
These can all be located directly when linking frameworks. (In my case, libc++.dylib and libz.dylib were already linked, and I couldn't find them somehow, but regenerating your xcode project should add these two again.
GoogleOpenSource.framework
I've found it here:
https://developers.google.com/+/mobile/ios/getting-started#step_1_creating_the_console_name_project
GoogleSignId.bundle
GoogleSignId.framework
Found them in:
https://developers.google.com/identity/sign-in/ios/sdk/
(I grabbed latest version Google Sign-In SDK 3.0.0)
gpg.bundle
gpg.framework
I found them here:
https://developers.google.com/games/services/downloads/sdks
(Grabbed Play Games C++ SDK Version 2.1)
Also, the following part of the message seemed important:
Make sure the bundles are copied to application
I tried to copy bundle files to root of the project, but I still get the same error.
Solution: CocoaPods and the podfile!
I saw the PodFile in xcode project directory!.
Here you go; make sure you followed these steps:
https://github.com/playgameservices/play-games-plugin-for-unity#ios-setup
Then see https://cocoapods.org/
sudo gem install cocoapods
pod repo update
pod install
open Unity-iPhone.xcworkspace
Way better than manually copying files everywhere! ;)
Note: I also had to disable bitecode because I was having a linker error concerning GoogleOpenSource:
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)
It doesn't seem to be compiled with bitcode enabled, solution in here: how to ENABLE_BITCODE in xcode 7?
Build, enjoy and focus on making awesome games!
Linked questions
There's also a small discussion here:
http://forum.unity3d.com/threads/googleplus-googleplus-h-file-not-found-gpgsappcontroller-mm-xcode.294398/
A similar issue on UnityAnswers:
http://answers.unity3d.com/questions/1098655/gpgsappcontrollermm-gidsigninh-file-not-found-erro.html
Im going through that aswell, and for #1 it has to be done in xcode, here's a screenshot of how to add those libs
And that is for #3
Hope that helps :) and I'll get back to you about #2 when I've found out about it ;)

Unable to use Google Analytics for iOS

I don't know what Happens to the code or google.
I just Downloaded the Sample App for Google Analytics for Google.
I downloaded it via pod using:
pod try Google
and chooses the option for Analytics.
After downloading when I build the project I am getting Linker Error.
Fully Stuck Tried All The way available in SO.
Removed -ObjC Flag
Removed -force-load Flag
Changed Load Common Section from Yes to NO
But none of the way help me Out. What is the issue with it.
Here is the Screen shot of the Error:
Here is the Following reason of this ERROR :
*Note - Integrated GooGle Analytic without CocoaPods.
If latest GA(Google Analytics) sdk is using then better to upgrade to Xcode 7 otherwise it will give you duplicate error (even if configured properly)
Running with Xcode 6.2 or < Xcode 7 then better to download September (August) Release Sdk.
Go with Xcode and select GA folder and right click - choose show in Finder then all files should be there . If yes then check is there two different copy exists in other folder .
Thanks
It basically says that there are functions duplications in the project...
Make sure the following:
The project does not have #import for .m files by mistake
In the projects build phases there are no file names duplications
There are no initialized variables in .h files e.g "int
variableA = 5"
If none of the above works, remove in project settings Other Linker
Flags "-ObjC", that will allow to load the same functions more then
one time.

Cannot find ScriptingBridge.framework

I am new to objective-C.
I have programmed my first App in the last 2 months. I am now trying to access iTunes information and the coding appears to be straight forward but I cannot locate the ScriptingBridge.framework.
I am using Xcode 4.5. I have tried using the "+" button in the Link Binaries with Libraries section of Build Phases but ScriptingBridge.framework does not appear on the list. I have tried opening the framework directory in Finder with no luck. I cannot find a way to download the file independently from installing Xcode.
I have tried uninstalling and reinstalling Xcode. Any suggestions?
Thanks,
BobT
ScriptingBridge.framework is not available for Cocoa Touch.
I don't think you can use the scriptingBridge framework with an iOS Project. You only can use it with a cocoa application project. In a cocoa application project you can add the framework under
Targets -> Build Phases -> Link Binary with Libraries -> +
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/UsingScriptingBridge/UsingScriptingBridge.html

Resources