How to link to the iTunes store from iPhone app? - iphone

I am trying to set up an application in which users will be able to stream music. When the user is streaming a MP3, I'd like to set up a link to the iTunes store to buy the MP3.
How can I do that? I feel like there should be some simple way of doing so using the song title and artist name, am I mistaking?
Thanks

You can experiment with the iTMS Link Maker that Apple provides and see how the links are formed. In addition, here is the iTMS Link Maker FAQ.
See this blog post about how to query the iTMS Link Maker automatically. Basically, you can query the iTMS Link Maker and get an XML document back that your application can process.

The iTunes Store Web Service Search API (pdf), although old and incomplete, documents how to search for content in the iTunes store and returns a JSON string with results.
The iTunes Store Web Service Search API allows you to place search fields in your website to search for
content within the iTunes Store. You can search for a variety of iTunes Store content; including movies,
podcasts, music, music videos, audiobooks, and TV shows. You can also call an ID-based lookup request to
create mappings between your content library and the iTunes Store content library.
Queries are sent to base url:
http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?parameterkeyvalue
Where parameterkeyvalue can be one or more parameter key and value pairs indicating the details of your
query.

Ok, I had this same problem and the answers here did not give me enough info. So I asked this question again with different wording, and continued to search for an answer. I ended up answering my own question in the other question, and have posted the code to do this over there.
You can find the question at:
Opening iTunes Store to specific song
It contains all the code you will need to open the iTunes Store to the specific song specified by song name and song artist.
I hope this helps someone.

Creating a link to the app store could be very problematic. I suggest you use a simple library called iLink that I found when searching for a solution for this exact issue. It would figure out everything and create the link you need that would work always. Another great thing is that it is super easy to use.

Related

Using Youtube as video storage for my app

