BASIC

Author Topic: Urgent: Command for Open Browser with URL parameter - iPhone  (Read 4993 times)

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Hi There.

I am working on the lite version of my game, and I need some command / method to open a web browser with url parameter to point to full version of my game.
I open same topic some time ago, and conclude that a new command would be implemmented on next version of glbasic.

This command is implemented allready? I can't find in help file, and i really need urgent to try to improve sales.

King regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
MS have recently changed the rules on trial version of iPhone software, you no longer need two versions, trial and full... it may be easier to allow a method for unlocking your game to the full version?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Hi bigsofy,

Yep i know that now Apple let use App-in-Purchase on free App (before only can be used on pay App).
Would be great to have a method / command to use App-in-Purchase too, but meanwhile would be great to have a command to open web browser with parameter (and will be helpfull to open not only itunes links).

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline kaotiklabs

  • Dr. Type
  • ****
  • Posts: 313
  • Spain is diferent
    • View Profile
fjsantos,

can you post the name of your application?
I´d like to take a look. :)
thanks.
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
MS
??? "Apple"... I got Bill Gates in my head and I can't get him out! :P

I am pretty sure I saw a post the some one was working on calling the O.S. from within the iPhone to allow things like this but I can't find the post...
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
appstore.mm
Code: GLBasic [Select]
#ifdef TARGET_OS_IPHONE
#import <UIKit/UIApplication.h>

// change the ?id=... according to your app
extern "C" void AppStore()
{
        NSURL *appStoreUrl = [NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=329485776&mt=8&s=143441"];
        [[UIApplication sharedApplication] openURL:appStoreUrl];
}
#else
extern "C" void AppStore() { }
#endif
 

Your project
Code: GLBasic [Select]
REQUIRE "appstore.mm"
IMPORT "C" void AppStore()
 


Just call AppStore() then


Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Hi There.

@kaotiklabs: You can take a look here: www.tiptapgames.com.
@Kitty Hello: Thanks for sharing code! I will try inmmediatly. Only a question, apple let me use a custom mm library? (appstore.mm?).

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
I read again the apple sdk agreement and i think that I can't compile .mm files for iphone.

Any other suggestion, i really need this command!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
I have coded allready lite version of my game.
I really need this command or a suggestion.

King Regards, fjsantos
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
The .mm files are compiled as an objC source. It will be linked directly into your program as all your other code is. There's no loading of dynamic libraries nor any scripting involved. I'll never post anything illegal.

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Hi There!
Sorry, i misunderstood sdk agreement and code, my mistake!

I trying the code above but i have problems compiling (i didn't use require before).

The error is

Code: GLBasic [Select]
/cygdrive/D/Projects/Noid - Lite\appstore.mm:2:32: error: UIKit/UIApplication.h: No such file or directory
/cygdrive/D/Projects/Noid - Lite\appstore.mm: In function &#39;void AppStore()&#39;:
/cygdrive/D/Projects/Noid - Lite\appstore.mm:7: error: &#39;NSURL&#39; was not declared in this scope
/cygdrive/D/Projects/Noid - Lite\appstore.mm:7: error: &#39;appStoreUrl&#39; was not declared in this scope
/cygdrive/D/Projects/Noid - Lite\appstore.mm:8: error: &#39;UIApplication&#39; was not declared in this scope
 

Anyone can help me to compile this?

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Oh. You need the headers? Too bad. I'll implement that function as a hidden one, so you can use it easier.

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
That will be great!

I will wait impaciently for this.
I think that a lite version of my game, will definitly improve my sales and i will use this command to link lite version to full version.

Thanks for your time.

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline okee

  • Dr. Type
  • ****
  • Posts: 324
    • View Profile
Good idea fjsantos

Me personally i never buy a game in the appstore unless theres
a demo or a video of the gameplay, looks nice though
Good luck with it.

okee
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Thanks okee, i hope the lite versions helps!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com