This repository contains the CAP as well as the native iOS app for the End2End example series: The Advocates Service
Contents
- Overview
- The Projects
- Requirements
- Download and installation
- Known issues
- How to obtain support
- License
The Advocates Service is a CAP service being deployed on SAP BTP, Cloud Foundry runtime with a persistence connection to the SAP HANA Cloud. The service itself is holding information about the some Developer Advocates with all the information about the advocates being relevant to its community.
The service is companioned by an Advocates App. This app is written in Swift and uses the SAP BTP SDK for iOS frameworks for data consumption and security. With a mixed UI approach between SwiftUI and UIKit the app code represents a modern approach of native app development.
This repository is structured in its single projects, where each project holds its own purpose. The repository holds all necessary code to run the End2End example of the Advocates Service.
- The End2End Journey: Advocates Service – An Introduction
- The End2End Journey: Advocates Service – CAP Service, OData V2/4 & REST in One single Project
- The End2End Journey: Advocates Service – Advocates App with AppGyver
- Advocates Service – CAP Service, OData V2/4 & REST in One single Project
- Advocates Service - Advocates App with AppGyver
The Advocates Service is a Node.js based SAP Cloud Application Programming Model project which exposes endpoints for OData V2/v4 & REST. The persistence of the Advocates Server is setup in a way that it uses the SAP HANA Cloud on SAP BTP. The project can be build as MTAR and deployed to the SAP BTP, Cloud Foundry runtime.
In the root of the project run:
- npm install
- cds build
- cds watch (for local testing)
Make sure to have installed the MTB command line interface:
- mtb build
- cf deploy (make sure to be logged into CF first)
The Advocates App is an Xcode project and needs minimal setup to be build. Please be aware that you need a MacOS system in order to develop for iOS.
In order to use SAP Mobile Services and its features you need to create the Advocates App in your account and make the needed changes to the Xcode project itself to point to the correct cloud configuration.
- Create a new application cloud configuration
- Set the wanted mobile features. If you want to use Mobile Offline Access you need to point the destination to the V2 service endpoint (At the point of creation the Offline OData is not fully supported for OData V4).
- Create the Destination for the service endpoint
- Point to the service endpoint
- Change the development team to something valid
- Make sure the project gets signed for development
- Create a new Mobile Project on SAP Mobile Services
- Change the authentication details via the
ConfigurationProvider.plist
file. You can find the needed information in your SAP Mobile Services account.
- Change the
AppParameters.plist
to match your Application Identifier and has the correct Destination set. You can find the needed information in your SAP Mobile Services account.
You can find the needed information here:
Component-specific requirements are to be found in the respective READMEs, but there are general requirements too which are listed here.
The Advocates Service is being implemented with the help of Visual Studio Code, you can also use the SAP Business Application Studio for implementation or replica of the project.
The benefit of using SAP Business Application Studio in comparisson to Visual Studio Code is that your development environment is fully setup.
If you need guidance on setting up VS Code for Cloud Application Programming model development you can follow the blog post of Thomas Jung:
The iOS Advocates App is being implemented with Apple Xcode. To develop native iOS apps you need a machine runnning MacOS, for this project the following version is used:
You'll need a trial account on SAP BTP, if you haven't got one already. Follow this tutorial for detailed instructions.
When you set up a trial account, a Cloud Foundry (CF) environment is set up automatically for you, with an organization and single 'dev' space.
The CF command line interface (CLI) is available as the
cf
command. The version ofcf
required for use in this repository context is version 6. There is a newer version 7 but there is an issue with version 7 in the use of thecf env
command, which needs to work correctly here. Moreover, it's more likely than not that you have version 6 ofcf
already installed and available.
To use this repository, fork it into your own user or org space on GitHub, and then clone that. You can now follow the component instructions, as well as this main README.
For more information about forking in general, see Fork a repo in the GitHub documentation.
Occasionally, we'll add content to this repo.
Throughout the instructions in this repository, the place where you forked this repository too will be referred to in the form "OWNER/REPOSITORY", and you should replace these placeholders with values that are appropriate for you. For example, if you are on GitHub as 'kevinmuessig', and you fork this repository to that space, your values for "OWNER/REPOSITORY" would be "kevinmuessig/Advocates-End2End-Sample".
The iOS app is still in its early stages and not functioning at the moment. Please see the issues page for more information.
https://github.com/SAP-samples/advocates-end2end-sample/issues/
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.