Accessing Google Calendar API with OAuth2 on iPhone - ios

I'm trying to build google calendar functionality for an iPhone app. I understand I need to be authorized with OAuth2 and would like help some help. The iPhone app is accessing a public calendar and therefore the user is not supposed to login with a webview like the google toolbox framework. FWIW, I have my account set up. Any framework recommendation or good tutorials for this would be greatly appreciated.

I am in the same boat as you. The info you find on this is scarce and confusing... unfortunately.
You've probably already been to Google's API Documentation. This post helped me to get the GDataObjC-Client to work in my project.
Google's samples are unfortunately all for Mac and not iOS. Their take on it is, that the methods are pretty much the same for iOS as they are for Mac, so you figure it out how you translate the Mac portion to iOS.
I ended up doing just that... I created a new XCode project and brought over the code of CalendarSampleWindowController of the Mac-app to my ViewController.
Good luck!

Related

How can I share a url from a browser to my app in iOS?

TL/DR
How can I make an iOS app appear on share sheet to receive shared urls from any other app?
This is a super newbie post as I have never really touched swift to develop anything, but I couldnt find the answer to my question on google so i wanted to start here. Almost everything I found by googling around is UIActivityViewController which appears more to be about how to share content from my app to another app; while what I am trying to do is share urls from another app to my app.
I am try to build a simple app for ios (doesnt have to be old version compatible because it will be only used by me) that can be a receiver for shared urls from apps like safari, brave or youtube. All the app does is when user clicks on the share button, and then chooses the app, the app gets the relevant data that is being passed, and then posts it to a backend server.
I can accomplish this on my android app/devices with an intent filter action android.intent.action.SEND in the manifest, and then listening for it with Intent intent = getIntent() in my method.
Would someone be kind enough to point me in the right direction at what I should look into (google about). If you can also point me to some sample code examples on how to write an app that can be the receiver for shared data (like urls), that would be fantastic. I am not sure what to search for so that my app can show up on share sheet, and how to then react with the data.
Again, apologies for the super noob question, but I couldnt translate my idea to something relevant on google.
It can be achieved by an Action Extension. Search for it.
Here is one:
https://code.tutsplus.com/tutorials/ios-8-how-to-build-a-simple-action-extension--cms-22794
I think both Share extension and Action extension can do the job. It depends on your needs.
Check this table to make sure which one is more appropriate for your purpose.
You can refer to App Extension Programming Guide by Apple.

iOS - Retrieve the most visited websites on the device

I am developing a mobile app in objective-c for iOS.
Is there a way inside my app to programmatically retrieve the most visited websites from the browsers on the device?
I am interested in the urls specifically (e.g. "http://www.google.com"), in order to check a couple of things.
I've searched online but I haven't find anything that could satisfy these needs: does every browser save this kind of information in a private folder not accessible to anyone else and so it's not possible to get this data? Or am I missing something else?
Thanks anyway for your answers
The answer is: No, it's impossible. Apple doesn't give as an API to do that.
No, the developed applications are sandboxed. You can't access data out of one app from another. It's part of the security model.
Apple didn't published APIs for this privacy access level, It only published the following APIs for Safari extensions:
https://developer.apple.com/documentation/safariservices/safari_app_extensions
BTW, This question is asked alot before, you can check them:
how to programmatically access iphone browser history
How to access iPhone Safari History in an App?

Entering website pushes notification on iPhone

I want to make a Simple App. I’m a beginner in Swift, with Just basic knowledge, But I’m Very Good at PHP and JS, So basically, programming is not foreign to me.
The App should cowork with my website and it should do Only one thing. When person visits my web, I get a notification on my iPhone. Simple as that, yet I have no idea how to make it.
Any ideas, recommendations?
Any help Appreciated.
Thanks.
Dave
I think the easiest way will be to use OneSignal service for Push Notifications. When somebody enters your site, you call method on OneSignal API via your PHP code. And it sends push to your app.
OneSignal API is here:
https://documentation.onesignal.com/docs/onesignal-api
Documentation about iOS integration is here:
https://documentation.onesignal.com/docs/ios-sdk-setup
It is free and easy to use.
That would require a bit of PHP and SQL (and everything similar). You can check out Google Analytics.

facebook sharing image with link ios xcode

In my application now I am sharing an image along with a separate website link. I want to attach a link to the image so that on clicking the image, it will direct the user to the respective website.In android it is possible.
Now I am using a social framework. It can be done by using Facebook SDK I guess. Any suggestion on how to do this? Have anyone already did this? please help me with the code. Thank you in advance.
I have searched for this one. I came across graph story and all..which one to use? I am not getting any idea. I am not having enough time to spend.
Have a look at this stackoverflow question: How to Post to Facebook on iOS 6 in Objective-C using ACAccountStore class
But in essence you need to use the iOS Accounts and Social framework to post to Facebook or Twitter.
You can then use it to post images, text, links, hashtags and more.

iOS Facebook API/SDK Wrapper?

I've been looking for a good iOS Facebook API/SDK Wrapper, can't find any.
I need to be able to (with a few lines of code, not the insanely needed by Facebook's API):
Login user
Logout user
Get user's likes
Invite Friend to app
Maybe post to user's wall (this has been causing problems to other apps so not sure will actually implement)
Get user's friends
Get user's basic info (e-mail, name, etc.)
Is there any wrapper simplifying the absurd vanilla API?
https://developers.facebook.com/docs/reference/apis/
This should help and it is Facebook's official api.
Here's the documentation: https://developers.facebook.com/docs/ios/
You might be able to use portions of ShareKit for this (be sure to abide by their license): https://github.com/ShareKit/ShareKit/tree/master/Classes/ShareKit/Sharers/Services/Facebook
This doesn't do everything you asked, but it's a (clean) starting point at least: https://github.com/mobitar/Zuckerkit
This does a bit more, but hasn't been updated in a year: https://github.com/sinnerschrader-mobile/S2M-Facebook-iOS
I found this lib: https://github.com/lucascorrea/SCFacebook
It seems to use a not that outdated version of the iOS SDK (3.18 vs. current 3.21), is available on cocoapods and seems to cover many of your required API features.
I haven't used the lib my self, but i am considering it next time i have to develop an iOS App which needs to connect to facebook.

Resources