Can't list all my application in iOS5 - iphone

I use the following code to list all my applications in the App Store.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms-apps://itunes.com/apps/AbcCompany"]];
It works fine on iOS 4.3 but lists nothing on iOS 5. Does anybody know how to solve it?

Please check whether apple approve that apps, if it approved app means then only you can see on iTunes before that it does not open.
Please follow this structure:
itms://itunes.apple.com/us/app/my-app-name-is-new/id389921?mt=8
If you need further information contact me

Related

Open iTunes reviews tab inside the app

I know there are so many posts talking about this issue. I was trying to do this but didn't get a good result. I can open iTunes inside the app using SKStoreProductViewController, but I can't open the reviews tab directly, and I can do that with the function openURL but I have to leave my app and go to the app store.
Basically my question is if someone know about an app doing that, I would like to know if that's possible, probably you don't have a solution but I just want to know if you saw that before, so I can take a look and try to understand how to do it, probably with a tricky solution (like using UIWebView or something like that, I didnt get a good result with that).
UPDATE:
Im asking for a solution to open iTunes and reviews tab directly WITHOUT LEAVING MY APP.
or
The name of any game doing that, to understand what's doing.
Thanks
This is not possible for IOS 10.2 or lower.
Now iOS 10.3 introduces SKStoreReviewController component to rate the app directly from your app.
https://developer.apple.com/reference/storekit/skstorereviewcontroller
I make this way in my app:
NSString *iTunesLink = [NSString stringWithFormat:#"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%#&mt=8", ITUNES_CONNECT_APP_ID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];

iPhone- Open Settings from my application iOS 6

I know there are many questions related to this.
1) is it possible to open Settings App using openURL?
2) Opening the Settings app from another app
3) iOS Launching Settings -> Restrictions URL Scheme
I have followed these questions for reference but that does not solve my query. I know that using openURL method you can open Settings but that was valid for only iOS 5.0 - 5.0.1. In iOS 5.1 it was deprecated.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
Still I have been seeing lot of Apps mainly location based which asks for user permission to turn on Location Services and takes directly to Location Services under Settings--> Privacy. The screenshot of an App, which is installed on iOS 6.1 running device, below shows that tapping on Settings take you to directly Location Services.
I tried to run code in my App but it is not working (I want to take user to Settings page to allow my app to access contact information directly from my App). If Apple has disabled URL Schemes for this how come many Apps are still using it?
For apps that tie into services such as Location, the first time they request access the OS will throw out the alert with buttons that link to Settings. This isn't actioned by the app, but by the underlying security of the OS.
iOS 6 removed the ability to do this yourself as you mentioned.
You can open settings app programmatically in iOS8, but not in earlier versions of iOS.
In Swift:
UIApplication.sharedApplication().openURL(NSURL(string:UIApplicationOpenSettingsURLString));
Swift 4:
if let url = NSURL(string: UIApplicationOpenSettingsURLString) as URL? {
UIApplication.shared.openURL(url)
}
In Objective-C
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

Iphone:Taking the user to setting menu if internet is not connected

I followed this link iPhone reachability checking
but can anyone help me with if the user has not connected to internet how to take him to setting menu
If your application only supports iOS 5 and below target version then you can use below code to achieve this.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
Please note that this is diable in iOS 5.1.
In iOS 5.0 and 5.0.1 you can use this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
However, in iOS 4.3 and older and in iOS 5.1 and later, this URL scheme is not associated with the Settings app - if you want your app to be accepted in the AppStore, you don't really have any option other than asking the user to go to Settings. However, if jailbroken/non-AppStore development is an alternative, you can use a private function for opening an app:
SBSLaunchApplicationWithIdentifier(CFSTR("com.apple.preferences"), false);
This function is located in the SpringBoardServices private framework.
I should make a NSTimer within you appdelegate which loops (for example each 30 seconds). When this method is fired (on every 30 seconds) you check for the current internet connection. If this connection fails then you navigate to the settingsviewcontroller else you do nothing.

Open iPhone settings through code not working in iOS 5.1.1

i tried these commands-
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=LOCATION_SERVICES"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=General"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=Wallpaper"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=Safari"]];
These codes opens Location, General, Wallpaper and Safari respectively in iOS 5.0 but nothing works in iOS 5.1.1
Anyone have any idea?
In iOS 5.1, the prefs: URL scheme has been removed. You can't use it anymore.
If using private APIs is an option, you can try this:
SBSLaunchApplicationWithIdentifier(CFSTR("com.apple.Preferences"), false);
You have to link against the SpringBoardServices framework then.
Just a quick addition to #H2CO3's answer (that wouldn't fit in comments). I was using that solution in my Cydia app to open the settings, combined with an entitlements file containing the following entry:
<key>com.apple.springboard.launchapplications</key>
<string>true</string>
This was I believe the way Xcode formatted the entitlements file. And this worked fine on my two test devices. However, several beta testers mentioned that the settings app wasn't being opened. I noticed that several examples of entitlements files used a different format to indicate the value of a key:
<true/>
I tried this out on a device that didn't work with the first entitlements entry, and the settings app actually opened.
So I'm posting this in case anyone else has a similar problem. (Running the app as root may also be a solution, but I didn't try that.)

Using twitter:// tweetie:// custom scheme on iPhone to open twitter application to a specific user profile

I thought I was familiar with the applications custom schemes used with iOS to trigger applications from my app but I'm unable to use the ones that seems to be provided by the official twitter app (aka tweetie).
I'm trying to open the twitter application directly to a predefined user profile.
From the documentation found here http://handleopenurl.com/scheme/twitter this should be feasible, but this code doesn't work :/ :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"twitter://user?id=41553213"]];
I also tried with tweetie:// but the same happens : the application launches, but does not "jump" to the given user profile.
Actually, if I try any of the other examples, I don't get anything working :(
twitter://messages
twitter://mentions
none of them are working :(
Any idea why none of those invocations are working ?
Thanks.
N.B:I'm using the last version of the twitter application under iOS 3.1.3 (iphone 3G)
very strange, after removing the application, downloading it again from the appstore, it appears it works ? :O Maybe I wasn't exactly on the very last one ?! At first I thought it was because I had multiple accounts set up, but no, even with that it works now. Strange, but cool.