Discussion Forums  >  Uncategorized

Replies: 22    Views: 272

paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
03/30/11 12:39 PM (14 years ago)

Problems with the Launching iTunes featrre

When I insert an itunes link and a user clicks on it to open it says Would you like to launch iTunes? there it gives the options Yes and No. It will not allow you to select No. Users have no choice but to get directed to itunes. Is there a fix for this?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 01:10 PM (14 years ago)
You're the first to report this. Fix, whatever it is, is gonna be simple but will depend on the version. v1.4 or v1.5?
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
03/31/11 12:44 PM (14 years ago)
Can I just add to this, I had the problem before where if 'Yes' was clicked from a custom HTML page for iTunes link, it would actually open up my custom HTML page in Safari. Then clicking the iTunes link a second time would open the App. Is there a fix that could be added where the iTunes link would open up the iTunes app instead of opening up in Safari? Many thanks. (v1.5)
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
03/31/11 12:51 PM (14 years ago)
thats funny because i want it to open inside the app and you want it to open itunes. lets just trade apps :-)
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
03/31/11 12:54 PM (14 years ago)
lol, how are you inserting the link? What kind of page are you using? My link is in a custom HTML page so it opens up Safari, not what i want. EDIT: It opens up Safari if I click 'Yes' to open iTunes
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
03/31/11 01:08 PM (14 years ago)
I'm using Custom URL - Webpage to add the Link
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/31/11 01:20 PM (14 years ago)
The native application that opens is determined by the type of URL it's trying to load. Look at line 550 or so in BT_screen_customHTML or BT_screen_customURL and scroll down a bit and try understand what's happening. It's inspecting the URL to see if it contains... itunes.apple (iTunes music store) phobos.apps (iTunes app store) map.google (maps) sms, mailto etc. This logic just presents you with the question. iOS itself is determing what app to launch natviely using the URL. This mean that it's not going to necessary open iTunes, or Maps, or Safari like you may expect. It all depends on the type of URL it's reading. In other words, iOS is controlling what app opens. Unless of course something isn't working right---sigh. Look at the console and make sure the URL that native app is trying to launch is the URL you want. If it's not, something's wrong. If it is, iOS decides which app to use.
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
03/31/11 01:42 PM (14 years ago)
I just tested with the custom HTML screen and set a background image and audio to play in the background. The HTML that I'm using is a button that was giving from iTunes with a link to iTunes song. So everything displays beautiful now with the audio playing and album artwork in the background and a button saying Download in iTunes. When clicked it will pop up launch itunes? and when I select Yes it opens Safari but its a Buzztouch URL with a white screen and My button in the middle. i have to click the button again to get iTunes to open. Is this normal? How can I avoid the link to open in the Buzztouch URL?
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
03/31/11 01:51 PM (14 years ago)
Youve put my problem into much better words ^, thats what I am trying to overcome at the moment. The opening of Safari and the Buzztouch URL. Ive dug into Xcode and looked at what David had said, I am beginning to see how it works, still a bit confused.
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
03/31/11 01:55 PM (14 years ago)
yes but is there's a way to avoid the itunes link from opening safari Buzztouch page and just open iTunes directly would be awesome
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
03/31/11 02:05 PM (14 years ago)
Thats the dream, Im sure theres a way round it. I think because the link from the button/image is 'html' then the iOS just assumes its a webpage and opens it up in Safari. Ive tried a few link variations online but I think it needs to be fiddled within Xcode rather than the actualy HTML code. Im looking at the Xcode information but I cant see anything I can change. Although I did find this... could be useful? http://www.apple.com/itunes/affiliates/resources/documentation/linking-to-the-itunes-music-store.html#apps
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
03/31/11 02:13 PM (14 years ago)
It looks like that just avoids the redirect feature. The problem I'm having is it's opening the Buzztouch file in Safari and you need to click the link a second time
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
03/31/11 02:32 PM (14 years ago)
Yeh its frustrating because it exposes the Buzztouch URL and uneccesarily opens the Custom HTML in Safari, and the user would have to once again see the page they already opened and then click the link for a second time. Even taking the user out of the app completely to use Safari. The 'itunes.apple' is being read correctly because it triggers the prompt of 'would you like to launch itunes?'. Which is why i think the problem lays within Buzztouch? Somehow we need to stop Safari being launched.
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
03/31/11 02:50 PM (14 years ago)
Ive just found a solution (I'll say very temporary because its annoying to do for all pages but...) When the custome HTML page pops open in Safari, I copied and pasted the Buzztouch link from my Device and emailed it to my Mac. Then if you come on Buzztouch and create a custom URL page - paste in the link and you'll have the HTML page you made up and it will open iTunes in 1 click. Annoying and inconvinient to do but it works.
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
03/31/11 03:04 PM (14 years ago)
Yeah I would have to do this for over 100 songs just for this one app lol
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/01/11 08:08 AM (14 years ago)
Hey guys... you should not have to visit an intermediate screen or page, especiallialy some buzztouch page in Safari. Sounds like something's broken. I'll need a few test screens. Can one you post a) The exact app name b) The screen with the 'buy in iTunes' link I'll find it, can't be too tought? I agree 100% that it's not acting as designed and as such your end users are getting a bogus experience.
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
04/01/11 08:57 AM (14 years ago)
Hi David, thanks for looking into this. a) Grime Mobile b) Wiley You'll see an artist music page, click on the Album artwork to bring up iTunes, not the actual iTunes icon at the bottom. Thanks.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/01/11 10:57 PM (14 years ago)
found it! Two files affected, both available on the download server now. BT_screen_customHTML.m and BT_screen_webView.m are the files that needed adjusting. The short story... the app needs to 'remember' the link you clicked so it can then launch the native app if you say 'yes.' It was not 'remembering' the URL for the link you clicked until 'after' it asked the question. Duh. This meant it didn't know what URL to open and defaulted to the screens current content. Fixed. You'll need to refetch and re-compile.
 
icedbreeze
I hate code!
Profile
Posts: 123
Reg: Nov 09, 2010
London
1,230
like
04/02/11 04:36 AM (14 years ago)
Great work again David works like a charm now :). Thank you.
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
04/03/11 07:02 PM (14 years ago)
hmmm wish I could say the same. I didn't make any changes since this issue and I downloaded the new package and installed on my iPhone. Now when it tries to load I just get a pop up on the phone saying No screens to display when I click OK it just stays Black screen. Any ideas?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/03/11 10:09 PM (14 years ago)
Did you removed the app (totally) from the sim before compiling the latest release? What's the console say? 'black screens' are caused by the app not being able to read the configuration data included in your project.... check the console, it should show what's wrong, or at least give some clues
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
04/04/11 03:27 PM (14 years ago)
This is for 1.5 iPhone, Yes I totally deleted the old version and redownloaded the new package,Build and Run on my iphone 4. What happens is the Black screen shows then the pop up No screens to display No errors are showing in xcode at all. Also same results in the simulator. The apps name is You Save the Day
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
04/04/11 03:37 PM (14 years ago)
Ok looks like I found a solution. I figured since it wouldn't load the splash screen to start there. I went to the splashscreen file in the control paned and hit save. Opened the app on my iPhone and refreshed the data and there it is, Back to normal :-)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.