Posts

Unveiling the Power of Sitecore Headless with Our Latest iOS App

Image
Unveiling the Power of Sitecore Headless with Our Latest iOS App Introduction After a lot of hard work, we have finally built the prototype of a Quiz App for an iOS application. This iOS application uses GraphQL to connect with Sitecore Experience Edge, enabling it to read items from the database. The app effectively displays these items on the screen. The first screen is the categories screen, featuring subjects like Math and Science. Selecting a category, such as Math, displays relevant quizzes like Basic Math Quiz, all created in Sitecore. Sitecore's ability to structure and organize the hierarchy has been instrumental in this application’s development.  The figure below depicts a sneak peek from the presentation and demo: Process To demonstrate the capabilities of the application, I had the opportunity to present at SUGLATAM. I extend my heartfelt thanks to SUGLATAM for inviting me to one of their sessions. It's important to note that the presentation is in Spanish, which m...

Mastering Sitecore and GraphQL: A Guide to Querying Fields with Spaces

Image
Mastering Sitecore and GraphQL: A Guide to Querying Fields with Spaces Introduction When I was developing my iOS App to connect to Sitecore Headless feature. I found a problem. The problem was that one of the items in Sitecore, the Question item, had a field that had spaces in it. I was not sure how to construct a GraphQL query in order to display the field item "Question Text" in GraphQL. So I decided to write a blogpost about this so people could benefit from my findings. Always making coders life a little bit easier on this planet.  The Problem Let me just show you the problem in order to see if you have a similar issue or not. I have Sitecore items I created a Question item. In the following image; Here we see that the Question 1 from Basic Math Quiz has a field name Question Text. You can see that Question Text is a common name in Sitecore and most of the time people use spaces to create content. We can also see that this is a custom field, because it is intended for thi...

Simulating Success: How to Test iPhone Apps in Xcode Simulator with Sitecore 10.3 Docker Containers

Image
Simulating Success: How to Test iPhone Apps in Xcode Simulator with Sitecore 10.3 Docker Containers Introduction When I was developing my iOS app, I encountered a problem: my Sitecore Docker container needed to be exposed. Instead of taking that route, I realized it would be simpler to use the Xcode simulator. This way, I could see my iOS application in action, using my Sitecore Docker container from another laptop. Requirements The requirements in order for this to work are the following: A PC with Sitecore Installed in a Docker Container A Mac with the iOS Application that is connected to the Sitecore Docker Container Make sure both the Mac and the PC are connected in the same network.  Procedure If you have your Sitecore 10.3 Docker installed I suggest to run it until you can see your CMS. After that we will switch to our Apple computer where the iOS Application for your Sitecore Container app should be. If you want to know how you can connect your application to Sitecore via Si...

Creating a Simple iOS App Using URLSession GraphQL to Fetch Sitecore Items from a Sitecore 10.3 Docker Container

Image
 Introduction After a lot of research and trying to explore Sitecore Headless feature I was able to create a simple iOS APP in order to get the items from Sitecore using GraphQL. In this blogpost I will demonstrate how you can use the Xcode 14.3.1 and the code needed to get the items from the Quiz app we were developing throughout this research. So I will start with the Xcode experience, and afterwards I will continue to see the modifications I do on Sitecore so you can see changes in real life. I needed to do this with two machines, a PC and a MacBookPro in order to demonstrate Sitecore's Headless capabilities.  Developing the iOS APP.  In the following APP, I used the following libraries: SwiftUI and URLSession. SwiftUI is used for the frontend part of the application and URLSession is an Apple library that controls REST requests. So in order for this to work I added a NetworkManager.swift class as follows: // // NetworkManager.swift // SitecoreQuizApp // // Created b...

Troubleshooting Guide: Resolving the 'Cannot Query Field "id" on "ItemSearchResults"' Issue in a JSS App with Sitecore 10.3"

Image
"Unraveling the Mystery: Addressing the 'Cannot Query Field "id" on "ItemSearchResults"' Problem in a JSS App with Sitecore 10.3"Introduction In my previous post I was able to get the items from Sitecore Experience Edge for a single item. If you haven't read that issue you need to read that first before continuing with this one since I explain how to use the sitecore api Key to get the result from a single item. If you want to read that post click here . Now that you have previous background let's dive in to the problem.  The Problem To give a you a little bit of context this is what I was trying to do. I was trying to get all of the item's children from this sitecore item:  /sitecore/content/HeadlessApp/Content/Quizzes .  Here is a picture of the items in Sitecore that should match the Postman's response: Everything belowe the Quizzes folder should have been returned.  However, getting the items from its children was a little bit c...

Guide to Fixing the 'SSC API Key Required' Error while Testing GraphQL Queries from Sitecore 10.3 Using Postman

Image
Guide to Fixing the 'SSC API Key Required' Error while Testing GraphQL Queries from Sitecore 10.3 Using Postman Introduction The new era of technology is now here and everything is supposed to be headless now. A headless Site is exactly what that means, a site with no head. In other words, the site can exists and doesn't matter on which container it exists. Therefore, you can create the same site in different applications, for example iOS, React, Angular, or Android phones. Now that Sitecore claims that it is headless, I decided to give it a try and test it out. If Sitecore is truly headless then there should be no problem with using Postman with a simple GraphQL query to get the items from the database. Also I am using Sitecore 10.3 with JSS Docker Container in order to perform the tests. If you want a guide on how to install Sitecore 10.3 with JSS on Docker containers  click here  . The Challenge  After you follow the steps from the post I linked above, you should be ab...

Eliminate Sitecore Item Duplication Issues in Data Exchange Framework with this Fun Powershell Script!

Image
PowershellScript to avoid Sitecore Items Duplication Background First of all, I know what you all are going to say. How is it possible to have Sitecore Item Duplication if each sitecore item has it's own unique id? I know, it caught me by surprise as well when I was having issues with a third party API that did it as it pleased using the Sitecore Data Exchange Framework. Sitecore Data Exchange framework is a platform that converts any third party API data into Sitecore Items. If you are interested in learning more about this feature that Sitecore offers  click here .  The Problem Let me explain what is the problem I was having. The issue was that in this platform I had the following fields: Id, Time, Refrence, Exchange, Date, Location, headline and many others. The problem with this was that I had an Id field. The Id field, not to be confused with the ItemID field that comes OOTB with Sitecore was the one that was having problems. Everytime I executed the job from the Data Exc...