Communicating with other apps and getting data from them - ios

On the click of a button in my app I want to launch the youtube app and check if a user is signed in and retrieve his youtube channel address and save it somewhere in my app. At first I though I could have the button open safari and take the user to the youtube sign in page and once he signs in ill copy the url of his homepage, but I dont think this possible and if it is there will be a lot of problems that I have to take into account.
Anyone got any ideas on how this could be done?

Since iOS uses app sandboxing you can't retrieve information from other apps, unless they explicitly call your app back.
You may use Youtube API to achieve what you want. The user would log in Youtube within your app, then you get the user's channel info.

Related

Link to a specific section of my app, or the app store if it hasn't been downloaded?

I'm in the process of updating my iOS app, and one feature that I'd love to add would be the ability to create links (to send via email, or for social media) that would allow users who have downloaded the app to be taken to a certain section of the app, and users who haven't to be taken to the app store page for my app. I also want it to take desktop users to the itunes page for my app.
Now, I've been looking into url schemes as I think this is the way forward, and have managed to create a custom url scheme that will indeed take users to different parts of my app. However, I'm struggling to find a way to check if the app has been installed, and what device the user is on etc.
Would I need to use a server to redirect them to the correct place?
Thanks!
I found out the best way to do it is with universal links, introduced in iOS 9.
https://blog.branch.io/how-to-setup-universal-links-to-deep-link-on-apple-ios-9/

Initiate Facebook Group Chat from iOS App

I want my app to create a new Facebook group chat with certain people that opens either on Facebook's site in Safari or in the native Facebook app when the user presses a button. I want Facebook to handle the whole chat and my app only to initiate it somehow in the cleanest and least involved way possible. My app already uses the Facebook SDK to open an active FBSession, so I've already got login credentials.
Looking around online and in Facebook's docs, I can't find anything that suits my needs. The closest thing I found was in this answer containing a list of Facebook app URLs you can connect to that open the Facebook app to certain pages. There's "fb://chat/(initWithUID:)" and "fb://messaging/compose/(initWithUID:)". However, not only is there no explanation on how to use these, but people say that Facebook has changed these URLs (and does not have any documentation on them), so they don't work anymore unless I reverse-engineer new URLs (which could change again). Ugh, so close!
I also found examples on starting chats with the Facebook Chat API, but that involves logging into Facebook using some networking framework then writing my own GUI and model for sending messages, which I am only prepared to do as a last resort. There should be some way to let the Facebook app or website do all that. Does anyone know how I can do this?
I've found something very close, but I still don't see a way to make my app initialize it with the desired group of friends:
The Facebook SDK has a message dialog that can appear for sending messages to friends. This isn't exactly what I wanted but is good enough because it means that all the programming is already done for me by Facebook, and users should be able to see these messages on https://facebook.com and the Facebook apps. https://developers.facebook.com/docs/ios/share#message-dialog

Notify Facebook users from iOS app

My iOS app gives the user the option to login using their Facebook account. I would like to be able to see the list with all the friends and invite the ones selected to use the app. The problem is that using the app request window, the friends get a notification that is displayed somewhere in the App Center, rather than in the Notifications panel. Unfortunately, this sort of notification is very subtle and might not be seen only after a long time.
From obvious reasons, I cannot fetch the emails of friends as this would be a great alternative.
Do you know if there is a way to send a Facebook Message or some other sort of notification that is more 'visible' to the receiver? Thanks!
I'm not sure if I completely understand your problem. If it's the problem that I think you're having, it sounds like you need to fill out more information on your Facebook App's configuration page.
From what I remember when I had this same issue, you need to have a Canvas URL set in your Facebook App's configuration page. Even if your app is not going to use Canvas, you need to have that part filled out in order for your friends to receive the app's notification jewel on Facebook.

iOS Facebook switches back to app between login & permissions

I'm trying to setup my app to publish a simple post to a user's Facebook feed (image url, link, description). They don't need to use Facebook for anything else so the first time they click "Share" it needs to authorize the app, and the publish permissions.
If they have their credentials stored in the device as of iOS 6 they simply get two alert boxes and it's done with. But if they don't, or have an older version, it switches out to Safari for login. My problem is that it is then switching the user back to my app, then immediately back again to Safari to accept the publish permission. It's very jarring and unprofessional.
What I would like is for the page in Safari to change after the login to the permissions page so they can accept it, and THEN switch back to my app. I know this can be done because the popular Mixology app does exactly this behavior. Unfortunately Facebook keeps changing their SDK and all the information I find online is outdated.
I wrote up a solution here: FacebookSDK presents login UI twice to avoid the double switch.
Basically, you can use openActiveSessionWithPublishPermissions: to do what you want. However, you have to handle the special case where the user has signed in to Facebook from the device settings, which requires requests for read and publish permissions into two separate calls.

Form to send iOS app via text message

Is there a service that allows me to put a form on my site that will send a link to my iOS app to a user?
User goes to my site
User inserts their cell phone number in a field
User receives a text message with the link to download my app
Does this make sense? Is there a better way? I've seen this before but can't remember where...
Currently do people really just take out their iPhones, open the app store, search for the app name to download it?
PS: Before posting I searched Google and this site but didn't find any answer.
Not quite what you're looking for, but probably a lot easier for you to do: You could create a QR-Code that contains a link to your app in the App Store. Then people can scan it with their phones (there are tons of popular apps that can do this), and when it opens the URL, the user will be redirected to the app store.
Just use the https://itunes.apple.com/us/app/[...] link from iTunesConnect for your app.

Resources