Article Preview
Buy Now
FEATURE
Application Instance
Adding an identifier to your app downloads
Issue: 19.2 (March/April 2021)
Author: Christian Schmitz
Author Bio: Christian Schmitz is the creator of the Monkeybread Software Xojo/Real Studio Plugins.
Article Description: No description available.
Article Length (in bytes): 4,765
Starting Page Number: 50
Article Number: 19206
Resource File(s):
project19206.zip Updated: 2021-02-28 23:15:46
Related Link(s): None
Excerpt of article text...
Apple allows you to modify an app for download and include a UUID in the download to identify the user downloading it. You create a new UUID for each download and link them in the database to the current logged-in user, and then you can, within a few minutes, simply link the installation to the account on the server. Please make sure the link only works for a limited time (maybe only once). Additionally, you may ask for a verification code.
Prepare Your Application
A key element of this is our "extended attributes.dat" file, which contains the extended attributes as they are saved in a zip archive. But it is not compressed and we add it uncompressed to the archive, so we can read and modify the UUID inside. We got this file by adding an extended attribute with the right name and content to an app, zipping it, and then unzipping it without applying the extended attributes. This way we got the
._ApplicationInstance.app
file from the zip with the content of the serialized attributes.You sign the application as usual with a script calling codesign or an application like App Wrapper. Then you can compress the application into a zip archive. For example, on MacOS, you can use
ditto
application:
ditto -c -k —zlibCompressionLevel 9 —extattr . ../ApplicationInstance.zip
...End of Excerpt. Please purchase the magazine to read the full article.