Link to developer's apps - objective-c

How do I open the App Store on the Apple TV to show all the apps created by a specific developer?
The iOS way, http://appstore.com/DEVNAME, does not work on Apple TV.

I use this method:
NSString* url = #"some url";
[[UIApplication sharedApplication] openURL:[NSURL url]];

To get the details of a developer,
https://itunes.apple.com/lookup?id=1074241891
To get all apps by that developer,
https://itunes.apple.com/lookup?id=1074241891&entity=software
To get the apps based on localization,
https://itunes.apple.com/lookup?id=1074241891&entity=software&country=gb
or
https://itunes.apple.com/gb/lookup?id=514675684&entity=software
I don't know why it is currently making me download a js file, it is suppose to display JSON response in browser? Maybe just temporary?

Related

Open image from ALAsset representation in default Photos app

How can I open an image obtained from the Assets Library in the default 'Photos' app on iPhone? Ideally this should work without temporally storing a second instance of the image in my app's document folder.
I tried the following but there is no URL hook for "assets-library://":
NSURL *url = [NSURL URLWithString:#"assets-library://asset/asset.JPG?id=523360F1-385B-4E2D-8DF0-DA893AC631CE&ext=JPG"];
[[UIApplication sharedApplication] openURL:url];
Perhaps the better way is to use UIDocumentInteractionController, but it seems it would require saving the image to my documents folder first, which takes a few seconds on my device.
Thank you for any help!
Klaus
I don't believe iOS supports a URL scheme for opening specific photos in the photos app. If you want such a scheme to exist, the best you can do is file a radar.

Open Mobile Safari without using openURL:url

I want to open the Mobile Safari app "WITHOUT" changing its currently displayed page.
I can easily switch to Safari using ..
NSString *ourPath = #"http://www.google.co.uk";
NSURL *ourURL = [NSURL URLWithString:ourPath];
if ([ourApplication canOpenURL:ourURL]) {
[ourApplication openURL:ourURL];
}
But what I want to do is just switch to safari and not navigate away from the page it is currently on. Like when I switch using the task switcher, it just pops Safari and leaves it on the page it was.
I've tried sending it a url of #"http:" but this doesn't work it changes pages to to "http:localhost/"
Is there a way to just Open it?
Plasma
I solved this using the answers on this page ..
iOS How can I use UIApplication launchApplicationWithIdentifier which is in private APIs?
Though I didn't have to move my .app file in to /Applications
It was enough to add the entitlements, then simply call it using ...
[[UIApplication sharedApplication] launchApplicationWithIdentifier:#"com.apple.mobilesafari" suspended:NO];
Plasma
Could you open to a page that executes JavaScript history.back() when loaded?

How to programmatically add calendar subscriptions on iOS?

Via the settings panel of your iPhone, you can add a subscription to a remote .ics calendar format. I have a Dutch iPhone app that does this from within the app (see the screenshot below, "abonneren op de agenda" means "subscribe to the calendar"), but there must be others too.
I want to mimic this behavior for a project of mine, but I can't find the API to do this with. It looks like it's not a part of EventKit, but because there's no app switching going on when you hit 'subscribe' in the example app I suspect it's also not a url scheme.
Who knows?
Try something like this:
NSString *url = #"http://server/filename.ics";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
This shows an uialertview with the question to the user if he/she wants to subscribe.
;)

Sent text to notes

I'm trying to add a 'copy to notes' button in my app which sends a text to the notes app of ios. Is there any possible way to integrate this?
I've done some research and didn't find anything and since I've never seen it in an other app I guess it's not possible, but I thought It was worth a question.
Good question. Situations like the one you describe are always handled with URL schemes using the UIApplication method openURL:. For example, to launch the phone app with a specific number you could do:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"tel:1-234-567-8910"];
Or to launch the Mail app:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"mailto:nobody#example.com"];
Just to show a few examples. The Apple URL Scheme Reference document describes all of the various URL schemes to integrate with different system apps. Nowhere in this document does it mention a URL scheme for the built in Notes app. If it were possible to send text to the Notes app, I would expect the document to advertise the fact. While it's not conclusive proof that it's not possible, I still think it should be cited as strong evidence of such.
Note that there are likely several third party note-taking apps that have their own custom URL scheme that may support launching with text.

iPhone: Button "Vote in AppStore"

I would like to add a button "Vote Us" that opens App Store and brings automatically users to my app review page where they can vote my app.
How can I do it?
I think the easiest way to access specific pages on the App Store is to use the URLs, which are opened automatically on the iPhone using the Store app. For example, sending the user to http://itunes.apple.com/gb/app/polytune/id364009203?mt=8 takes them to the PolyTune page in the App Store. I'm not sure if there is a more direct way to achieve it.
Use this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:
#"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_ID&mt=8"
]];