I am trying to launch an appstore page with either of the calls:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.apple.com/us/app/myappname/id999999999?mt=8"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://www.itunes.com/apps/myappname"]];
Both of these urls work when I enter them in a browser. However, from both simulator and device, I get a "Your request could not be completed" error dialog right after it appears to try to launch the appstore.
Is there something obvious that I'm doing wrong?
I think I see what is going on. I believe the problem is that I'm testing the url with an existent iPhone app. When I go to launch it from my iPad app, it disallows it because the app doesn't work on iPad.
Related
I have a IOS settings screen (on ios 8.0) which gets generated using this code:
[[UIApplication sharedApplication] registerUserNotificationSettings:
[UIUserNotificationSettings settingsForTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)
categories:nil]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
the result looked like this it seems:
My goal is to remove just the notifications area but i'd like to let the privacy and 'use cellular data' remain.
On the simulator there is no privacy and 'use Cellular Data' appearing. Is this whole issue because im on a simulator ?
If you use "registerForRemoteNotifications" this settings will be there automatically and can't be omitted. You are not allowed to disable user notifications settings if you want to use notifications.
This could be out of date, but according to Technote 2265:
Resetting the Push Notifications Permissions Alert on iOS
The first time a push-enabled app registers for push notifications, iOS asks the user if they wish to receive notifications for that app. Once the user has responded to this alert it is not presented again unless the device is restored or the app has been uninstalled for at least a day.
If you want to simulate a first-time run of your app, you can leave the app uninstalled for a day. You can achieve the latter without actually waiting a day by following these steps:
Delete your app from the device.
Turn the device off completely and turn it back on.
Go to Settings > General > Date & Time and set the date ahead a day or more.
Turn the device off completely again and turn it back on.
I would like to have a response from someone else and confirm if this is something that has changed on iOS8 or if I have another problem in my project.
I was trying to move the notification permission popup and call it later, but after several test I see I cannot do that with iOS8, it works fine on iOS7.
And I have the following confirmations:
-On iOS8 there's no need to call "registerForRemoteNotifications", the popup appears anyway. (it was "registerForRemoteNotificationsTypes" before but now is deprecated on iOS8 and there seems to be a "registerForRemoteNotifications" that is referenced on the official documentation but there's no documentation for that new method specifically)
(https://developer.apple.com/library/IOs/documentation/UIKit/Reference/UIApplication_Class/index.html)
-I removed the entitlements from my app and the popup also appears, so probably it takes that info from the prov instead of descriptor.
Any though on this? anyone can confirm if this is true?
Thanks
There's not so much documentation about this, but after watching an official video from Apple, and reading more about all these new functionalities for notifications on iOS8, I could understand what's happening with the popup.
First I was using AIR 14 that had a bug for iOS8 and the permission popup appeared even without calling any specific native method in UIApplication, that was fixed on AIR 15.0
Also, there's no more permission popup for remote notification on iOS8, users can receive notifications by default, and they can disable that from the device settings (anyway we should request the token as usual).
The permission popup that we see in iOS8 is for local notifications, and it appears when we call this method:
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
All that explains the weird behavior that I had before, and actually I could clarify and fix this issue.
I am a bit confused... I have researched about URLs to use for sending users to the review page on the app store
I have tried:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=842516162&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8
and also:
itms-apps://itunes.apple.com/app/id842516162
I have an iPad (4th gen) and latest iPod, on the iPad it works correctly, on the iPod it comes up with a blank page.
Both are running 7.1.1
What do I need to do to get it to work on the ipod touch?
Try this
NSString *str = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=842516162";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
This question already has answers here:
Direct "rate in iTunes" link in my app?
(5 answers)
Closed 9 years ago.
Application development is completed. It is not yet submitted on iTunes, but I have a flow to show the iTunes review screen from application.
How do we redirect the iTunes review from application?
I have tested using the below code...
NSString *str = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=337064413";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
Do we only need to change the application id for my application?
For iOS 7 use this link:
itms-apps://itunes.apple.com/app/id337064413
Change 337064413 to your app's id
The code will look like this:
NSString *str = #"itms-apps://itunes.apple.com/app/id337064413";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
However, this approach will not bring you to the Review page, you'll get App Description page. There is no way to send user directly to Review page anymore.
I must show EULA on the first launch. I want to close the app if user doesn't accept it. What is the proper way to do it so that the app will be accepted to app store?
I read that using exit(0) and [[UIApplication sharedApplication] terminate] is not the way to go.
Apple doesn't want you to exit the app because it looks like a crash. That is why they made -[UIApplication terminate] private and will reject your app if you use it. They don't seem to reject apps that use exit and I've seen apps exit themselves but I agree with Apple that it's not good UI behavior on iOS, it does indeed feel strange if you get thrown back to the home screen without having pressed the home button. So I recommend you simply show a screen with a message along the lines of "You cannot use the app without accepting the EULA. Either accept the EULA or press the Home button".
You can suspend the app and it gives the appearance that the app is closing.
UIApplication *app = [UIApplication sharedApplication];
[app performSelector:#selector(suspend)];