Thanks, got it working. [import]uid: 5712 topic_id: 6315 reply_id: 24512[/import]
Instead of waiting for the next release of Corona SDK and then playing catch-up with CPM, is there any way for me to tell what version of Corona Simulator is being used? I looked in info.plist and didn’t see anything that related to the current release (268).
I’d like to put some code in the next version of CPM so things will go smoothly from launching via command line to launching via URL.
Any ideas?
Thanks.
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 24581[/import]
Instead of waiting for the next release of Corona SDK and then playing catch-up with CPM, is there any way for me to tell what version of Corona Simulator is being used? I looked in info.plist and didn’t see anything that related to the current release (268).
I’d like to put some code in the next version of CPM so things will go smoothly from launching via command line to launching via URL.
Any ideas?
Thanks.
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 24582[/import]
. [import]uid: 5712 topic_id: 6315 reply_id: 24598[/import]
Funny, we had a internal discussion on versioning not long ago because Windows currently omits version numbers in the right places which are required for the installer to be able to handle upgrades correctly. We’re in the process of fixing that, but it was noted that the Mac is not also not doing version numbers in the right places. It was also noted that nobody seemed to notice and hasn’t been an issue. [BUSTED]
Just so we don’t miss anything in trying to fix this, is defining CFBundleVersion in the Info.plist sufficient? What should that version number be? Year.Build (e.g. 2011.302)?
[import]uid: 7563 topic_id: 6315 reply_id: 24604[/import]
I (or anybody else) should be able to grab the info.plist, so that should work. year.build sounds fine, too, although that brings up the question, how will I know ahead of time what the release build number will be?
I guess I won’t, and could just do something like: if buildNum > 268 then do other thing
Not the best solution, but it could probably work.
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 24613[/import]
Hey Ansca staff…
-
Is the URL-based calling of the simulator supposed to work for the current release of the Mac version?
-
Is it supposed to work for the current release of the Windows version?
I’m having a trouble with the following command and just want to make sure the SDK is working as it’s supposed to.
corona://open?url=file:///Applications/CoronaSDK/SampleCode/GettingStarted/HelloWorld
Running that in the terminal says “No such file or directory” in the terminal – the simulator is not launched.
Running that same line in a browser brings up the simulator and launches the project.
Any ideas?
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 37548[/import]
-
Yes
-
No
-
That is a URL, not a command line tool. You need to feed the URL to a tool that knows how deal with URLs. Safari’s URL bar is one example. Apple’s command line tool ‘open’ is another:
In a terminal:
> open corona://open?url=file:///Applications/CoronaSDK/SampleCode/GettingStarted/HelloWorld [import]uid: 7563 topic_id: 6315 reply_id: 37575[/import]
#3 - Awesome, thanks! I think this means I should be able to have CPM relaunch changes without actually restarting the simulator. Which would be nice since the simulator doesn’t remember where you place it on the screen. (hint hint)
#2 - Whaaaaa. Is the plan for that to work eventually?
Thanks.
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 37579[/import]
One more thing – the line you sent me works fine in the Terminal:
open corona://open?url=file:///Applications/CoronaSDK/SampleCode/GettingStarted/HelloWorld
…but when I put the skin parameter on the end it disregards that:
open corona://open?url=file:///Applications/CoronaSDK/SampleCode/GettingStarted/HelloWorld&skin=iPad
Bug? Or am I doing it wrong?
Thanks.
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 37580[/import]
- Not sure. I’m not the Windows expert so I don’t know how feasible it is. [import]uid: 7563 topic_id: 6315 reply_id: 37581[/import]
Oh, you need to put it in quotes to be safe.
open “corona://open?url=file:///Applications/CoronaSDK/SampleCode/GettingStarted/HelloWorld&skin=iPad”
The & character has special meaning in the shell and tells it to run the command as a background process. So the shell was misinterpreting the command and actually running 2 commands:
- open corona://open?url=file:///Applications/CoronaSDK/SampleCode/GettingStarted/HelloWorld &
- skin=iPad
#2 is kind of a meaningless command but valid syntax so you didn’t get an error.
[import]uid: 7563 topic_id: 6315 reply_id: 37582[/import]
You rock, Eric, I don’t care what the others say!
Thanks, that fixed the problem (on the Mac).
Jay
[import]uid: 9440 topic_id: 6315 reply_id: 37583[/import]
FYI, we just added new URI command ‘relaunch’ to help speed up our internal testing.
e.g.
corona://relaunch?skin=iPad
Will appear in build 698 or whatever the next one is. [import]uid: 7563 topic_id: 6315 reply_id: 70685[/import]
Jay,
I am planning to (finally) bring this ability into Kwik. As I don’t have a Windows machine to test at this moment (waiting for a new one to come), can you please tell me if this URI command is working for you on Windows as well?
thanks a lot,
Alex
Jay,
I am planning to (finally) bring this ability into Kwik. As I don’t have a Windows machine to test at this moment (waiting for a new one to come), can you please tell me if this URI command is working for you on Windows as well?
thanks a lot,
Alex