An example SwiftUI application that highlights Adobe Experience Manager's GraphQL APIs.
A corresponding tutorial is available where you can learn how to setup and run the application to query data from an AEM environment using GraphQL.
This application is designed to connect to an AEM Author or Publish environment.
-
On the target AEM environment install the latest release of the WKND Reference site using Package Manager for local environments or using Cloud Manager's CI/CD Pipeline for cloud environments.
-
Download and install Xcode and open the folder
ios-app
-
Modify the file
Config.xcconfig
file and updateAEM_HOST
to match your target AEM environment// Target hostname for AEM environment, do not include http:// or https:// AEM_HOST = localhost:4503
-
Set the authentication method in the file
Config.xcconfig
based on your use case.basic
andtoken
based authentication is supported. If connecting to an AEM Publish environment no authentication is needed and the auth methods can be commented out. -
Build using Xcode and deploy using the iOS simulator.
The application was designed to connect to a Publish instance. Connecting directly to an AEM Author environment is useful during development, since the changes made are immediately reflected without having to publish.
Author environments require authentication, the following updates to the Config.xcconfig
file need to be made.
Basic authentication:
// Support for Basic Authentication - Set AUTH_METHOD to basic and set BASIC_AUTH_CREDENTIALS
AUTH_METHOD = basic
// Basic Authentication Info
BASIC_AUTH_CREDENTIALS = admin:admin
Token authentication:
// Support for Token Authentication - set AUTH_METHOD to token
AUTH_METHOD = token
// Bearer token value, ensure AUTH_METHOD=token to use.
BEARER_TOKEN = <token here>
A more detailed setup and tutorial can be found here.
AEM as a Cloud Service | AEM 6.5 | Sample Content | Xcode | iOS |
---|---|---|---|---|
Continual | 6.5.10+ | WKND Site 1.0+ | 9.3+ | 14+ |
Two 3rd party frameworks are used to power the application.