Search Unity

Everyplay iOS - App Rejected - NSPhotoLibraryUsageDescription Missing

Discussion in 'Unity Everyplay' started by Brad-Keys, Sep 14, 2016.

  1. Brad-Keys

    Brad-Keys

    Joined:
    May 1, 2006
    Posts:
    161
    I updated to the latest Everyplay SDK yesterday and tried uploading my new app version, but received the following automated message:

    I don't have any other plugins or features that would require Photo access, but I also can't think of why Everyplay needs it. Still though, Everyplay is the most likely culprit. In my Info.plist I see the Everyplay descriptions for Microphone and Camera. For now I've manually added one for Photo Library Usage and used the same description as the mic/camera values. My best guess is Apple's binary processing has changed with the release of iOS 10 yesterday and this issue is new.
     
  2. pmjo

    pmjo

    Unity Technologies

    Joined:
    Sep 17, 2013
    Posts:
    245
    Good catch. I analyzed Everyplay binary and it indeed has a reference to AVAssetLibrary even it is only used for debugging purposes. The reference will be removed in the next update however for now you must add NSPhotoLibraryUsageDescription string in Info.plist. The content can be basically anything, e.g. "Everyplay requires access to the photo library". Since the code is not called the message will not be really shown anywhere. And yes, it is indeed related to Apple's binary processing changes after iOS 10 release. Sorry for the inconvenience.
     
    Last edited: Sep 15, 2016
  3. pmjo

    pmjo

    Unity Technologies

    Joined:
    Sep 17, 2013
    Posts:
    245
    Adding NSPhotoLibraryUsageDescription to the Info.plist:

    1. Open YourXCodeProject/Info.plist into a text editor
    2. Add following lines

    <key>NSPhotoLibraryUsageDescription</key>
    <string>Everyplay requires access to the photo library</string>

    after

    <string>Everyplay requires access to the microphone</string>

    3. Save
    4. Re-submit and the validation should pass

    ps. same thing can be done through XCode by clicking Add row in Info.plist and putting "Privacy - Photo Library Usage Description" as the key and "Everyplay requires access to the photo library" as the string value
     
  4. pmjo

    pmjo

    Unity Technologies

    Joined:
    Sep 17, 2013
    Posts:
    245
    Please use the following hot fix to get around the App Store validation issue. Just replace the Editor/Everyplay/Scripts/EveryplayPostprocessor.cs with the attached file. It will automatically add the required Info.plist item.
     

    Attached Files:

  5. pmjo

    pmjo

    Unity Technologies

    Joined:
    Sep 17, 2013
    Posts:
    245
    Same hot fix as Unity package. Just import it after upgrading to Everyplay SDK 2121-1540 - Sep 13th 2016.
     

    Attached Files:

  6. Pelican_7

    Pelican_7

    Joined:
    Nov 25, 2014
    Posts:
    190
    Thanks for the hot fix @pmjo. Just submitted an iOS 10 update successfully with it.
     
  7. pmjo

    pmjo

    Unity Technologies

    Joined:
    Sep 17, 2013
    Posts:
    245
    That's great news! Thank you.
     
  8. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    303
    I am getting nearly the same thing only with the camera, I am not using everyplay.

    I don't access the camera anywhere so I'm not sure where its coming from.
     
  9. Pelican_7

    Pelican_7

    Joined:
    Nov 25, 2014
    Posts:
    190
    @Luke-Houlihan Which version of Unity are you using? I noticed in the release notes of the 5.4.1p2 patch from last week that Unity resolved this issue.

    iOS: Fixed App Store submissions with Xcode 8 when phone camera is not being used by game (https://unity3d.com/unity/qa/patch-releases/5.4.1p2)

    Alternatively, if you aren't able to update your Unity version, you could add the NSPhotoLibraryUsageDescription key to the info.plist yourself as @pmjo detailed.
     
  10. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    303
    I am using 5.4.1f2, I'll try the patch that sounds like exactly the fix I need.
    I did manage to use the way @pmjo posted successfully for now.
    Thanks for the help.