All Collections
Portal-X Pages
Understanding the Compatibility Settings for your app
Understanding the Compatibility Settings for your app

Compatibility Flags

Jason Liang avatar
Written by Jason Liang
Updated over a week ago

brainCloud is constantly improving. We work very hard to ensure that your apps still work even as the platform evolves.

To achieve this, we sometimes introduce compatibility settings that preserve legacy behaviors for older apps. These settings are configured on the Design > Core App Info > Advanced Settings, Compatibility Settings page of the portal.

As new compatibility settings are added, they normally:

  • Default to enabled for existing apps to ensure compatibility

  • Default to disabled for new apps, so that they aren’t subject to legacy system limitations

It is best for overall behavior and performance if the compatibility settings are *not* enabled. It is therefore recommended that app developers periodically review these settings, to ensure that only required compatibility settings are enabled.

Note - these settings are now being presented in reverse-chronological order - i.e. newest to oldest.

[5.2] Do not enforce current player for AsyncMatch SubmitTurn

  • Prior to 5.2, brainCloud was not properly enforcing that only the current player can call SubmitTurn() on an async match. This has been corrected.

  • Note that this flag does not affect any of the other AsyncMatch methods - which also enforces that only the current player can update the match.

  • Apps that need to update a match via the non-current player (for example - in timeout scenarios) are encouraged to impersonate the other player using a cloud code script via this technique (https://help.getbraincloud.com/en/articles/3631086-how-do-impersonate-a-user-using-the-braincloud-api) as opposed to enabling this compatibility flag.

  • Leaving this flag enabled compromises match security.

[5.2] Support legacy case-sensitive redemption codes ('personal' scan codes)

  • Prior to 5.2, brainCloud was performing case-sensitive lookups for redemption codes. The system was changed to store codes in UPPERCASE and perform case-insensitive lookups. This compatibility flag is for older apps with existing redemption codes - to ensure the older codes are still found by the API.

  • Leaving this flag enabled slows down redemption code lookups.

[5.1] Allow AwardUserItem to be called from client (not recommended)

  • Prior to 5.1, brainCloud mistakenly allowed AwardUserItem() to be called from the client. We even mistakenly added it to the libs! That call is now restricted to being called from the server - unless this compatibility flag is enabled.

  • Leaving this flag enabled compromises the item security of your app.

[5.0] Allow unspecified event type for legacy send event

  • Prior to 5.0, the eventType parameter fo SendEvent() was highly recommended by not required. This parameter is now required by default.

  • Leaving this flag enabled allows null eventTypes - but will slow down the event processing of your app.

[4.15] Do not add default response media type accept header for responses (can interfere with request signatures if apps are not aware).

  • In 4.15 brainCloud added a default accept header to all HTTPClient calls to improve compatibility with external systems. This change could cause issues if a 3rd party system wasn't expecting the header for some reason.

  • Leaving this flag enabled removes the header unless specifically added by the developer the the HTTPClient calls.

[3.2] Generate Legacy Event IDs

  • Before release 3.2, the brainCloud Event System used numeric event IDs: eventId. These IDs had some significant limitations, including being slow to generate. The system has now been refactored to use a new and improved GUID-based ID: evId.

  • Enabling this compatibility flag tells the system to continue to create (at some performance penalty) the old eventId for Events. This is required if your app is still using the older API methods. It is recommended that all apps move to the newer APIs, and the new evId, at their earliest convenience.

  • Leaving this flag enabled slows down event processing.

[3.2] Enable Tournament Auto Claim check at login

  • Select this option to get the payout rewards info displayed from the response of when the player re-login.

[3.2] Allow Currency Calls from Client

  • In brainCloud 3.2, as a security + anti-fraud measure, we removed [by default] the ability for client apps to directly manage virtual currency balances. The affected methods, AwardCurrency(), ConsumeCurrency() and ResetCurrency() are still callable from server-side Cloud Code, which is much more secure.

  • Enabling this compatibility flag overrides this new restriction, and allows these calls to continue to be called from the client libraries.

[2.25] Funnel Custom and User File retrieval through app servers (slower)

  • Enabling this setting disables the Content Distribution Network (CDN) optimizations that were introduced in brainCloud 2.25. The main reason you might want to do this is because your client doesn’t properly handle the HTTP-based Redirects that are part of CDN processing. [your app asks us for a particular file, and we redirect the request to the appropriate CDN server. Older versions of Unity in particular do not support redirects – so this *should* be enabled for existing Unity-based apps.]

  • Workaround: Apps without redirect support should use the GetCDNUrl() method to retrieve the CDN version of a file’s URL for faster downloads (instead of enabling this setting).

  • For best results, the file retrieval compatibility flag should be left unchecked.

[2.25] Default to returning full Entity contents for create and update operations

  • Before Release 2.25, brainCloud always returned the full contents of an entity object after Create() and Update() operations. This seemed to make sense at the time, but as some customers expanded to writing objects of 100K or more, it became painfully obvious that this was a waste of bandwidth.

  • Enabling this compatibility flag will needlessly slow down client responses and increase the data usage of your app (affecting your customers)

[2.25] Enable legacy Currency handling (balance not enforced for consumption)

  • In brainCloud 2.25 we fixed a defect where the server was not correctly enforcing currency balances under all scenarios in currency consumption. This has since been addressed, but the compatibility flag exists in case some apps were depending upon the prior behavior.

[2.22] Return legacy-format Social Leaderboard results

  • brainCloud added support for manually managed friends in Release 2.22 – the implementation of which forced some changes to the JSON data returned from the social leaderboard APIs. This flag should only be enabled if your app pre-dates 2.22 and depends upon the details of the old format.

[2.22] Return User Entities during Authenticate and ReadPlayerState methods

  • Before Release 2.22, brainCloud was used to return all of a user’s User Entities in response to Authenticate() and ReadPlayerState() methods. This was pretty convenient for quickly launching and logging into apps – but didn’t scale when some apps started storing thousands of entities per user!

  • brainCloud no longer does this by default.

[2.14] Enable checking of Incoming Events with each API message

  • brainCloud includes an Events system that can be used to send messages (events) to individual users. This is useful for sending chat messages, awards, gifts, challenges, and the like. Earlier builds of brainCloud would automatically check for any incoming events for a user during the processing of every API call. This processing has a server toll, and as most apps aren’t using events, unnecessarily slowed down processing for everyday apps. Apps can instead use the GetEvents() method to poll for new events.

  • Update brainCloud RTT provides superior real-time notification for most classes of events. Apps requiring real-time notification should use RTT instead of enabling this flag.

  • Enabling the flag will slow down all API processing for the app.

[2.11] Use legacy Cloud Code result format

  • In brainCloud 2.10 we adjusted the JSON returns from Cloud Code scripts to align them better with the returns from regular API calls. This setting allows older scripts to still run.

Did this answer your question?