Cordova 3 + Ripple
Asked Answered
M

9

18

Someone knows if Ripple works with latest cordova version? Cause I'm trying and I can't even start control panel. And when I try without it, pops some "alerts":

gap:["PluginManager","startup","PluginManager590841628"]

gap:["App","show","App590841629"]

Versions: Cordova 3 Ripple 0.9.16 Chrome 28.0.1500.95 m

Malchus answered 12/8, 2013 at 0:58 Comment(0)
M
3

Ripple project was given to Apache. You can find here.

There, we can find the GitHub repository that we can build newests versions.

Malchus answered 15/8, 2013 at 19:17 Comment(2)
Did you get it working? I'm using the latest version of ripple from here but still getting problems like in your question.Rumsey
Anyone knows if recent version work, a workaround was using a cordova.js file from 2.9Fixation
I
14

The ripple emulator has been broken for a long time, since cordova version 2.7 to version 3.1 (more or less: cordova version is not tied to ripple version). You can find it here: http://ripple.incubator.apache.org/

These articles are excellent to get you up to speed with the latest version of ripple:

Hope this helps.

Istle answered 15/12, 2013 at 17:46 Comment(0)
O
4

Found the answer! You just need to remove the Ripple Extension from your Google Chrome.

But after that I had another problem: For Cordova 3.3.0, you might face this weird error while emulating the camera or the photo/media library:

Uncaught TypeError: Failed to execute 'setAttribute' on 'Element': 2 arguments required, but only 1 present. -- ripple.js:49275

/incubator-ripple-master_new/pkg/hosted/ripple.js - line 49279

change this:

capture.setAttribute("controls");

to this:

capture.setAttribute("controls", true);

and then you can restart Ripple. BTW, for version 0.9.20, you don't need to provide the path to 'platforms/android/assets/www' anymore, just provide the root path and it will identify your project:

./ripple emulate --port 1234 --path ~/tech/phonegap/myPhonegapApp/
Ostiary answered 22/3, 2014 at 16:51 Comment(2)
Making ripple work by removing ripple? Yes. Remove the installed chrome extension and launch ripple emulator from the command line (after installing): ripple emulator.Creatural
This thing actually helped me. I had errors with the emulator ("Looks like what we have here is a failure to... emulate.") and couldn't get Cordova 3.0.0 working. After uninstalling the Chrome Extension (I'm using its Yandex distribution) I can get 3.0.0.Protease
M
3

Ripple project was given to Apache. You can find here.

There, we can find the GitHub repository that we can build newests versions.

Malchus answered 15/8, 2013 at 19:17 Comment(2)
Did you get it working? I'm using the latest version of ripple from here but still getting problems like in your question.Rumsey
Anyone knows if recent version work, a workaround was using a cordova.js file from 2.9Fixation
S
2

This is how I got ripple to work using Phonegap 3.0.0 and Chrome 33.0.1750:

npm install -g ripple-emulator
phonegap local build android
cp platforms/android/assets/www/phonegap.js www/phonegap.js
ripple emulate

The reason for the copy of phonegap.js is that ripple issues a cordova prepare which rebuilds all files in .../assets/www and removes phonegap.js. Note that this happens everytime you refresh the emulator.

I have created a patch for this. Once this is installed change the URL in the emulator to include &phonegap=true, e.g.

http://localhost:4400/?enableripple=cordova-3.0.0-WVGA&phonegap=1

Skirl answered 21/3, 2014 at 9:30 Comment(0)
C
0

In case it helps others, I found that when running the command

$ cordova ripple ios 8080

i.e. not running Ripple directly, everything seemed to 'just work' for my albeit simple app in development.

I have v3 installed from NPM.

Cribb answered 2/10, 2013 at 8:26 Comment(1)
cordova --help does not give a ripple command, cordova ripple gives not installed platform error. Just installed the latest version from npm.Voroshilov
X
0

I'm using PhoneGap 2.9 with Ripple and though the alerts are annoying, the emulator seems to work fine. If you want to kill off the alerts, the line that send them (which appears to be only for debugging) is 4277 in cordova.js:

    return prompt(argsJson, 'gap:'+JSON.stringify([service, action, callbackId]));

Commenting that line out seems to harmlessly remove the alerts.

Xylophone answered 22/12, 2013 at 0:7 Comment(1)
How can i comment out this line? It is somehow autoinjected to my project. I don't have this file in my file structure.Addiel
P
0

I have been ignoring these alerts in ripple. Clicking cancel or hitting escape key.

After canceling the alerts Ripple worked well enough for development. (maybe not all features will be working)

I used phonegap 2.7.0.

You can get similar alerts when accidentaly using incorrect cordova.js which is platform dependent (e.g. use cordova.js for android on IOS device)

Pyrosis answered 3/3, 2014 at 10:22 Comment(0)
D
0

You can use this code in your head tag :

<script>window._cordovaNative = true;</script>
Dowland answered 22/7, 2014 at 8:4 Comment(0)
D
-1

I went into hello/platforms/ios/CordovaLib and copied the cordova.js file into my www root

and changed in my index file

<script type="text/javascript" src="phonegap.js"></script>

to

<script type="text/javascript" src="cordova.js"></script>

and no more popups

Driveway answered 10/10, 2013 at 13:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.