RLMAnalytics.hpp 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Realm Inc.
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License");
  6. // you may not use this file except in compliance with the License.
  7. // You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. //
  17. ////////////////////////////////////////////////////////////////////////////
  18. // Asynchronously submits build information to Realm if running in an iOS
  19. // simulator or on OS X if a debugger is attached. Does nothing if running on an
  20. // iOS / watchOS device or if a debugger is *not* attached.
  21. //
  22. // To be clear: this does *not* run when your app is in production or on
  23. // your end-user’s devices; it will only run in the simulator or when a debugger
  24. // is attached.
  25. //
  26. // Why are we doing this? In short, because it helps us build a better product
  27. // for you. None of the data personally identifies you, your employer or your
  28. // app, but it *will* help us understand what language you use, what iOS
  29. // versions you target, etc. Having this info will help prioritizing our time,
  30. // adding new features and deprecating old features. Collecting an anonymized
  31. // bundle & anonymized MAC is the only way for us to count actual usage of the
  32. // other metrics accurately. If we don’t have a way to deduplicate the info
  33. // reported, it will be useless, as a single developer building their Swift app
  34. // 10 times would report 10 times more than a single Objective-C developer that
  35. // only builds once, making the data all but useless.
  36. // No one likes sharing data unless it’s necessary, we get it, and we’ve
  37. // debated adding this for a long long time. Since Realm is a free product
  38. // without an email signup, we feel this is a necessary step so we can collect
  39. // relevant data to build a better product for you. If you truly, absolutely
  40. // feel compelled to not send this data back to Realm, then you can set an env
  41. // variable named REALM_DISABLE_ANALYTICS. Since Realm is free we believe
  42. // letting these analytics run is a small price to pay for the product & support
  43. // we give you.
  44. //
  45. // Currently the following information is reported:
  46. // - What version of Realm is being used, and from which language (obj-c or Swift).
  47. // - What version of OS X it's running on (in case Xcode aggressively drops
  48. // support for older versions again, we need to know what we need to support).
  49. // - The minimum iOS/OS X version that the application is targeting (again, to
  50. // help us decide what versions we need to support).
  51. // - An anonymous MAC address and bundle ID to aggregate the other information on.
  52. // - What version of Swift is being used (if applicable).
  53. void RLMSendAnalytics();