Apple now rejecting apps that access UDID

Bricato Operations's Avatar

Bricato Operations

23 Mar, 2012 03:49 PM

It looks like this section of hockeykit is going to start causing app store rejections soon (today?); any plans to update the SDK, or should we just plan on pulling the hockeykit code from our app store builds?

- (NSString *)deviceIdentifier {
  if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) {
    if (!isAppStoreEnvironment_) {
      return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)];
    } else {
      return @"appstore";
    }
  }
  else {
    return @"invalid";
  }
}
  1. Support Staff 2 Posted by Andreas Linde on 23 Mar, 2012 07:15 PM

    Andreas Linde's Avatar

    Hello,

    it is not yet clear if this is causing problems for app store rejections, since right now it is just rumors that are spreading without anybody giving real details of such rejections. We submitted our own apps with this code in the app and will monitor also the web further.

    We are also looking into easy ways to modify the SDK to make the beta version still being able to use the UUID information and being app store safe. If you want to be 100% safe right now, you can change the code you posted and always use return @"invalid" and remove the other lines for app store by e.g. using #ifdef CONFIGURATION_AppStore statements. (The exact line may differ on your setup depending on your configuration names).

    Best,
    Andreas

  2. 3 Posted by Roustem Karimov on 25 Mar, 2012 05:26 PM

    Roustem Karimov's Avatar

    Andreas,

    Do you really need the UDID? Could you just create a generic uuid and save it somewhere in the app folder?

  3. Support Staff 4 Posted by Andreas Linde on 25 Mar, 2012 05:45 PM

    Andreas Linde's Avatar

    Hello Roustem,

    yes, for beta tests we do need to UDID, because otherwise we would need the users in your app to always setup an account on our site to be able to provide in-app updates and collect test statistics. Also we would need the user somehow to identify the device if he has multiple. So we need to compare the device to the devices in the provisioning profile. Things are just getting very complex all over the place.

    But as I said, it is only used and needed for beta testing. So we just published updated versions of the SDKs which move the UDID check into delegate methods that you have to implement. So you can make sure using the proper #ifdef statement that the UDID is only grabbed when building the beta version but not when building for the app store. That way the code will not be present in the binary at all.

    We also updated the documentation available here: http://support.hockeyapp.net/kb/client-integration/beta-distributio...
    Check the bottom part under Modify Source Code.

    The new SDK version is available here in the sidebar: http://www.hockeyapp.net/releases/
    Direct download link: https://github.com/downloads/TheRealKerni/HockeyKit/HockeyAppKit-iO...

    Best,
    Andreas

  4. 5 Posted by Gerald Guyomard on 26 Mar, 2012 09:42 AM

    Gerald Guyomard's Avatar

    Hello,

    I just downloaded your latest SDK: do you still maintain CNSHockeyManager that used to encapsulate both QuincyManager and BWHockeyManager ?
    I'm using it, so it would be nice to have a ready-to-use SDK with the latest fixes regarding UDIDs.

    I found no trace of it in this release.

    Oh and by the way, now JSONKit is now provided again in the release :)

  5. Support Staff 6 Posted by Thomas Dohmke on 26 Mar, 2012 09:47 AM

    Thomas Dohmke's Avatar

    Hi Gerald,

    we updated both the combined SDK and HockeyKit / QuincyKit yesterday night and removed all references to the UDID. Instead, you should implement a delegate method customDeviceIdentifier and return nil for your store builds / the UDID for beta builds. A blog post on this is coming later today.

    Cheers,

    Thomas

  6. 7 Posted by Gerald Guyomard on 26 Mar, 2012 10:04 AM

    Gerald Guyomard's Avatar

    Thanks. Could you please give us the direct download link to your combined SDK ?

  7. Support Staff 8 Posted by Thomas Dohmke on 26 Mar, 2012 11:13 AM

    Thomas Dohmke's Avatar

    Hi Gerald,

    this link is:
    https://github.com/codenauts/HockeySDK-iOS/zipball/2.2.6

    Cheers,

    Thomas

  8. 9 Posted by Gerald Guyomard on 26 Mar, 2012 12:07 PM

    Gerald Guyomard's Avatar

    thank you!

  9. 10 Posted by Roustem Karimov on 26 Mar, 2012 08:45 PM

    Roustem Karimov's Avatar

    Thank you for resolving this issue so quickly!

  10. 11 Posted by Zulfi Shah on 27 Mar, 2012 06:20 PM

    Zulfi Shah's Avatar

    Is there any other important reason to update the library? I would prefer to use ifdef to exclude the uniqueIdentifier API, if that's the only change.

  11. Support Staff 12 Posted by Andreas Linde on 27 Mar, 2012 06:52 PM

    Andreas Linde's Avatar

    Hello Zulfi,

    that depends on how old your version is. We also did some bug fixes during the last months.

    Here are the links for the release notes:
    HockeyKit: https://github.com/TheRealKerni/HockeyKit/wiki/Release-Notes
    QuincyKit: https://github.com/TheRealKerni/QuincyKit/wiki/Release-Notes

    Hope this helps,
    Andreas

  12. 13 Posted by Zulfi Shah on 27 Mar, 2012 06:58 PM

    Zulfi Shah's Avatar

    How do I check my current version? I integrated within the last 2 months.

  13. Support Staff 14 Posted by Andreas Linde on 27 Mar, 2012 07:04 PM

    Andreas Linde's Avatar

    We added the version information into the SDK as a define only 2 version ago. So if you don't find the string "#define SDK_VERSION" in your files you are on a version released before March. We'd encourage you to update to the latest version.

  14. 15 Posted by Zulfi Shah on 27 Mar, 2012 10:04 PM

    Zulfi Shah's Avatar

    Should we update both HockeyKit and QuincyKit separately? Or just remove the earlier ones and add this 'combined' SDK?

  15. Support Staff 16 Posted by Andreas Linde on 27 Mar, 2012 10:06 PM

    Andreas Linde's Avatar

    Hello,

    you can update HockeyKit & QuincyKit as you have them now, no problem at all. The combined HockeySDK is where most of the future development will go into. So sooner or later it would be helpful to migrate. Right now it is basically a wrapper class around both SDKs with support for a Jira SDK. So it is up to you :)

    Best,
    Andreas

  16. 17 Posted by Zulfi Shah on 27 Mar, 2012 10:29 PM

    Zulfi Shah's Avatar

    Do the Hockey.bundle and Quincy.bundle files also need to be updated? They
    are having some weird issue with SVN, don't seem to show under version
    control.

  17. Support Staff 18 Posted by Thomas Dohmke on 28 Mar, 2012 08:44 AM

    Thomas Dohmke's Avatar

    Hi Zulfi,

    yes, please also update the bundles as we added some strings to them.

    Cheers,

    Thomas

  18. 19 Posted by Zulfi Shah on 29 Mar, 2012 06:11 PM

    Zulfi Shah's Avatar

    Thanks. And the crashreporter.framework? (sorry to go line-by-line on this,
    but I'm suffering from svn headaches)

  19. 20 Posted by Lee Armstrong on 29 Mar, 2012 09:08 PM

    Lee Armstrong's Avatar

    Yeah I get SVN headaches too when updating the bundles and the framework, any idea why?

  20. Support Staff 21 Posted by Thomas Dohmke on 29 Mar, 2012 10:00 PM

    Thomas Dohmke's Avatar

    Hi.

    We haven't used SVN for a while, not sure what the reason for your headaches is. Maybe the easiest solution is to remove the files, commit, then re-add them.

    CrashReporter.framework hasn't got any UDID-related changes (it didn't use the UDID anyway), but we made a bugfix about 2 months ago which fixes a bug in the crash log when your app name incudes a UTF char (like ä or é).

    Cheers,

    Thomas

  21. 22 Posted by Lee Armstrong on 30 Mar, 2012 06:49 AM

    Lee Armstrong's Avatar

    Yeah I think that is what I end up doing. I think it is because svn treats them as folders and is a little stupid on the matter. I end up having to delete, commit and then readd them.

    On another note how is the best method of getting the udid sent on the crashes for betas so that the user appears in the meta section of the crash? Since removing the alwayssensudid (from memory) it doesn't tie these up.

  22. Support Staff 23 Posted by Thomas Dohmke on 30 Mar, 2012 11:10 AM

    Thomas Dohmke's Avatar

    Hi Lee,

    you need to set the delegate of BWQuincyManager and implement the method BWQuincyManagerDelegate#crashReportUserID like so:

    - (NSString *)crashReportUserID {
    #if defined (CONFIGURATION_Beta)
      if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)])
        return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)];
    #endif
    
      return nil;
    }
    

    Or, just call customDeviceIdentifier from there, e.g.

    - (NSString *)crashReportUserID {
      return [self customDeviceIdentifier];
    }
    

    Please let me know if this doesn't work.

    Cheers,

    Thomas

  23. 24 Posted by Lee Armstrong on 30 Mar, 2012 11:39 AM

    Lee Armstrong's Avatar

    Thanks Thomas,

    I will give that a go.

    Lee

  24. Support Staff 25 Posted by Thomas Dohmke on 03 Apr, 2012 05:15 PM

    Thomas Dohmke's Avatar

    Hi guys,

    I close this ticket here, please open new discussions if you see any issues.

    Thomas

  25. Thomas Dohmke closed this discussion on 03 Apr, 2012 05:15 PM.

Comments are currently closed for this discussion. You can start a new one.