Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by cgaf4

Hi,
For debug purpose, I want to load js scripts from remote server instead of copying it in App/ each time a change is made. (I know that for release version, I need to include the js code into the app, if not, Apple could reject it).

Is there a way to make a call like ejecta.include("http://myserver.com/myscript.js") ?

1 decade ago by stillen

Are you using ejecta for a non-impact game? I ask because you would need to copy over all the updated game files and not just the index file for the game to run.

If that is the case, I would download the whole game as a zip, then unpack it and copy the contents into the app folder, then run the game as normal. You could add this all into the app delegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
	// Optionally set the idle timer disabled, this prevents the device from sleep when
	// not being interacted with by touch. ie. games with motion control.
	application.idleTimerDisabled = YES;
	// add getting file and copying here.

	[self loadViewControllerWithScriptAtPath:@"index.js"];
	
    return YES;
}

I had also made a really ugly hack to ejecta to allow you to copy files into the document file, that way you could have just one version of ejecta and just swap files out via iTunes, ICU, or any of the other apps that allow you access to the documents folder. I tried to get Dom to add this into the ejecta repo, but it never happened.

1 decade ago by cgaf4

Thank you for the solution, that's what I began to do while waiting for an answer.
Page 1 of 1
« first « previous next › last »