| @@ -4,6 +4,30 @@ JUCE breaking changes | |||||
| develop | develop | ||||
| ======= | ======= | ||||
| Change | |||||
| ------ | |||||
| Unique device IDs on iOS now use the OS provided 'identifierForVendor'. | |||||
| OnlineUnlockStatus has been updated to handle the iOS edge-case where a device | |||||
| ID query might return an empty String. | |||||
| Possible Issues | |||||
| --------------- | |||||
| The License checks using InAppPurchases, getLocalMachineIDs(), and | |||||
| getUniqueDeviceID() may return an empty String if iOS 'is not ready'. This can | |||||
| occur for example if the device has restarted but has not yet been unlocked. | |||||
| Workaround | |||||
| ---------- | |||||
| InAppPurchase has been updated to handle this and propagate the error | |||||
| accordingly. The relevant methods have been updated to return a Result object | |||||
| that can be queried for additional information on failure. | |||||
| Rationale | |||||
| --------- | |||||
| Apple have introduced restrictions on device identification rendering our | |||||
| previous methods unsuitable. | |||||
| Change | Change | ||||
| ------ | ------ | ||||
| AudioProcessor::getAAXPluginIDForMainBusConfig() has been deprecated. | AudioProcessor::getAAXPluginIDForMainBusConfig() has been deprecated. | ||||
| @@ -351,6 +351,7 @@ int SystemStats::getPageSize() | |||||
| String SystemStats::getUniqueDeviceID() | String SystemStats::getUniqueDeviceID() | ||||
| { | { | ||||
| #if JUCE_MAC | |||||
| constexpr mach_port_t port = 0; | constexpr mach_port_t port = 0; | ||||
| const auto dict = IOServiceMatching ("IOPlatformExpertDevice"); | const auto dict = IOServiceMatching ("IOPlatformExpertDevice"); | ||||
| @@ -363,6 +364,14 @@ String SystemStats::getUniqueDeviceID() | |||||
| if (CFGetTypeID (uuidTypeRef.get()) == CFStringGetTypeID()) | if (CFGetTypeID (uuidTypeRef.get()) == CFStringGetTypeID()) | ||||
| return String::fromCFString ((CFStringRef) uuidTypeRef.get()).removeCharacters ("-"); | return String::fromCFString ((CFStringRef) uuidTypeRef.get()).removeCharacters ("-"); | ||||
| } | } | ||||
| #elif JUCE_IOS | |||||
| JUCE_AUTORELEASEPOOL | |||||
| { | |||||
| if (UIDevice* device = [UIDevice currentDevice]) | |||||
| if (NSUUID* uuid = [device identifierForVendor]) | |||||
| return nsStringToJuce ([uuid UUIDString]); | |||||
| } | |||||
| #endif | |||||
| return ""; | return ""; | ||||
| } | } | ||||
| @@ -153,7 +153,13 @@ public: | |||||
| changes. | changes. | ||||
| This ID will be invalidated by changes to the motherboard and CPU on non-mobile | This ID will be invalidated by changes to the motherboard and CPU on non-mobile | ||||
| platforms, or resetting an Android device. | |||||
| platforms, or performing a system restore on an Android device. | |||||
| There are some extra caveats on iOS: The returned ID is unique to the vendor part of | |||||
| your 'Bundle Identifier' and is stable for all associated apps. The key is invalidated | |||||
| once all associated apps are uninstalled. This function can return an empty string | |||||
| under certain conditions, for example, If the device has not been unlocked since a | |||||
| restart. | |||||
| */ | */ | ||||
| static String getUniqueDeviceID(); | static String getUniqueDeviceID(); | ||||