How to list All iPhone Apps By a SIngle developer in iPhone App? - iphone

In My Application I want show all my iPhone apps from itunes store in a tableview. If user clicks any one of cell it leads to take to appstore of that application.I know just statically by giving link of each application. As per my need i need to get new apps also after this installation.

You can use the search web service provided by Apple: http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html#searching
I couldn't find a way to search by artist ID for software, but you can still perform a generic query using the developer name.
For example, this would return apps by Gameloft:
http://itunes.apple.com/search?term=Gameloft&media=software&lang=en_US&country=us
Note that it's a query by name,so you can have false positives (apps where the name Gameloft appears but are not real Gameloft apps). You have to check the artistId property for each returned app (in this case, Gameloft's artistId is 282764297).
If you want to open the App Store to a specific app, use the trackId you got from the previous web service and then
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:
[NSString stringWithFormat:
#"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",
trackId]]];

Instead of doing your own table view, you can also use StoreKit to display the apps, and let the user purchase other apps right there.
Just replace 383916386 with the correct id for your developer account.
SKStoreProductViewController *viewCtrl = [[SKStoreProductViewController alloc] init];
[viewCtrl loadProductWithParameters:#{SKStoreProductParameterITunesItemIdentifier: #"383916386"} completionBlock:nil];
[self presentViewController:viewCtrl animated:YES completion:nil];

Related

Open itune link in app store?

My application is in 3 languages, i want to open app store on button click and link is my another application. But when i am sending link to app store , its always opening US market with English description. when i am using browser its going correct. Where i am going wrong.
-(IBAction)Button_us_itune:(id)sender{
NSString *ituneLink =#"https://itunes.apple.com/us/app/My_application/AppID?mt=8&ign-mpt=uo%3D4";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:ituneLink]];
}
-(IBAction)Button_fr_itune:(id)sender{
NSString *ituneLink =#"https://itunes.apple.com/fr/app/My_application/AppID?mt=8&ign-mpt=uo%3D4";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:ituneLink]];
}
-(IBAction)Button_du_itune:(id)sender{
NSString *ituneLink =#"https://itunes.apple.com/de/app/My_application/AppID?mt=8&ign-mpt=uo%3D4";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:ituneLink]];
}
It is might be because you are using/Logged in US store.
Actually it's pretty easy. You have two mistakes:
You are using country code in the links. i.e. you are mention exactly what store you want to open. This is bad because on some cases the user would open different store than the one you need. If you ask for US and user registered for another one you would lose him.
You probably can't tell which store the user is register to. So even if you create the the right link you can never tell which function to call (there is no API to know where the user is registered according to my knowledge - you can just know where he is or his language settings).
So, You could just remove the country code. i.e:
NSString *ituneLink =#"https://itunes.apple.com/app/My_application/AppID?mt=8&ign-mpt=uo%3D4"
But even then you would probably have problems with the link itself on some cases and in some OS versions.
I suggest you use a simple library called iLink that would figure out everything (at run time) and create the link you need that would work always. It also have a great feature that would prompt the user for an update if there is one on the store.
You are giving denmark app link. And I think you are logged in with other country.

iPhone dev - How can I call a phone number from within an app? Also, how can I hang-up from within the app?

Those are the two basic questions. First of all, I need to know if it's even possible to programmatically hang-up the phone from within my app (when the user presses a button, for instance). Also, is it possible to make a call from within my app, without having to leave my app? As in, the user can talk on the phone, but still see my app front and center the whole time?
Thanks
No to both questions*: it's not possible, unless you go to the dark side (jailbreak).
To know what kind of options are available to developers in regard to the phone functionality, take a look at Core Telephony's documentation.
You can pass a phone call by passing a url of the type tel://%# to [[UIApplication sharedApplication] openURL:url] but you can't "stay" in the App itself (phone.app will take care of the phone call).
When you programmatically make a phone call, your app jumps into the phone app.
You can make a phone call like this:
NSURL *url = [[[NSURL alloc] initWithString:[NSString stringWithFormat:#"tel://%#", kSavedNumber]] autorelease];
[[UIApplication sharedApplication] openURL:url]
Once you do this, the user will not be in your app, and they will be hanging up using the standard phone interface.

Rate my Application in iTunes within my Application in iPhone

I have to provide a link in my app where the user touches on it it will take me to the itunes Appstore page of my application where the user can rate the Application. I think other apps try to access the Appstore Application in the device and pass the corresponding url of the application in itunes... How to do this? Any ideas...
Here's my method; this goes straight to the App Store and to the Review/Rate page for my app:
- (IBAction)rateGame {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=409954448"]];
}
Just change the id at the end (409954448) to the id for your app. Also, if you track the launch count or something, you can trigger this method after, say 12 launches to increase ratings. I added this in my update and in about 2 weeks it generated 5 ratings. Very useful.
NSURL* urlToMyApp = #"http://url.to.my/app/in/the/app/store";
[[UIApplication sharedApplication] openURL:urlToMyApp];
You can also use,
See link below, It will redirect you on app store app details page.
StoreKit.framework not needed.
http://www.brianjcoleman.com/tutorial-how-to-add-write-a-review-rate-us-feature-to-your-app/
Notes :
If iOS >= 7 use, [[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:#"itms-apps://itunes.apple.com/app/idYOUR_APP_ID"]]];
This will not work on simulator so don't test on Simulator :-)

how to open app store with in our ipad or iphone application?

Hi i want to open app store with in our application with the specific publisher search or specific application types..on clicking of button..let's say More App's...
You can get the appropriate URL to your app here:
http://itunes.apple.com/linkmaker
If you enter the name of your company the linkmaker will provide an "artist link" that shows all of your apps.
If you use the itms-apps:// prefix the user is sent directly to the
App Store App with the specified app showing rather than the ugly
first-Safari-then-the-App-Store-App shuffle that you get without that
UTI. A la:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:
#"itms-apps://yourAppLinkHere"]];
To generate a link that is universal and not specific to an App Store Country do the following
Use
itms-apps://**ax.itunes**.apple.com/app/yourAppLinker
where yourAppLinker is the part of the link generated in (http://itunes.apple.com/linkmaker), as in Matthew Frederick's post, which contains your application name and id
it worked for me
cheers
For IOS7 and later for example:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms-apps://itunes.apple.com/app/id547101139"]];

In-app Review Link

I am trying to link directly from my app to the review page of an app.
This works perfectly with some of my App ID's, like this one [375031865]:
NSString *reviewURL = #"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=375031865&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
This also works (Same APP ID, different link format):
NSString *reviewURL = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=375031865";
But does not work with other App ID's, like this one [392551011]:
NSString *reviewURL = #"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=392551011&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
OR:
NSString *reviewURL = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=392551011";
I have no idea how the same exact link with a different APP ID in it will work for some apps but not others. The error that comes up is "Cannot connect to iTunes Store"
Any ideas?
Thanks!
for 392551011 = The DumDumb Exam HD
try:
NSString *reviewURL =
#"itms-apps://itunes.com/app/thedumdumbexamhd";
Entering the above URL into Safari on the device will take me to the App Store page. The URL string is the app name taken from the URL:
http://itunes.apple.com/us/app/the-dumdumb-exam-hd/id392551011?mt=8
then converted into lower case and the spaces and the dashes removed.
You should carefully find out your app ID! Sometimes it differs for desktop and mobile iTunes.
I used iTunes (copy URL) way and stuck with "Cannot connect to iTunes". It returned irregular app id!
So for me the answer is to check app id in iTunesConnect or here: http://itunes.apple.com/linkmaker/