How to Authenticate and Get Reports from Google Analytics to iOS - ios

How to Authenticate and Get Reports from Google Analytics to my custom iphone application.
I just want to Authenticate the User and get the registered URLs from Google Analytics.

You need to use GData Static library for Objective-C
you can find it here:
https://github.com/google/google-api-objectivec-client
You can see that one of the links is for analytics.
Here you can find a good tutorial for linking the library:
Kelvin's blog - GData Objective-C Client Setup in Xcode 4
If you are using ARC, here is an update for the Header files so you can integrate them in your project with out getting ARC warnings:
Updating Gdata library for ARC
And this is a simplified explanation I made for the ARC problem:
explanation on the update

Related

How to integrate Google reCAPTCHA in Swift

I am working on an iOS project the client requirement is to put the Google reCAPTCHA authentication in the registration form.so, is there any way that I can do it as an android or website. I searched a lot but I didn't get any specific exact solution of Google reCAPTCHA in Swift. I am currently using Swift latest version I,e Swift - 5,
I wrote a Gist that shows how to incorporate reCAPTCHA v2 in Swift. It's a simple solution (MVVM pattern using delegates) with an explanation on how to use it.

disallowed_useragent with Google Drive SDK

I am trying to implement Google Drive SDK in my project but nothing seems to go well, i wanted to upload images and create folder on Google Drive but i am stuck with the error ,which i don't know how to get through, as i found nothing related to the following error.
I have strongly followed this link for code
Google has updated its security restrictions for OAuth flow. They are not going to allow native web-views to initiate OAuth flows. You will need to use the OS browsers to do so.
Modernizing OAuth interactions in Native Apps for Better Usability and Security
You may have to wait for google to update the sample code or figure out how to do it yourself sorry i am not an IOS developer so cant be of any help.
The issue is already logged on the issue forum for Google drive 4919

how will google/gtm-oauth2 / GTMOAuth2ViewControllerTouch work in April?

i am using gtm-oauth2 (as part of https://github.com/google/google-api-objectivec-client ) and I started getting a warning about webviews not being supported to sign in on april 2017.
i assume they want me to move to https://developers.google.com/identity/sign-in/ios/ , but I can't find an example how to integrate the sign-in sdk with https://github.com/google/google-api-objectivec-client-for-rest or https://github.com/google/google-api-objectivec-client which seem to still want to handle sign in with GTMOAuth2ViewControllerTouch which as I understand is not acceptable under the new rules
my question: what mix of google sdks allows me to sign in to google the correct way and then access things like google drive apis?
my guess is I should be using https://github.com/google/GTMAppAuth
and not https://developers.google.com/identity/sign-in/ios/

Integrating Google AppInvites to iOS App

I'm interested in integrating new AppInvites by Google to my iOS app. There are some problems...I'm currently using googleplus-ios-sdk pod and it seems like I cannot have AppInvites pod with googleplus pod as they have some common classes (which results as error during linking of course).
I'm looking for solution how I can use both pod, or maybe there is another pod from Google that can do googleplus job.
Google site is not helping, I've found list of all pods published by Google:
https://developers.google.com/ios/cocoapods?hl=pl
but I don't see one for Google+.
Do you have any advice for this?
The most likely cause of your issue is that you're using v1 Sign-in (e.g. GPP* objects and the GPPSignin singleton) when you probably should be using Google Sign-in 2.0 (GID* objects and GHI* objects).
If you're using GPPShare then you may need to do more work to get it to work well alongside GIDSignin. It may be easier for you to use a link-based approach to sharing, e.g. pass a URL such as https://plus.google.com/share?url=https://yourshareurl.com to a web view or open call.

Google Directions API failing to return results in iOS

I’m trying to use Google Directions API. I have the SDK all set up. I have enabled Google Maps SDK for iOS under the Services in the developer console. Below is the URL I've built to get the directions.
There are two types of keys in the developer console.
First I tried with the Key for iOS apps.
https://maps.googleapis.com/maps/api/directions/json?origin=-37.814107,144.96328&destination=-31.953004,115.857469&key=<Key for iOS apps>
But I got the error This IP, site or mobile application is not authorized to use this API key.
When I searched for a solution to this error I saw in a few StackOverflow answers (1, 2) that iOS keys are not supported. In the answers they're talking about the Google Places API but I thought it might be the same case with Directions because the error was the same.
So I replaces the Key for iOS apps with Key for browser apps and ran it again but I got a new error This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console.
My question is are there any other APIs I have to activate in the Services to get this working? These are the other map related Google APIs in the list.
The API "Google Maps SDK for iOS" - it is only for integrating the "Google Maps SDK"...
If you want to “use” Directions.. you have to “activate” in the Google console: "Directions API” , too developers.google.com/maps/documentation/directions
Happy coding!
Are you using
https://developers.google.com/maps/documentation/ios/ also there is a nice documentation there.
Yes you need to activate the IOS Maps SDK in the google api center when you log in

Resources