GarageBand TracktionMarketplaceStatus issue

There are issues with the TracktionMarketplace module and GarageBand.

 

A. TracktionMarketplaceStatus::getLocalMachineIDs() returns the same machine ID in every host I tested on my Mac... except in GarageBand. It is

File ("~").getFileIdentifier();

which returns a different integer in GarageBand. I guess the reason is GarageBands sandboxing ( http://www.juce.com/forum/topic/garageband-x-sandboxing ).

 

B. But it gets worse. Because of the sandboxing it also uses another location for the plugin settings (i.e. application properties). In my case

/Users/<user>/Library/Containers/com.apple.garageband10/Data/Library/Application Support/<my company>/<my plugin>/<my plugin>.settings

instead of

/Users/<user>/Library/Application Support/<my company>/<my plugin>/<my plugin>.settings

 

Combined this will results in:
1 User activates a plugin in another host than GarageBand.
2 User loads the plugin in GarageBand... and it's locked!
3 User is not so happy... drags his unlock file onto the plugin... doesn't work!
4 User is upset... might realise that the plugin has another machine ID..
5 User could waste another unlock slot in his user area on my website... but more likely:
6 I get an email from this upset user.

 

Suggestion:
The MAC address based machine id generation gives the same id in GarageBand as everywhere else. I'd suggest to remove the file based ID generation from TracktionMarketplaceStatus::getLocalMachineIDs() on Mac.
This would at least break the above described scenario after step 3.

Better ideas are of course very welcome.

I store plugin-settings in ~/Music/Audio Music Apps/MyPlugin which works fine 

 

This is kind of a hack. If someone knows a better way to deal with it please let me know!

 

SETTINGS FILE

not working:
If the settings file is set like

    PropertiesFile::Options options;
    options.osxLibrarySubFolder = "Application Support";
    options.folderName          = "Klangfreund/LUFSMeter";
    options.applicationName     = "LUFSMeter";
    options.filenameSuffix      = "settings";
    applicationProperties.setStorageParameters (options);

or

    ...
    options.folderName = "~/Library/Application Support/Klangfreund/LUFSMeter";
    ...

or

    ...
    options.folderName = File::getSpecialLocation (File::userHomeDirectory).getFullPathName() + String ("Library/Application Support/Klangfreund/LUFSMeter");"~/Library/Application Support/Klangfreund/LUFSMeter";
    ...

GarageBand puts it to

/Users/<user>/Library/Containers/com.apple.garageband10/Data/Library/Application Support/Klangfreund>/LUFSMeter/LUFSMeter.settings

 

working:
GarageBand does use the file in the users Library-folder if the absolute path is hardcoded like

options.folderName = "/Users/sam/Library/Application Support/Klangfreund/LUFSMeter"; // If I will sell my plugin only to people named Sam, this is it...

or

options.folderName = "/Users/" + SystemStats::getLogonName() + "/Library/Application Support/Klangfreund/LUFSMeter";

This looks like a hole in the sandboxing of GarageBand to me...

 

MACHINE ID

Same as above. Use an absolut specified file instead of "~" to generate the file based ID and it will be the same accross all hosts, including GarageBand. E.g.

StringArray CopyProtectionStatus::getLocalMachineIDs()
{
    StringArray nums;
    
    // First choice for an ID number is a filesystem ID for the user's home
    // folder or windows directory.
    
#if JUCE_WINDOWS
    uint64 num = File::getSpecialLocation (File::windowsSystemDirectory).getFileIdentifier();
#elif JUCE_MAC
    uint64 num = File ("/Users").getFileIdentifier();
#else
    uint64 num = File ("~").getFileIdentifier();
#endif

 

Jules, can you change the TracktionMarketplaceStatus::getLocalMachineIDs() as described to save others from this stupid GarageBand crap?

Thank you for your reply!

It's not the location per se, it's how it is set. See my comment below.

In terms of sandboxing for plugins i think its generally not useful to use  "Application Support"-path  anymore

http://www.juce.com/forum/topic/accessing-propertiesfile-plugin

Oh, I wasn't aware. Thank you for the link!

I thought using ~/Library/Application Support/ instead of ~/Library/Preferences/ was already state of the art. None of the many plugins I own uses a subfolder of ~/Music to store its settings. Guess they all need to catch up...

 

The machine id issue remains. One should use another file than "~" to generate it.