IAP iOS creates tracking_urls in document folder : how to avoid it?

With an SDKBOX IAP purchase module active a file “tracking_urls” is being created in document folder /var/mobile/Applications//Documents/ with this content:

[
https://metrics.sdkbox.com/?{“AndroidId”:”",“App”:“",“CDID”:"****************",“CocosVersion”:“v3”,“IDFA”:"",“ProjectType”:“cpp”,“SdkboxHost”:“Cocos2dx”,“SdkboxVersion”:“sdkbox V2.3.17.1”,“app_package_id”:"...",“app_token”:"",“billSupport”:true,“country_code”:"",“data”:“2.1.0”,“device”:“iPhone***”,“event”:“init”,“latitude”:"-1.0",“longitude”:"-1.0",“os_version”:"..",“platform”:“ios”,“plugin_key”:"",“plugin_name”:“IAP”,“plugin_version”:“2.1.0”,“store”:“apple”,“timestamp”:"*******”}"
]

Due to functional requirements the application I am working on needs to have an activated access to files over iTunes by setting UIFileSharingEnabled to TRUE in Info.plist.

I patched FileUtilsApple::getWritablePath() in CCFileUtils-apple.mm:

OLD:

// save to document folder
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NEW:

// save to data folder
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);

so all internal files are stored not in the document folder but in the data folder (/var/mobile/Applications//Library/Application Support/).

This is necessary, otherwise the app will get rejected by Apple, with a comment similar to this:

When file sharing is enabled, the entire Documents folder is used for file sharing. Files that are not intended for user access via the file sharing feature should be stored in another part of your application’s bundle. If your application does not require the file sharing feature, the UIFileSharingEnabled key in the Info.plist should not be set to true.

tracking_urls is apparently not intended for user access - and therefore some questions:

  1. what is the purpose of this tracking file?
  2. can this file be deleted?
  3. is there a way to disable creation of this file?
  4. is there a way to let create the file in other than document folder (by setting a parameter or so)?

Thanks for you help
siarsky

An SDKBOX Issue in Github opened.

This is for tracking the usage of the plugin, but this looks like a bug, we’ll fix it ASAP