I have recently seen in some Apps that review and rating (with 5 stars) can be integrated into the app. Does anyone have an idea how this is done? e.g. with a http request?
More specific: Can I create a view in my App with a UITextField and a Button, so that when the user writes his review in the textfield and click send, the review should be posted to the "Customer Reviews" in the App Store? and the rating should also be done inside the App similarly.
Yes, I did this with my own app. I have a rating button that hits the following method on click:
- (IBAction) reviewPressed: (id) source {
NSString *str = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=341086403";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
You will need to replace the ID in the URL with your own App ID. For new apps, this presents you with a chick-and-egg problem - you don't have an ID until the App goes live.
You can get your application ID by going in the process of submitting an app but choose to upload the app binary later. You will then get the app ID and thus add it in your code.
I think its late but this is the best solution.
You can use below url to directly send user to write a review page on App Store. Just need to replace application id.
itms-apps://itunes.apple.com/gb/app/id1136613532?action=write-review&mt=8
Example :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms-apps://itunes.apple.com/gb/app/id1136613532?action=write-review&mt=8"]];
Here My Application Id is 1136613532. You can replace it with yours.
Tested in iOS 10.3
Related
I want to open my ios app using URL schemes. I am able to open app using this.
But I want if app is not installed then app store should be opened where user can download app.
Is this possible? How can I do that?
EDIT
Explaining question step wise:
I have a mail in my inbox with a url.
I click on URL then
i. If app is installed in phone, app will launch.
ii. Otherwise app store will be opened to download app.
Thank
I handled it via my server side code:
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
location.replace("com.myapp://");
setTimeout(function() {
if (!document.webkitHidden) {
location.replace("https://itunes.apple.com/app/xxxxxxxx");
}
}, 25);}
else if ((navigator.userAgent.match(/android/i)) || (navigator.userAgent.match(/Android/i))) {
location.replace("https://play.google.com/store/apps/details?id=packagename&hl=en");}
else {
location.replace("http://www.example.com");}
I put this in my www.mysite.com/download page & share this url via campaigns.
What you're describing is called Deferred Deep Linking (Deep Linking refers to using a link to open your app, even directly to a specific piece of content, and Deferred means that it works even if the app isn't installed first).
Unfortunately there's no native way to accomplish this yet on either iOS or Android. URL schemes don't work, because they always fail if the app isn't installed. Apple's new Universal Links in iOS 9 get closer, but you'd still have to handle redirecting the user from your website to the App Store
A free service like Branch.io (full disclosure: they're so awesome I work with them) can handle all of this for you though. Here's the docs page covering exactly how to create email links like you described: https://dev.branch.io/features/email-campaigns/overview/
If your App is not installed in device then, you can open app store using below lines of code:
NSString *iTunesUrlofApp = #"itms://itunes.apple.com/us/app/apple-store/...";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesUrlofApp]];
Try below code:
if([[UIApplication sharedApplication] canOpenURL:url]){
// Means your app is installed, and it can be open
[[UIApplication sharedApplication] openURL:url];
}
else{
//Your app is not installed so, Open app store with your apps iTunes Url
NSString *iTunesUrlofApp = #"itms://itunes.apple.com/us/app/apple-store/...";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesUrlofApp]];
}
After iOS 5 you can also use https:// to avoid redirections.
Edit:
Check the link to open app from url if installed: Universal links to open app from Url.
Don't get this confused with the itunes linking. I know how to send a user to iTunes Store app with purple logo and that is not I want. I want to send the user to App Store app with blue logo.
itms://itunes.apple.com/us/app/myappname/myappid
Already checked this post, didn't answer my question: How to link to apps on the app store
The follow link sends someone to the App Store on iOS and allows them to review my app. Change the parameters and it will go to the App Store for your app:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Bouncing+Ball+Games&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=926193671
Sample code to open within an app:
NSString *iTunesLink = #"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Bouncing+Ball+Games&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=926193671";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
some basic questions for a very basic app:
For the first time when the app runs, the user is presented with a screen where an ID (number) has to be selected. This ID is then embedded in a URL that is used when launching Safari as the user is pushes a Start button. The ID is stored in the user preferences.
The second time the app is launched, I just want to read out the ID from user preferences and launch Safari, without the user seeing the ID screen or pushing any buttons.
The first scenario I got working by reading out the ID in viewDidLoad etc.
For the second scenario I'm pretty much clueless. Where should that code be placed. Is it technically possible? Would Apple accept this?
Yes, It's possible. And why Apple would not accept this? Just use this code:
[[UIApplication sharedApplication] openURL:url];
url - your composed URL with user ID.
Up to now (with iOS < 6.0), I used the following URL and code to send the user directly to the review page of my app (to rate it with 5 stars and post a friendly comment :)):
NSString *stringUrl = #"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=XXXXXXXX&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8";
NSURL *url = [NSURL URLWithString:stringUrl];
[[UIApplication sharedApplication] openURL:url];
This code doesn't work anymore when I run my app on a device with iOS 6 (and the new appstore of iOS 6). The appstore opens but then I have got an alert saying "Cannot connect to Appstore".
Anybody knows how to send the user directly to the review page of the Appstore on iOS 6 ? (note that I know how to send the user on the description of my app by this not what I want !)
Thanks !
Use url like this
https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?type=Purple+Software&id=561892747&mt=8&o=i
I found it on a link to "write a review" in Apple receipt email.
I guess apple almost fixed the issue, since it can go to the review page directly with the same address again. Users still need to tap the button of review on iOS6 after they are directed to the review page though.
I noticed that on the latest angry birds update they added a feature to gift your app from inside the app.
Up till now I knew you can gift paid apps from the iTunes itself. Does anybody know what link should I use to access this mechanism from inside the app itself?
Thanks!
Actually, you'll want your URL to start with itms-appss: if you want it to open in the App Store app, where someone would actually gift an app. This feels more natural than Safari popping up.
// example app id for batman arkham city lockdown
#define APP_ID 459850726
NSString *GiftAppURL = [NSString stringWithFormat:#"itms-appss://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/giftSongsWizard?gift=1&salableAdamId=%d&productType=C&pricingParameter=STDQ&mt=8&ign-mscache=1",
APP_ID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:GiftAppURL]];
APP_ID should obviously be defined to the Apple ID of your app.
Also worth noting, the URL is case sensitive.
If you watch what happens when you click that button, you can see that it initially makes a request to a redirect script on www.angrybirds.com:
http://www.angrybirds.com/redirect.php?device=iphone&product=angrybirds&type=purchasegift
From there you are redirected to a secure url of the form:
https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/giftSongsWizard?gift=1&salableAdamId=343200656&productType=C&pricingParameter=STDQ
343200656 is the AppleID for Angry Birds.
I have here some step-by-step instructions in how to add a 'Gift This App' button into your app:
Add a button in your XIB and add an action to it.
In your .m add the actions brackets e.g:
-(IBAction)actionName {
}
add this code in and replace APP_ID with the number in the apps web page link for e.g.
itunes.apple.com/au/app/[APPNAME]/id**APP_ID**?mt=8
this is a code e.g:
- (IBAction)actionName
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/giftSongsWizard?gift=1&salableAdamId=**[APP_ID]**&productType=C&pricingParameter=STDQ"]];
}
Hope this helps!