Installing & Test Driving the Commerce Reference Store iOS App Installing & Test Driving the Commerce Reference Store iOS App Oracle Commerce Search Engine Optimization Installing Oracle Commerce 11.1 with Commerce Reference Store Posted by Pivotree Growth Team on February 23, 2015 in Blog 4 Comments Iāve been eyeing up the ATG Commerce Reference Storeās native iOS app ever since it was added with Commerce Reference Store (CRS) 10. Itās not too bad, and proves the point that Oracle Commerce/ATG can be ported into mobile environments. Here are the steps I took to get the app completely functional. This is a continuation of my last blog post on the installation of Oracle Commerce 11.1 with the Commerce Reference Store. You can find the Oracle documentation on this installation here. Note: You will need an Apple computer with xcode installed. The mobile app differs from traditional Oracle Commerce/ATG because it uses a REST API to communicate with Oracle Commerce/ATG, rather than the HTML/JSP route. The REST API was released in ATG 9, and is bundled with the core platform. First, start your publishing and storefront servers because CIM (and we) require them for the importing of some targeters. Then run CIM: source ~/atg-env.sh sh $DYNAMO_HOME/bin/cim.sh 1. From the main menu, navigate to āProduct Selectionā and add the āOracle Commerce RESTā option. From there, youāre going to need to step through much of the configuration you did with the CRS installation. For the CRS Addons menu, add āMobile Reference Storeā For āMobile Reference Store Web Servicesā, add āREST Web Services for Native Applicationsā 2. Next, step through the database steps. Both servers are going to have a bit of data to load because of the new mobile configurations. 3. In the server instance configuration menu, select the production server and then chose the option to provision the EAC application. 4. Do a full deployment from the BCC. Ensure that an index is kicked off by checking the progress in dyn/admin from the /atg/commerce/endeca/index/ProductCatalogSimpleIndexAdmin component. 5. If the index was successful, push the index to production using: sh /opt/endeca/endeca/Apps/CRS/control/promote_content.sh 6. Download āCRS-IUA for version 11.1 (includes the Objective-C REST client for version 11.1)ā from here. This is the code that interfaces directly with the iOS device and the REST API. 7. Open the file up and click the StoreWorkspace.xcworkspace file. It should open up the project in Xcode. 8. From the file navigator, search for MobileCommerce-info.plist and open it. Edit the ATG_REST_SERVER_HOST and ATG_REST_SERVER_PORT values as shown. 9. From the top menu, select Product >> Run to build and start the app in the emulator. 10. Once up, use the hardware >> home option to go to home, then head into the settings. Select the Mobile Store app and add in the hostname and port of the store. It should be localhost and 8080 respectively. At this point the app should be functional. The application has a lot of logging, so you can monitor things pretty well using the log provided in xcode. If there is a problem see the troubleshooting section below. Make sure to try keyword search to ensure full Endeca functionality. Check the storefront log along with the xcode log for any issues. Keep in mind that the app was created for iOS 7.1, so there could be some compatibility issues with the iOS 8 simulators, particularly the new screen sizes with the iPhone 6. If you have a newer version of xcode with only iOS 8.x simulators available, Iād recommend going into preferences >> downloads and downloading the iOS 7.1 simulator just in case. Troubleshooting I had lots of problems with getting the mobile environment setup. I think they stemmed from the fact that I was doing two sets (one for initial CRS and one for iOS) of configurations, two database imports, two full deployments, two Endeca application provisioning, etc. If the CRS had been installed with the REST-iOS App configurations at the same time, it would have been less error-prone. Endeca Application Provisioning During the CIM step where you deploy the updated Endeca application, it was failing because there was the existing CRS application already in its place, and CIM is not smart enough to delete it. I created this script to remove the Endeca app. Run it as Oracle and it should completely wipe the CRS Endeca application out and allow CIM to import the new one without errors. CIM Data Import First, I found in the CIM log ($DYNAMO_ROOT/CIM/log/cim.log): ā/atg/dynamo/server/RmiServer unable to register atg/devtools/DevAgent to /atg/dynamo/server/RmiServer java.rmi.AlreadyBoundException: atg/devtools/DevAgentā The CIM nucleus instance steals port 8860 for RMI, which kicks the production port out. I solved this problem by moving around the prod and pub ports and changing the server configs at: $DYNAMO_HOME/servers/atg_(production | publishing)_lockserver/localconfig/atg/dynamo/Configuration.properties and changing rmiPort=8760 for production and rmiPort=8950 for publishing. Then I was immediately faced with: ā/atg/dynamo/service/loader/LoaderManager caught exception in ArrayBackedJob.runJobĀ Ā atg.repository.loader.LoaderEventException: You have one or more initialized target sites. An import directly into a workspace will prevent deployment of imported assets. Please import into a process.ā This is solved easily by deleting the āProductionā site and associated agent in the BCC and retrying the import. Then, with the full deployment, I found the error: āSnapshot ID XXXX is not valid for target ‘Production’. Please verify that each agent server in target XXXX has a valid snapshot, or delete all deployment meta-data on each agent server before attempting to re-use it as a part of a new target.ā Which I fixed (based on this thread) by deleting the following directories and restarting each server: rm -rf $DYNAMO_HOME/servers/atg_publishing_lockserver/Publishing/deployment/data rm -rf $DYNAMO_HOME/servers/atg_production_lockserver/PublishingAgent/data In a nutshell, BCC deployments became out of line because of deleting and re-creating the deployment target. Running the App At first, the app was throwing errors like this: āATGMobileCommerce[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][74328:60b] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSDictionaryM attributes]: unrecognized selector sent to instance 0x78656e20’ā I soon became smart enough to check my storefront log and also found some Endeca errors: ā[atg.endeca.assembler.multisite.ExtendedSiteManager] (http-/0.0.0.0:8080-3) Unable to retrieve site definition for site id: /mobileStoreSiteUS: com.endeca.store.exceptions.PathNotFoundException: No node found at path [//pages/mobileStoreSiteUS]ā If these things happen, your Endeca, especially for mobile, is broken. Some tips: Check the workbench to verify all Endeca services for the CRS application are running. Browse the desktop site to see if anything is also breaking. Check the experience manager and ensure you have mobile site pages defined for the CRS application. If they donāt exist, youāll have to reprovision the Endeca application from CIM. [/fusion_builder_column][/fusion_builder_row][/fusion_builder_container] Tags:ATG application, ATG tutorial, CRS, Mobile, Oracle Commerce Share this article: About Pivotree Growth Team Related Articles Deploying Oracle ATG Commerce in AWS Cloud [2019 Updated Review] Dot Foods Selects Tenzing to Host its PIM Application on Amazon Web Services Tenzing Relocates Toronto Headquarters to Support Continued Growth Spark::red Insight West 2016 [Videos] 4 Comments Rajesh Sirangu 7 years ago Reply will you also do the development for native apps / hybrid approach or providing hosting service for mobile app? Rohit Mishra 7 years ago Reply Peter – this is a great post indeed, I have had a lot of experience with installing CRS versions ever since it was launched but haven’t tried with the iOS application until now. I am sure this article will help. With new releases the CSA 11.2 architecture comes out boasting a REST based omnichannel commerce architecture leveraging modern MVC patterns which completely removes the concept of HTML and JSP’s and proposes a service based architecture for ATG commerce applications. Even prior to launch of 11.2 many retailers opted to use frameworks such as Play to build a modern REST based web app. This makes me wonder, if I am an occasional buyer, why would I install the application on my phone and use it like once in every 3 months, I would rather love the omni-channel experience experience, just open my browser on mobile hit the site which is responsive for web and mobile web both, complete shopping and done!! Does this make app based e-commerce slightly obsolete ? Sure that retailers love to have a app of their own, but may be between app and omni-device site the victory is case-by-case only and of course yiu never know what the end user prefer, so safer option may be to have both. Dhruva 6 years ago Reply Can you pls add the steps for andorid also Peter Goetsch 6 years ago Reply Dhruva, To my knowledge, there is no android client for CRS 11. There is only iOS and a mobile (non-webapp) module available. Leave a reply Click here to cancel the replyYour email address will not be published. Required fields are marked *CommentName * Email * Website