I am not certain of whether or not this will apply to your use-case but you may want to use CloudKit to send data to a custom app container. In the app capabilities section of your second app you can access the shared container.
From iCloud Design Guide:
When you enable the iCloud Documents or CloudKit capability, Xcode
configures your app to access the iCloud container whose name is based
on the app’s bundle ID. Most apps should only need access to the
default container. If your apps share data among each other, enable
the “Specify custom container identifiers” option and add one or more
container IDs that you use to share data.
Sourced From Apple ~ see original for more details
Share Containers Between Apps
Optionally, configure your app to use multiple containers or share a container with other apps. For example, you might use one app internally to create record types and records programmatically to return a database to a known state. This app needs to share the same container as the end-user app you are developing and testing. To do this, you enable the first app to use the default container of the second app or create a custom container that both apps share. iOS and Mac apps can also be configured to share the same containers.
Add Containers to an App
Select an existing container ID used by another app or create a new one.
To add a container to an app
In the Capabilities pane under the iCloud settings, select “Specify custom containers.”
When you previously selected the CloudKit service, Xcode created a default container ID for your app that matches the bundle ID. A checkmark appears next to the default container ID.
If necessary, click the Refresh button below the Containers table to download containers from Member Center that are used by other apps.
In the row of the container ID you want to add, select the checkbox.
Xcode updates the list of container IDs in the entitlements file.
The screenshot below shows the Curator and Gallery app sharing the Gallery app’s default container.
Create Custom Containers
Alternatively, create a custom container shared by multiple apps.
Important: Only team admins can create containers. If you are an individual, you are the team agent (with admin privileges) for your one person team.
To create a custom container
If "Use default container” is selected, select “Specify custom containers.”
Click the Add button (+) at the bottom of the table.
In the dialog that appears, enter an identifier for the container you want to add.
Warning: You can’t delete a container ID, so choose the container ID carefully.
A container ID begins with iCloud. followed by a string in reverse DNS notation, as in the iCloud.com.example.gkumar1.SharedGallery container ID.
Click OK.
Xcode adds the new container ID to the Xcode project entitlements file and to Member Center.
If you want to share the new container ID with another app, add the container to the app, as described in Add Containers to an App.
Verify Your Steps
You can view all the container IDs for your team in the iCloud settings or Member Center. In Member Center, you can also add containers and edit the name of containers.
To view container IDs in Member Center
In Member Center, select Certificates, Identifiers & Profiles.
Under Identifiers, select iCloud Containers.