Search Unity

Using Xcode 14 to build to build for iOS16, UnityFramework validation warning

Discussion in 'iOS and tvOS' started by yakandco, Sep 10, 2022.

  1. yakandco

    yakandco

    Joined:
    Dec 3, 2014
    Posts:
    90
    As the title suggests, getting a warning when trying to submit using Xcode 14 to build an iOS16 app. It says:

    The app references non-public selectors in Payload/APPNAME.app/Frameworks/UnityFramework.framework/UnityFramework: badgeImage

    Googling this error and it seems that if bitcode could be enabled it might solve the problem, but bitcode has now been deprecated from Xcode 14, and if any compiled app has bitcode, it gets forceably stripped before being submitted which is exposing this issue.

    Anyone know of a workaround, or Unity, anyone aware of this, is a fix incoming? going to be a lot of devs trying to submit updates for iOS16 right now.
     
    Last edited: Sep 12, 2022
    Becreatives likes this.
  2. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Anyone else seeing this issue?
     
    Becreatives likes this.
  3. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    and there is also a similar warning when subimtting tvOS builds to app store connect, but does differ:

    The app references non-public selectors in Payload/APPNAME.app/Frameworks/UnityFramework.framework/UnityFramework: applicationWillFinishLaunchingWithOptions:, registerUserNotificationSettings:
     
    Becreatives likes this.
  4. Nickjd331

    Nickjd331

    Joined:
    Aug 22, 2014
    Posts:
    29
    I had a similar issue. Disabled bitcode from all my targets and it seemed to work.
     
  5. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Ohh, thanks for that suggestion. Seems so simple, here I was thinking Unity would need to properly fix whatever method was accessing something it shouldn't be. Whereas turning off bitcode didn't occur to me because it's meant to be stripped from a build and not used so thought it would be essentially off. But anyway, thanks I'll try this.
     
  6. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    hmm... no the wanrings remain for me, I've disabled bitcode but still get the same validation warnings. Looks like Unity will need to fix something in the UnityFramework.
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,750
    Also getting a very similar but not exactly same error.

    I think Unity has some fixing to do.

    Sadly, they are never ahead of these things, even though the new XCode and SDK have been in beta for a while now, so they had time to see what changes need to be made and implement them before they are officially released, but it's not how Unity operates.

    upload_2022-9-14_17-49-37.png
     
    Kenneth_ION and RaventurnStefan like this.
  8. psql

    psql

    Joined:
    Nov 19, 2015
    Posts:
    10
    damn, getting the same `non-public selectors` error over here on XCode 14 + Unity 2022.1.16f1
    disabling bitcode does nothing
     
  9. RaventurnStefan

    RaventurnStefan

    Joined:
    Aug 1, 2012
    Posts:
    44
    Same for us, with Unity 2020.3.34f1 + XCode 14
     
    northhomie likes this.
  10. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    This is likely to be a false positive of Xcode 14. Those selectors come from AppDelegateListener from Classes/PluginBase/AppDelegateListener.h/mm. Those are part of the interface declarations for native plugins, which is not actual private API usage, and Xcode should not have flagged it, given Xcode 13 is fine with it. It could be just a simple clash with an actual private API, or it could also just be a mishap on the App Store server, so it's better to open tickets with Apple to correct this, and use Xcode 13 in the meantime.

    That said, if you have to use Xcode 14, and you don't use any iOS native plugins that may listen to the App's lifecycle, you can try renaming those plugin API interfaces into different names. I did a quick test with my project and it seem to run fine on my M1 Mac:

    View attachment 1120553
     
    Last edited: Sep 19, 2022
  11. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    BTW I just so happened to upload a Unity project build to App Store Connect just now and it was processed as normal even with those warnings (those were not blocking errors).

    And when this happened previously to other developers, they seem to be able to pass App Review just as fine:
    https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/209
     
  12. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    Yup can confirm we are passing review with the warnings, so probably ignorable but should be addressed, so yup perhaps issue is with Apple, but if there's a workaround Unity can do it's probably still partly on them to sort out. Thanks for the tip on renaming methods, could be a workaround we can do to avoid uncertainty.
     
  13. psql

    psql

    Joined:
    Nov 19, 2015
    Posts:
    10
    Worked for me, just got a warning but successful upload. Thank you :)
     
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,750
    XCode 13 is fine with it because 13 uses bitcode and those parts are getting stripped. Bitcode is no more in 14, hence code that could be stripped is not getting stripped.

    So it's a Unity bug, which means we need 3 more years until it is addressed.

    Thankfully it doesn't matter, since I can also confirm you can pass review even with those warnings.
     
    RaventurnStefan likes this.
  15. Underwater008

    Underwater008

    Joined:
    Sep 29, 2020
    Posts:
    1
    Getting the same error. Trying to build Unity project to iOS16 with Xcode14. Only Xcode14 can build to iOS16. Is there a fix yet?
     
    RaventurnStefan likes this.
  16. MetalCodeGames

    MetalCodeGames

    Joined:
    Mar 4, 2019
    Posts:
    5
    I'm getting the same error too using
    Xcode Version 14.2
    Unity 2021.3.7f1
     
  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,750
    It doesn't matter, just ignore it.
     
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,750
    It seems this is fixed in the latest LTS? Or maybe something changed on Apple's side? I just know I uploaded something with latest 2021 LTS (2021.3.23f1) and XCode upload gave me no errors / warnings.