Sadly one of the more common questions I am asked by users of my map apps is "I had to replace my phone and all my waypoints are gone, what can I do?". Unfortunately by the time they ask it is often too late to recover the lost data; you really need a backup strategy in place before something goes wrong.
There are several ways to backup your data, one of which is Apple's iCloud backup. It is not necessarily the best method, for various reasons mentioned below, but it is convenient. It is best suited to recovering if your device is damaged, lost or stolen, and for transferring content to new devices.
Enable iCloud Backup in the Settings app. The following diagram shows where these controls are in iOS 12 on an iPhone, but note that the details do often change with iOS updates.
Scroll to see the whole diagram. There are four things to check; see the numbers in the diagram:
iCloud Backups of Mappendix map apps will normally contain all of the waypoints, GPX files, and other similar content, and settings - but not the maps themselves. The maps are large files which would be slow to back up and consume a large amount of your iCloud storage; it is preferable to re-download the maps within the app separately. If you really want to include the maps in your iCloud backups then there are switches in each app's section within the Settings app to enable this.
One of the problems with iCloud Backup is that it's not possible to inspect the backup to check what it contains. You have to trust that Apple have saved what they say they have saved.
You can get a clue from the size of the backup. If you note the size of the backup and then add a large file, e.g. a large GPX file, to the app, you should see the size of the next backup increase correspondingly.
The only other way to check a backup is to restore from it, but that requires a device to restore onto, and it will delete everything that was previously on the device.
Another issue with iCloud backup is that you cannot selectively restore individual apps. So if, for example, you have accidentally deleted some important content from one app, you can only recover that from the backup by restoring the entire device. There is also only ever one backup per device, so if a backup has occurred since the data was deleted then you have no chance to restore it.
To restore from a backup, go to Settings -> General -> Reset -> Erase All Content and Settings. Do not choose to make a backup before erasing. The device will now restart as if new, and during the setup process you can choose to restore from the previous backup.
Initially the apps will appear greyed out on the device's home screen. When you first select a greyed-out app it will be downloaded, which may take some time. You should then find that your waypoints, GPX files etc. are present in the app. But you will need to manually re-download your maps.