Launch Podcast App With URL scheme - ios

I'm trying to open the podcast app with a url like this
- (void)setupPodcast
{
NSLog(#"setup podcast");
NSString *str = [NSString stringWithFormat:#"pcast://podcasts.sdxme.org/RSS/default.aspx?ID=%ld", (long)[[NSUserDefaults standardUserDefaults] integerForKey:#"CustomerID"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
2015-10-18 23:45:11.367 [29302:1691034] LaunchServices: ERROR: There is no registered handler for URL scheme pcast
However it looks like the pcast scheme is no longer supported? How can I open my own XML feed in the podcast app?

As per Swift 4,
We should use the below url schemes to open podcasts app from our app.
Podcasts (Add Feed By URL) — podcast:// (you can also add a feed URL after to auto-populate it)
Podcasts (Browse) — pcast:// or itms-pcast:// or itms-pcasts:// or podcasts:// or itms-podcast:// or itms-podcasts:// (displays a "can't connect" error)

MacOS Majave needs pcast://
IOS podcast://

I believe Apple changed their recognized podcast scheme and you should now use 'feed://...'.

Related

What should be give in URL Scheme and callback url in Square Connect

I want to use square connect as payment gateway in my ios app.I confused what should be given in Ios app Url scheme in square connect website as well as in my Info.plist file and in my code too.
I had done in different type
NSURL *const callbackURL = [NSURL URLWithString:#"your-url-scheme://myCallback"];
SCCMoney *const amount = [SCCMoney moneyWithAmountCents:100 currencyCode:#"USD" error:NULL];
[SCCAPIRequest setClientID:#"YOUR_CLIENT_ID"];
SCCAPIRequest *request = [
SCCAPIRequest requestWithCallbackURL:callbackURL
amount:amount
userInfoString:nil
merchantID:nil
notes:#"Coffee"
customerID:nil
supportedTenderTypes:SCCAPIRequestTenderTypeAll
clearsDefaultFees:NO
returnAutomaticallyAfterPayment:NO
error:&error
];
What should be given in Ios app Url scheme as in the pic and call back url in the code?
You can choose the url scheme for your application. If you look at the sample application's info.plist, they use hellocharge. You'll need to choose one to use for your application.
See also the Square Point of Sale iOS guide.

Using HERE URL scheme doesn't allow tapping the Start button

We are using the HERE URL Scheme to pass coordinates. E.g. here-place://{lat},{lng}
NSString *mapDirHere = [[NSString stringWithFormat:#"here-route://%1.6f,%1.6f,%#/%1.6f,%1.6f,%#", latitude, longitude, NSLocalizedString(#"Current Location", nil), self.selectedCoordinate.latitude, self.selectedCoordinate.longitude, self.titleName] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:mapDirHere]];
This does open HERE with the correct route, but the "Start" button is never activated, so our users can't start the route.
Has anyone else seen this?
The HERE iOS SDK comes with an example for starting and stopping navigation as you would like to implement in your use case.
https://github.com/heremaps/here-ios-sdk-examples/tree/master/turn-by-turn-navigation-ios-swift
All examples are updated with every update of the SDK so check them out at:
https://github.com/heremaps/here-ios-sdk-examples

Open a specific Google Sheet sub-sheet using the googledrive url scheme and the iOS Sheets App

Is it possible to link to a specific sub-sheet in the Sheets app for iOS using the googledrive:// or googlesheets:// URL scheme?
Using the URL and querystring parameter (gid=) displayed in the browser doesn't seem to do the trick.
There is unfortunately no options to open a specific sub-sheet using the url scheme
To open a specific sheet in the Google Sheet app for iOS you can use the URL scheme for Google Sheets (googlesheets://). Insert the URL address for the specific sheet after the last slash.
In Safari
googlesheets://https://docs.google.com/spreadsheets/d/...
Objective-C code
NSString *url = #"https://docs.google.com/spreadsheets/d/...";
NSString *string = [NSString stringWithFormat:#"googlesheets://%#",url];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];
Swift code
let url = "https://docs.google.com/spreadsheets/d/..."
let string = NSURL(string : "googlesheets://\(url)")
UIApplication.sharedApplication().openURL(string!)
This will work if you only want to open a specific sheet 😊

Rate this app funtionlity

i am trying to provide the rate this app functionality into my application hence i added the below code
- (void)gotoReviews
//------------------
{
NSString *str = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
str = [NSString stringWithFormat:#"%#/wa/viewContentsUserReviews?", str];
str = [NSString stringWithFormat:#"%#type=Purple+Software&id=", str];
str = [NSString stringWithFormat:#"%#APPid", str];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
str = [NSString stringWithFormat:#"%#APPid", str]; here i have to mention my app id.i see the appid into the provisioning portal as following 546F5QMTE4.com.XXXX.XXXX into the APp id section.
Is that the "546F5QMTE4" string need to placed? am i right is that correct id?
please let me know
You can do this in many ways:
Direct approach:
#define APP_ID XXXXX //id from iTunesConnect
NSString *reviewURL = [NSString stringWithFormat:#"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",APP_ID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
Try with Appirator in app delegate:
[Appirater setAppId:#"552035781"];
[Appirater setDaysUntilPrompt:1];
[Appirater setUsesUntilPrompt:10];
[Appirater setSignificantEventsUntilPrompt:-1];
[Appirater setTimeBeforeReminding:2];
[Appirater setDebug:YES];
You can get source: Here.
Add Appirater.h and Appirater.m to your project.
For more information about integration: Here
:)
No, it is not that number. You have to go to the iTunesConnect -> Manage Your Apps, choose your app, then look under "App Information" for Apple ID (digits only).
Of course be sure that you have actually a record for your app. If not, just make it (Add New App button).
iRate is best https://github.com/nicklockwood/iRate
The one that I use and works wonders on iOS 5+ (also available for Mac OS X, but this answer is focused on the iOS portion) and up on all devices (iPad, iPhone, iPod Touch) is iRate.
It uses a uialertview and storekit to ask the user for a rating (or to remind them later). Everything is customizable, from the name of the Cancel Button Title to the Interval at which it reminds the user.
By default, iRate automatically opens when certain requirements are met (ex. app launched X number of times, user passed X number of levels), but you can also use a variety of methods and your own logic (with the help of iRate methods) to manually display an iRate popup.
Setup
To install,
just drag the header (.H) file the implementation (.M) file, and the iRate Bundle (for localization) into your project.
Import the header in your AppDelegate: #import "iRate.h"
Add the StoreKit Framework to your project - More on StoreKit from Apple Documentation
Add the following method to your app delegate: + (void)initialize
The properties can be set in the initialize method, however none of them are required (iRate can automatically find all of this information).
No, it isn't. It's rather a numeric ID with a few digits, something like this:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=389801252&pageNumber=0&sortOrdering=1&type=Purple+Software
This will only be live when your application has been approved by Apple and it's already on the AppStore (in case of an intentionally delayed launch).
Furthermore, the way you're composing that poor URL string is simply horrible. Don't abuse format strings! You have a constant string here, so you don't even need any call to + [NSString stringWithFormat:]. Even if you wanted to alter the app ID, you could do that using one single formatting statement:
NSString *str = [NSString stringWithFormat:#"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%#&pageNumber=0&sortOrdering=1&type=Purple+Software", appID];

Direct link to App Store on iPad?

Is there an URL that will directly open an application in the App Store on the iPad without redirecting through Safari? I am interested in http:// links, not itms://, as I want them to be usable outside the device. The phobos links used on iPhone do not seem to work on the iPad.
My current workaround is this:
NSURLRequest *myRequest = theRequest;
NSURL *urlFromMyRequest = [theRequest URL];
NSRange foundPhobosServer = [[urlFromMyRequest host] rangeOfString:#"phobos.apple.com"];
NSRange foundItunesServer = [[urlFromMyRequest host] rangeOfString:#"itunes.apple.com"];
if(foundPhobosServer.location != NSNotFound || foundItunesServer.location != NSNotFound)
[[UIApplication sharedApplication] openURL:[request URL]];
Basically I check the URL to see if it's coming from phobos.apple.com or itunes.apple.com. If it is, then I just ask the system to open it for me. The system can recognize if the URL is from the App Store and will do the right thing and open the App Store app.
Additional note: This will quit your app.

Resources