... h2. Resources || Resource || URL || | Crafter iPad Demo Provisioning Profile | [http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/Crafter_iPad_Demo_Ad_Hoc_Provisioning_Profile.mobileprovision] | | Crafter iPad Demo IPA | [http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/CrafterIPadDemo.ipa] | | Crafter iOS Server WAR | [http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/crafter-ios-server.war] | | Crafter iPad Demo CStudio Blueprint | [http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/crafter-ipad-demo-cstudio-blueprint.zip] | h2. Setting up the iOS Server # Unzip the [crafter-ipad-demo-cstudio-blueprint.zip|http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/crafter-ipad-demo-cstudio-blueprint.zip] and copy the contents under the {{site-content}} folder to some location (e.g {{/opt/ios/content-stores/crafter-ipad-demo}}). # Copy the [crafter-ios-server.war|http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/crafter-ios-server.war] to the {{webapps}} directory of a Tomcat. Change it to {{ROOT.war}} if you can, since the default Base URL used by the iPad app assumes the ROOT.war (you can configure this URL later). # Create a {{server-config.properties}} file in the {{share/classes/crafter/ios/extension}} directory of the Tomcat, with the following content (replace {{/opt/ios/content-stores/crafter-ipad-demo}} with whatever path you chose for the site content): {code} crafter.core.cache=false crafter.core.store.filesystem.rootFolder.path=file:/opt/ios/content-stores/crafter-ipad-demo/site/ui-configurations staticAssets.path=file:/opt/ios/content-stores/crafter-ipad-demo/static-assets/ {code} # Start the Tomcat. h2. Installing the app in your iPad # Download [Crafter_iPad_Demo_Ad_Hoc_Provisioning_Profile.mobileprovision|http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/Crafter_iPad_Demo_Ad_Hoc_Provisioning_Profile.mobileprovision] and [CrafterIPadDemo.ipa|http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/CrafterIPadDemo.ipa]. # Drag the provisioning profile (the file with the {{.mobileprovision}} extension) to the iTunes icon in the Mac Dock. # Double-click the app archive {{CrafterIPadDemo.ipa}}. The app should appear in the iTunes Applications list. # Sync your iPad. # Before you start the app, in your iPad, go to the Settings app > Apps > Crafter Demo. You should see 5 editable properties: Base URL, Global Configuration URL, Home Configuration URL, Gallery Configuration URL and Connect Configuration URL. You should only change the first one, Base URL, the other ones leave them as they are. The Base URL should point to the iOS server in your Mac, so if your Mac has the 192.168.1.90 LAN IP address, the Tomcat is running at the 9090 port, and you changed the {{crafter-ios-server.war}} to {{ROOT.war}}, your Base URL should be [http://192.168.1.90:9090]. If you didn't change the war to {{ROOT.war}}, it should be [http://192.168.1.90:9090/crafter-ios-server]. # Open the Crafter Demo app (the Tomcat server should already be running). If everything is working fine, you should see the following screen as soon as you start the app: !Crafter iPad Demo Screenshot.png! h2. Creating the Crafter iPad Demo CStudio Project # Download [crafter-ipad-demo-cstudio-blueprint.zip|http://resources.rivetlogic.com/software/crafter/ios/crafter-ipad-demo/crafter-ipad-demo-cstudio-blueprint.zip]. # In CStudio's Alfresco Explorer, go to Company Home > cstudio > site-blueprints. In the More Actions menu, click on Import. Browse to where you downloaded the zip and import it. After the zip is imported, two directories will be created, {{MACOSX}} _\_and_ {{{_}crafter-ipad-demo{_}{}}}_, and the zip file will be imported too. Delete both the_ {{\_MACOSX}} directory and the {{crafter-ipad-demo-cstudio-blueprint.zip}} file. # Login to CStudio Share and create a new website, by clicking on the Create Website link of the My Websites dashboard widget. Choose the crafter-ipad-demo as the Site Blueprint. If the site was created successfully, you should be taking to the project dashboard. h3. Creating the CStudio deployment channel. # Stop the crafterrivet-deployer process (you can stop it easily using the Application Manager that comes with CStudio). # In the CStudio installation directory, go to {{crafterrivet-deployer/conf}} and create a {{crafter-ipad-demo-target-context.xml}} file with the following contents: {code:xml} <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <bean id="CrafterIPadDemoTarget" class="org.rivetlogic.cstudio.publishing.target.PublishingTarget" init-method="register"> <property name="name"><value>crafter-ipad-demo</value></property> <property name="manager" ref="TargetManager"/> <property name="postProcessors"><list></list></property> <property name="params"> <map> <entry key="root"><value>/opt/ios/content-stores/crafter-ipad-demo</value></entry> </map> </property> </bean> <!-- <bean id="SampleTarget2" class="org.rivetlogic.cstudio.publishing.target.PublishingTarget" init-method="register"> <property name="name"><value>sample2</value></property> <property name="manager" ref="TargetManager"/> <property name="postProcessors"> <list> <ref bean="SamplePostProcessor"/> </list> </property> <property name="params"> <map> <entry key="root"><value>target/sample2</value></entry> </map> </property> </bean> --> <bean id="SamplePostProcessor" class="org.rivetlogic.cstudio.publishing.processor.SamplePostProcessor"/> </beans> {code} # Start the crafterrivet-deployer again.
|
# Finally, in CStudio Share, click on the Repository menu, and go to {{cstudio > config > sites > crafter-ipad-demo > environment-overrides > local}}. Edit the {{environment-config.xml}} file, so that the channel name property is the same as the channel name we just created, like this: {code:xml} <channel> <property name="name">Crafter iPad Demo Remote Deployment Channel</property> </channel> {code}
|