I am still relatively new to these topics.
I am programming my app in Flutter and I can already use Flutter to play a foreign video from Youtube in the app.
I want to upload in Youtube all my video resources as private to be able to display them in my app.
Is there any documentation on how to do this? What are the costs per request?
Is Youtube even right for such a mobile app?`
I was going to use Firebase cloud storage, but think that can get very expensive once I release the app.
What other options would I have?
This question isn't really suitable for StackOverflow, since it's basically just asking whether you can use YouTube.
That being said, as long as you don't violate the T&C of YouTube and you're fine with storing all your videos on their platform, yes, you can do this. Using YouTube this way is free as of now. But note that there is a difference between "private" and "unlisted".
You can create a profile on youtube, upload as many videos as you want and list them as unlisted, meaning you can only find the video if you have the link, then in your app link the vides to whatever selection method you have. so ex I have a button when clicked launches a specific unlisted youtube url link and plays the video.
It would be the same as if someone was searching your video publicly and playing it, both are free.

Accessing music library and playlists on iPhone

On iPhone, I'd like to be able to allow the user to select a song from their iTunes library.
Also, I was wondering how an app can access the specific playlist that song resides in (and how my app can access other songs in that playlist).
Since you've asked a fairly open question, all I can suggest is have a look at the iPod Library Access Programming Guide to get started and then come back with a more detailed question after you've tried some thing.

Application to download video from youtube

I making an application to view videos form youtube, and I think it is very easy to write a code to make the user be able download the videos and save it in the documents folder of the application, my questions are:
1) is it legal to do this, and is there any concern of the application being rejected?
2) is it possible to make the user watch the video and when he finish (watched all the video) get this data and save it, (not to download it again since he already watched the video and downloaded it).
I believe that this is a grey area. In general, you are not allowed to download copyrighted videos without paying for them. The official YouTube stance is rather interesting. This link tells you http://support.google.com/youtube/bin/answer.py?hl=en&answer=56100 that it is not supported except in one instance, that is, if you are downloading your own videos.
It then goes on to list various restrictions and policies on downloading your own videos. Note however, that not supported does not mean debarred. For further reading, please visit this link: http://news.cnet.com/8301-13739_3-9936833-46.html which is more readable for the general audience than a litany of policies. Therefore, in response to your questions:
This is in a grey area. Your application may or may not be rejected. Organizations are cracking down on copyrighted videos up on websites like YouTube. However, YouTube does not explicitly debar your application. A cursory Google search will reveal that there are many applications which allow you to download YouTube videos. For ethical concerns, I will not post any here.
What do you mean when you say "this data"? If all you are interested in are usage and view statistics of users on YouTube then I urge you to look at the YouTube API where you can do all this fun stuff without resorting to downloading a whole bunch of videos in your application.
1) Depends on luck. but, may be rejectd. Is far more likely to be rejected.
becauseof following Youtbe TOS. My app had been rejected by Apple.
For the following reasons:
22.4
We found that your app contains information that may allow its users to download YouTube content, which is not in compliance with the YouTube Terms of Service.
"...You shall not download any Content unless you see a "download" or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content."
also refer following site question. that's very important. you will definitely need to read.
http://www.iphonedevsdk.com/forum/business-legal-app-store/88260-youtube-downloader.html
2) Available. But, like I said above, to download YouTube video have a potential risk.
1) is it legal to do this, and is there any concern of the application
being rejected?
I'm not sure it's illegal; but it's definitely against YouTube's TOS. And, if you plan on getting your app approved in the App Store, then trust me : forget it.
2) is it possible to make the user watch the video and when he finish
(watched all the video) get this data and save it, (not to download it
again since he already watched the video and downloaded it).
Yep, that's doable.

how can i download from apps store through xcode [duplicate]

I am trying to set up an application in which users will be able to stream music. When the user is streaming a MP3, I'd like to set up a link to the iTunes store to buy the MP3.
How can I do that? I feel like there should be some simple way of doing so using the song title and artist name, am I mistaking?
Thanks
You can experiment with the iTMS Link Maker that Apple provides and see how the links are formed. In addition, here is the iTMS Link Maker FAQ.
See this blog post about how to query the iTMS Link Maker automatically. Basically, you can query the iTMS Link Maker and get an XML document back that your application can process.
The iTunes Store Web Service Search API (pdf), although old and incomplete, documents how to search for content in the iTunes store and returns a JSON string with results.
The iTunes Store Web Service Search API allows you to place search fields in your website to search for
content within the iTunes Store. You can search for a variety of iTunes Store content; including movies,
podcasts, music, music videos, audiobooks, and TV shows. You can also call an ID-based lookup request to
create mappings between your content library and the iTunes Store content library.
Queries are sent to base url:
http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?parameterkeyvalue
Where parameterkeyvalue can be one or more parameter key and value pairs indicating the details of your
query.
Ok, I had this same problem and the answers here did not give me enough info. So I asked this question again with different wording, and continued to search for an answer. I ended up answering my own question in the other question, and have posted the code to do this over there.
You can find the question at:
Opening iTunes Store to specific song
It contains all the code you will need to open the iTunes Store to the specific song specified by song name and song artist.
I hope this helps someone.
Creating a link to the app store could be very problematic. I suggest you use a simple library called iLink that I found when searching for a solution for this exact issue. It would figure out everything and create the link you need that would work always. Another great thing is that it is super easy to use.

Access iPhone User Songs and Videos?

I was wondering if I can access user's songs and videos in iPhone, part of that access if I can save them or modify them? hopefully not a Jailbroken iPhones
I am greatly appreciated.
Yes, you can. I can't speak for video, because I've only done it for audio, but you can definitely get audio data. These links should get you started. Note: I am as yet unsure if this works with tracks that use any kind of iTunes-related DRM.
First of all, this blog post talks you through the method of accessing the data. Note the reliance on iOS 4.1 or above.
This SO question/answer explains how to get at the raw pcm data, should you want to do more than just save it out.
You can allow the user to pick songs using the MPMediaPickerController class. I think you can save the selected item to your app's sandbox directory.
You can read up on this a bit more with this SO question.