I am trying to integrate the YouTube Data API v3 for iOS into my project. In the end all I want to do is upload videos from all instances of the app to a company owned youtube channel, and get the URL to be able to embed the videos in a website. I can't figure out how to integrate the client library for iOS though. I get compile errors, or ARC issues that I can't figure out how to resolve. The files are found here: https://code.google.com/p/google-api-objectivec-client/source/checkout
In short this is what I did:
In my project I added the GTLYouTube_Sources.m, GTLCommon_Sources.m and GTLNetworking_Sources.m.
Make sure that Build Phases -> Compile Sources the compiler flag '-fno-objc-arc' is set for these three files. This should fix your ARC issues.
You may need to set some search paths in your Build Settings if the compiler complains that it can't find a file.
Hope this helps!
I had issues but with a combination of google's page + a youtube tutorial I was able to get things working, I still don't know how to search yet but here are my notes on the subject:
This file points in the right direction - https://code.google.com/p/google-api-objectivec-client/wiki/BuildingTheLibrary
This video is better - https://www.youtube.com/watch?v=q7m3qCsQBEE
As per my comment on the video stream - "
I did this tutorial and receive 9 linker errors referencing the derived data folder and that "file was built for archive which is not the architecture being linked (x86_64)" but have "Standard Architectures" selected in the Build Settings for the project (armv7,arm64). This is using Xcode 6 but I can try on Xcode 5.1.1 if needed (though I don't think this issue will abate as it supports the 64bit architecture as well. Going into the GTL Project and selecting the GTLTouchStaticLib and changing the architecture over to Standard removed the linker errors and the build succeeded! https://www.dropbox.com/s/f6tc6t33r5k5021/Screenshot%202014-10-10%2012.08.00.png?dl=0”
API Calls may still with 401 despite having an API key due to a known issue - https://code.google.com/p/gdata-issues/issues/detail?id=5770#makechanges to fix is remove the bundle ID from the google console.
i'm giving an updated answer for this question. so it can be helpfull to community.
NOTE:- GTL is converted to GTLR . GoogleLibrary is updated. i Recommend to use cocoapods because it will be simple.(according to me) here is the link for this migration
1) create pod file for your project. by pod init & pod install in your terminal. it will create blank pod installation.(ignore if you have done already)
2) add these pod library name in pod file.
here is the some services that can be useful
pod 'GoogleAPIClientForREST'
pod 'GoogleAPIClientForREST/YouTube' //here '.../YouTube' is the service. you can use ".../Caledar' ,".../Translate" or which you want.
pod 'GTMAppAuth'
3) add these headers (i recommend to create Prefix Header '.pch' for your project.)
#import <GTMAppAuth/GTMAppAuth.h>
#import <AppAuth/AppAuth.h>
#import "GTLRYouTube.h" //here you can change double quotation ("...") with (<...>) if this throws the error "library not found".
4) this step is optional..
select your project target & go to build settings. and search for OtherLinkerFlags and add $(inherited)
NOTE:- if you can use Firebase to use google's service it will be more easy.(i've tried it and it was simple than google developer console. this is my personal opinion.)
Related
i'm following a tutorial for a login app with firebase and i have only one error i can't understand. I already searched online and i found somenthing similar here on stackoverflow but didn't understand the solution (it was too old).
This is the error:
Can you guys help me with that?
I looks like you are compiling duplicate source files.
Open PromisesObjC in the Project Navigator
Go to the Build Phases tab
Check the Compile Sources section for duplicates and remove the duplicate entry
Clean Build Folder
This occurs when you install Firebase via Swift Package Manager, and Google AdMobs SDK via CocoaPods. Unfortunately, this is how the current official documentation guides you. You end up with duplicated libraries in your project.
After trying many things, I've got rid of this issue by installing Firebase via Cocoapods as well.
Hello Everyone I'm trying to inject kurento client in my swift app through cocoapods
pod 'KurentoToolbox'
successfully installed and after disabling bitcode for target project and kurento framework the build got successful, but whenever i try to import KurentoToolbox following error shows up
Then I try to Kurento Framowork in Linked Framework and Libraries as well as embedded libraries, but still facing the error Kindly see the attached the screenshots.screen shot after adding the framework , now after compiling the project it throws the following the error.receiving this error
Kindly Check these screen shot which may help to better answer this question.
Add KurentoToolbox into your embedded libraries. Usually this solves the problem but still if it doesn't, then try to add both of them in Linked Framework and Libraries as well as embedded libraries.
Also quit your xcode and go to your derived data folder and deletes derived data files(also empty your trash).
I have installed the facebook SDK properly. (This is different from the other not found error because it is specifically for react-native-fbsdk and none of the solutions worked.)
I have tested that I have the SDK installed by importing both the FBSDKCoreKit header and FBSDKShareKit header into AppDelegate.m and it compiled and ran with no issue.
However when I installed react-native-fbsdk and linked it and compiled, I get the error of 'FBSDKCoreKit/FBSDKCoreKit.h' not found. similarly with FBSDKShareKit.
The troubleshooting on the github page gives 3 options to check when this occurs:
Make sure that the Facebook SDK frameworks are installed in ~/Documents/FacebookSDK.
Make sure that FBSDK[Core, Login, Share]Kit.framework show up in the Link Binary with Libraries section of your build target's Build Phases.
Make sure that ~/Documents/FacebookSDK is in the Framework Search Path of your build target's Build Settings.
Which I have checked and verified that I had all of these there was no solution found. The strange thing is that I can import them in AppDelegate.m and it works fine.
You need to make sure you have the SDK frameworks saved under the folder ~/Documents/FacebookSDK
Because react-native-fbsdk iOS project have the value "~/Documents/FacebookSDK" hardcoded in its own definition of Framework Search Paths
If you are like me and don't want to do what Facebook tells you (or you don't want to put random stuff on your Documents folder):
Replace every instance of ~/Documents/FacebookSDK in the QuickStart tutorial with the place you do want to store the SDK, in my case ~/Library/FacebookSDK. That means, unzip the downloaded SDK there and add that route to your project's Framework Search Paths. *
In Xcode's file tree, expand the Libraries group and click on RCTFBSDK.xcodeproj. On that project click Build Settings and add your route to its Framework Search Paths.
And that's it. Just remember you did this when you update the node module, 'cause this change won't be versioned on your project.
*Note: If there are other people working on the project, do not remove ~/Documents/FacebookSDK from your project's Framework Search Paths. This is to be consistent with the module installation and the rest of the team can easily npm install and use the installation guide as documentation.
Drag & drop in Xcode the FacebookSDK files, for example try with FBSDKCoreKit.h
Im working on a project (xcode 6.3+, swift) using Parse SDK (parse.com) to handle data.
Recently, we decided to use the google maps sdk to provide user with directions using the direction API. As you can use this API without the google map I started integrating it. It's my first time with cocoapods so I followed the instruction and started playing with.
pod init to create the pod specs file
here is my config coming from google Starting Guide
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'GoogleMaps'
pod install, then launching the project using the .xworkspace
I directly try to build the project and it returns 34 errors.
the type of error is always the same: Apple Match-O Linker Error
So I start looking at google cause I did the same thing on a blank project and everything was working really good.
I start to find information about the fact that using Parse SDK causes conflicts with the -ObjC linker Flags that GoogleMaps needs to work. most of the answers give two potential solutions:
1. addind the Facebook-iOS-SDK framework
tried this using the framework given by facebook, as well as using cocoapods. not working. I still got errors.
2. Force Loading the GoogleMaps framework by replacing the -ObjC flag by the following
-force_load $(PROJECT_DIR)/Pods/GoogleMaps/Frameworks/GoogleMaps.framework
this returns an error as well:
so now Im quite lost about the way to solve this. Is there anybody that found a way to integrate GoogleMaps SDK with Parse?
UPDATE
I tried a different approach by injecting GoogleMaps without cocoapods. To do this I used this method: GoogleMaps without CocoaPods
It seems to integrate itself properly, but the -ObjC flag remains. Using
-force_load $(PROJECT_DIR)/GoogleMaps.framework/GoogleMaps
is now responding but causing duplicate symbols for architecture x86_64errors.
can't seems to find a way to fix that.
You need to do this
Click on your project (targets)
Click on Build Settings
Under Framework search paths (set your framework path)
Following information for getting framework search paths
Right click on your framework folder (for ex: GoogleMaps.framework)
select Get info
copy the path from General->where and paste this path in your framework search path (path should contain in single line)
Good luck
Ok so I managed to find working solution both for integrating GoogleMaps Sdk and Parse with and without cocoapods. However, the use of the -ObjC flags by GoogleMaps forced me to integrate the FacebookSDK to the equation. I couldn't find a way to make this working without it
So this config is working with xcode 6.3+ and it required to use and older version of the Facebook SDK (when not using cocoapods)
With CocoaPods
1/. Add the Parse SDK as described on their website (existing project version)
2/. Add extra Frameworks (AdSupport, Account and Social) as well as libstdc++.6.dylib
3/. Open terminal to the root folder
4/. $ pod init
5/. open Podfile and replace content with the following:
use_frameworks!
platform :ios, ‘8.0’
pod 'GoogleMaps'
6/. $ pod install then $ pod update
7/. download FacebookSDK from this link
8/. Add FBSDKCoreKit and FBSDKLoginKit Frameworks to your project
9/. build your project.
If some error occurs, you may have to delete ParseFacebookUtils.framework from your project and keep only ParseFacebookUtilsV4.
Without CocoaPods
So this is quite the same procedure except that instead of using pods to install GoogleMaps SDK, you will integrate it manually by using the link mentionned in the question, or by going to GoogleMaps podspecs and access the source url to download the last one.
Make sure to add GoogleMaps.framework, as well as the GoogleMaps.bundle which you can find by right-click on GoogleMaps.framework /show in finder under Resources. Drag and drop to the project and make sure it's linked to the project build settings / Copy Bundle Resources
Also, make sure to have all the required framework and libraries listed on the link provided in the question.
Add the -ObjC flag under Build Settings / Other Linker Flags
When it comes to integrate the FacebookSDK, I've noticed that using the latest version isn't working. Apparently, it was prepared to work with xcode 7. Do work around this, just download an older version here
Add FBSDKCoreKit and FBSDKLoginKit to the project and you should be good to go.
Hope that help someone cause it was a pain to make this work...
I have a project where I am using FacebookSDK framework. I have followed the guide and everything works well in my computer, the problem is when I make a push into bitbucket repository and one mate make pull in his computer to work with the project there.
He gets this error FacebookSDK/FacebookSDK.h file not found.. We have looked in Framework search paths and the path had different user name ( my computer's name).
Which is the good way to install it? We have downloaded both FacebookSDK.pkg and installed it. its default path is /User/USERNAME/Documents/FacebookSDK/.... I have tried like they do in the video and I have added the Framework and bundle file into Framework folder of xcode without copy it.
I also have tried to put the framework in the Project folder and then add then add to the xcode project. it does not work either.
So, how people do this when they work in a work group with BitBucket or github(I guess is the same)
I also have this warning, APPLE MATCH-O LINKER WARNING ld: warning: directory not found for option '-F/Users/xxxxxxxxx/Documents/OS/project_name'
ld: warning: directory not found for option '-F/Users/xxxxxxxx/Documents/FacebookSDK'
In Project/Build settings Framework Search path when we make commit we have both paths..
I added the facebook sdk by following method
Click on the Project->Target->Link Binary with Library-> + -> add other and go where your frame work is, it should be in documents.
here you go. !!!!