任何人都可以解释如何或指导我的教程,详细解释如何将Rails 5 API连接到Phonegap。我对Rails比较陌生,没有phonegap方面的经验,现在已经在寻找几天了解详情。我在前端使用了HTML5,CSS和JQuery。Rails 5 API和Phonegap
真的很感谢任何帮助。
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.yourname.workshop" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Workshop</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="http://localhost:3001" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
</widget>
非常感谢!特别是帮助的例子。所以理解所有这些 - 可能是一个愚蠢的问题,但是我在开发过程中如何将控制器/服务器连接到phonegap?我在上面的编辑中插入了我的config.xml文件。我添加的'localhost'这行是否有诀窍? – dgreen22
我从来没有使用phonegap,所以我不能肯定地说。但是,如果这为所有请求设置了域,那么它应该可以工作 – Brennan