Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-25-2011, 05:49 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 12
QQGuang is on a distinguished road
Default How to use [[UIApplication sharedApplication] openURL:] open other app?

Hi All,

I followed Launching Your Own Application via a Custom URL Scheme instruction to open app1(GlassButton) within app2(FontTest).

The open method of FontTest as following:

-(void)open {

BOOL res = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"glassbutton://"]];

if (res) {

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"glassbutton://"]];
}

}

The value of "res" is "YES", but nothing happen after openURL method be called. The info-list of "FontTest"as following:

URL Schemes: glassbutton

URL identifier: com.yourcompany.glassbutton

I tried to open twitter and facebook apps by "twitter://" and "fb://" successfully. But I do not know why I cannot open this small app. I'm not sure whether any thing/step wrong or missing? Need I handle - (BOOL)applicationUIApplication *)application handleOpenURLNSURL *)url for FontTest, if yes, how to handle it? Could you please kindly help me? Thanks in advance!
QQGuang is offline   Reply With Quote
Old 05-25-2011, 06:20 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

but glassbutton is a your app right? and you setted all the things for the protocol on glassbutton, right?
__________________
dany_dev is offline   Reply With Quote
Old 05-25-2011, 08:01 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 12
QQGuang is on a distinguished road
Default

Quote:
Originally Posted by dany_dev View Post
but glassbutton is a your app right? and you setted all the things for the protocol on glassbutton, right?
Hi dany_dev,

Yes, "glassbutton" is a small app. What protocol need be set in "glassbutton"? Sorry, I have no clue for this issue. Could you please provide more detail info about it? Thanks!
QQGuang is offline   Reply With Quote
Old 05-25-2011, 08:07 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

i said "protocol" but i mean custom url scheme.

However the question is not "glassbutton is a smal app or a big app" .

You can run another app only if that app support it, so if the app use custom url scheme. So I asked, "glassbutton is a your app? are you sure that you correctly wrote the code to handle custom url scheme?".

If glassbutton is NOT a your app and doesn't provide custom url scheme, so you will be not able to run it.
__________________
dany_dev is offline   Reply With Quote
Old 11-20-2011, 09:20 AM   #5 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 2
alpatel2007 is on a distinguished road
Default How can i returned my firstapp when i pressed home button.

I create one page in html5 and open it in uiwebview(browser) xcode. I open flashapp1 through url scheme (using uiapplication sharedapplication).
n. It's open well. but how can i return html5 page(webview). when i click home button pressed, flashapp close but not return my html page returned.
Give me any idea?.

HTML5 page here.
<html>
<a href="flashapp1://">Open Flash App1</a><br />
<a href="flashapp2://">Open Flash App2</a>
</html>
alpatel2007 is offline   Reply With Quote
Reply

Bookmarks

Tags
openurl, uiapplication

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 349
6 members and 343 guests
doffing81, dre, iOS.Lover, jenniead38, Kirkout, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0