누구든지 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>
감사합니다. 특히 도움이되는 예. 그래서 모든 것을 이해하는 것은 어리석은 질문 일지 모르지만 개발 중에 컨트롤러/서버를 전화 갭에 어떻게 연결합니까? 위의 편집에서 config.xml 파일을 삽입했습니다. 내가 추가 한'localhost' 행은 그 트릭을 수행합니까? – dgreen22
필자는 phonegap을 본 적이 없기 때문에 확실하게 말할 수는 없습니다. 그러나 이것이 모든 요청에 대한 도메인을 설정하면 작동해야합니다. – Brennan