Skip to content

IOS publish #31507

Description

@luan-nvg

react-native-cli: 2.0.1
react-native: 0.64.1

error when trying to publish to Apple Store

Dear Developer,

We identified one or more issues with a recent delivery for your app, "App" 1.0 (7). Please correct the following issues, then upload again.

ITMS-90338: Non-public API usage - The app references non-public selectors in app: _isKeyDown, _modifiedInput, _modifierFlags, handleNotification:, isPassthrough, onSuccess:, removeValuesForKeys:completion:, setCategoryID:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

Best regards,

The App Store Team

Activity

  1. skay97 commented on May 17, 2021

    @skay97

    @luan-nvg This seems similar to Issue 31437. Were you able to make any progress on this?

  2. luan-nvg commented on May 17, 2021

    @luan-nvg
    Author

    @ luan-nvg Isso parece semelhante ao problema 31437 . Você conseguiu fazer algum progresso nisso?

    @luan-nvg This seems similar to Issue 31437. Were you able to make any progress on this?

    I still couldn't get friend, this error is giving in the newest version of the react to 64, and the craziest is that if I put it in version 0.63 it doesn't give this problem, however according to them on the ipad version 14.5.1 of the problem. this week I had to hire a person to emulate my project on an ipad compatible with what they asked for, and the same works as they are rejecting the informant that there is a blank screen. without totally ridiculous log shipping.

  3. luan-nvg commented on May 25, 2021

    @luan-nvg
    Author

    @skay97

    I found out that at 0.63 I was accusing blank screen only in the approval of the Apple ad, in my Xcode it was marked in the option Archive as debugging in Product / Scheme / Edit Sheme / Archive / Build Configuration, change to a non-debuggable release so I was able to pass in Apple.

    Since the topic I opened went to 0.64 with the error Non-public use of the API, the topic will remain open.

  4. archcorsair commented on Jun 12, 2021

    @archcorsair

    EDIT:
    Resolved this issue by updating my archive scheme from Debug to Release

    Currently experiencing the same issue. I was previously able to build and publish 0.64 but today I got the same error when attempting to publish beta to testflight.

    react-native: 0.64.1
    react-native-cli: 5.0.1
    hermes: enabled

    Method Names described in email (don't think all of these are RN, but some are):

    _isKeyDown, _modifiedInput, _modifierFlags, determineAppInstallationAttributionWithCompletionHandler:, handleNotification:, identities, isPassthrough, lookupAdConversionDetails:, netServiceBrowser:didRemoveService:, onSuccess:, removeValuesForKeys:completion:, setCategoryID:, transform:, zipArchiveDidUnzipFileAtIndex:totalFiles:archivePath:unzippedFilePath:, zipArchiveProgressEvent:total
    
  5. archcorsair commented on Jun 14, 2021

    @archcorsair

    @luan-nvg
    I was able to resolve my issue by updating my archive scheme from Debug to Release

  6. luan-nvg commented on Jun 15, 2021

    @luan-nvg
    Author

    @luan-nvg
    I was able to resolve my issue by updating my archive scheme from Debug to Release

    our this same resolution I applied before seeing this comment at 0.63 was having a problem with white screen without much information from apple. and rra just because it was debug in the scheme. as soon as possible I will test on 0.64

  7. archcorsair commented on Jun 15, 2021

    @archcorsair

    YourApp.xcscheme

       <ArchiveAction
    -      buildConfiguration = "Debug"
    +      buildConfiguration = "Release"
          revealArchiveInOrganizer = "YES">
       </ArchiveAction>
    
  8. WenLonG12345 commented on Nov 15, 2021

    @WenLonG12345

    Any solution on this?
    Because I want to publish a test ipa on TestFlight with debug env. If I put scheme from Debug to Release, react-native-config will auto take Release value.

  9. haitaox commented on Nov 15, 2021

    @haitaox

    we're in same boat here, we need to publish our debug build to TestFlight for internal testing before release. this is blocking us from uploading to TestFlight. this was never an issue before.

  10. azeezat commented on Dec 19, 2021

    @azeezat

    Navigate to ios/yourAppName.xcodeproj/xcshareddata/xcschemes/yourAppName.xcscheme and replace every instance of "Debug" with "Release"

  11. SakeFabi commented on Dec 25, 2021

    @SakeFabi

    Hey all, any chance this issue is resolved without putting the whole project into release mode? Looks like I find myself in the same group using TestFlight...

  12. arinjay commented on Jan 20, 2022

    @arinjay
    Contributor

    Upgraded to react-native 0.66.0 and got this issue.
    We need to publish our debug build to TestFlight for internal testing before release. this is blocking us from uploading to TestFlight.

  13. SakeFabi commented on Jan 20, 2022

    @SakeFabi

    Hey @arinjay, I found you can still upload to testflight in release mode as described by others above, but it will also get checked by apple as I understand. Since I am very inexperienced with the apple store, I am not sure what the impact of that will be and how setting the archive from "debug" to "release" really changes the version itself. Maybe somebody can shed a light?

  14. arinjay commented on Feb 14, 2022

    @arinjay
    Contributor

    uploading the app in release mode devoids us from opening the dev menu on apps downloaded from test flight.
    Is there any method to override the dev menu to enable in release mode?

  15. 100 remaining items

  16. liho00 commented on Mar 29, 2023

    @liho00

    same issue GG

  17. jacobleejones422 commented on Apr 3, 2023

    @jacobleejones422

    I am still getting this error
    image

  18. jaroslav009 commented on Apr 10, 2023

    @jaroslav009

    ITMS-90338: Non-public API usage - The app references non-public selectors in: _isKeyDown, _modifiedInput, _modifierFlags. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

    same issue

  19. RenanSanguinete commented on Apr 10, 2023

    @RenanSanguinete

    Same warning here.

    The app references non-public selectors in Payload/ProjectApp.app/ProjectApp: getAuthorizationStatus:, isPassthrough, onSuccess:, removeValuesForKeys:completion

    The Minimum Development already to 11.0
    buildConfiguration set to "Release"
    No Flipper enabled

    React 0.68.5
    Xcode 14.3

  20. andrefilipin commented on Apr 12, 2023

    @andrefilipin

    Same error here
    image

  21. jaroslav009 commented on Apr 14, 2023

    @jaroslav009

    same gg

  22. fabriciosautner commented on Jun 6, 2023

    @fabriciosautner

    Same problem

  23. JanMesaric commented on Jun 9, 2023

    @JanMesaric

    Same problem here.
    "react-native": "0.71.10",
    xcode 14.3.1

  24. added a commit that references this issue on Jun 16, 2023
  25. fedorovichandrey commented on Jul 17, 2023

    @fedorovichandrey

    Solved this by writing following post install script. uploaded app on Testflight in debug mode post making these changes and it got approved by Apple ✌️.

    post_install do |installer|
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_modifierFlags",
                                    "_modifierEventFlags")
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_modifiedInput",
                                    "_modifiedEventInput")
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_isKeyDown",
                                    "_isKeyEventDown")
            find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerClient.h",
                                    "handleNotification",
                                    "handlePackageNotification")
    
            find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerConnection.mm",
                                    "handleNotification",
                                    "handlePackageNotification")
        end
    

    definition of find_and_replace

    def find_and_replace(dir, findstr, replacestr)
      Dir[dir].each do |name|
          text = File.read(name)
          replace = text.gsub(findstr,replacestr)
          if text != replace
              puts "Fix: " + name
              File.open(name, "w") { |file| file.puts replace }
              STDOUT.flush
          end
      end
      Dir[dir + '*/'].each(&method(:find_and_replace))
    end
    

    I used this code in my Podfile. When I run command pod install I get an error:
    [!] Invalid Podfile file: [!] Specifying multiple post_install hooks is unsupported

  26. greghaygood commented on Jul 25, 2023

    @greghaygood

    I used this code in my Podfile. When I run command pod install I get an error: [!] Invalid Podfile file: [!] Specifying multiple post_install hooks is unsupported

    @AndriyFedorovich As the error says, you already have a post_install block in your Podfile from the base RN install. Just move the find_and_replace lines from this tip into the one you had.

  27. guimarcel commented on Mar 14, 2024

    @guimarcel
    ```diff
    buildConfiguration

    YourApp.xcscheme

       <ArchiveAction
    -      buildConfiguration = "Debug"
    +      buildConfiguration = "Release"
          revealArchiveInOrganizer = "YES">
       </ArchiveAction>

    im using expo sdk 50, after 2 days searching answers to solve this bug and finally found the solution!!!

    in eas.json
    build.production.ios.buildConfiguration: true

    and upload my build succesfully

  28. Yasir12598 commented on Apr 18, 2024

    @Yasir12598

    Solved this by writing following post install script. uploaded app on Testflight in debug mode post making these changes and it got approved by Apple ✌️.

    post_install do |installer|
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_modifierFlags",
                                    "_modifierEventFlags")
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_modifiedInput",
                                    "_modifiedEventInput")
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_isKeyDown",
                                    "_isKeyEventDown")
            find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerClient.h",
                                    "handleNotification",
                                    "handlePackageNotification")
    
            find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerConnection.mm",
                                    "handleNotification",
                                    "handlePackageNotification")
        end
    

    definition of find_and_replace

    def find_and_replace(dir, findstr, replacestr)
      Dir[dir].each do |name|
          text = File.read(name)
          replace = text.gsub(findstr,replacestr)
          if text != replace
              puts "Fix: " + name
              File.open(name, "w") { |file| file.puts replace }
              STDOUT.flush
          end
      end
      Dir[dir + '*/'].each(&method(:find_and_replace))
    end
    

    For me it didn't work because of the relative paths starting with ./node_modules. (nothing was triggered)

    However, I changed the paths to start with ../node_modules (notice the double dot indicating parent directory instead of current directory) and it worked (matched with "Fix: ..." output).

    I've yet to try if Apple accepts though.

    Thanks it works.

  29. kavya-shree-s commented on Nov 8, 2024

    @kavya-shree-s

    Solved this by writing following post install script. uploaded app on Testflight in debug mode post making these changes and it got approved by Apple ✌️.

    post_install do |installer|
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_modifierFlags",
                                    "_modifierEventFlags")
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_modifiedInput",
                                    "_modifiedEventInput")
            find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                    "_isKeyDown",
                                    "_isKeyEventDown")
            find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerClient.h",
                                    "handleNotification",
                                    "handlePackageNotification")
    
            find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerConnection.mm",
                                    "handleNotification",
                                    "handlePackageNotification")
        end
    

    definition of find_and_replace

    def find_and_replace(dir, findstr, replacestr)
      Dir[dir].each do |name|
          text = File.read(name)
          replace = text.gsub(findstr,replacestr)
          if text != replace
              puts "Fix: " + name
              File.open(name, "w") { |file| file.puts replace }
              STDOUT.flush
          end
      end
      Dir[dir + '*/'].each(&method(:find_and_replace))
    end
    

    I used this code in my Podfile. When I run command pod install I get an error: [!] Invalid Podfile file: [!] Specifying multiple post_install hooks is unsupported

    getting same error how did you resolved it

  30. arinjay commented on Jul 22, 2025

    @arinjay
    Contributor

    @kavya-shree-s try running this command

    sudo gem install cocoapods-user-defined-build-types

    I use hybrid app setup (swift + react native), in case you node_module are present in different location. do check the path i ./node_modules/ (can try with ../node_modules/..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions