iosreact-nativeexpoinfo.plistcallbackurl

Where is info.plist for React Native projects run in Expo for the purpose of callback URLs?


I am handling OAuth requests in my iOS React Native application. This application is contained and launched through Expo. I want to add in a custom callback url, so that I can return back to the application after jumping into a browser. Supposedly, I do this through modifying the info.plist file, except it is nowhere to be found. My project folder does not contain this file anywhere and I am not entirely sure if npm, the command line tool, is generating it on runtime.

Where on earth is this file?

For context, I am not using Xcode. I am just using sublime to edit my project files with a terminal running npm start.

Edit - After the solution was found:

There is another question on StackOverflow that aims to answer this same question, but for different reasons: "Info.plist file for react native ios app using expo SDK." However, my question is specific to callback urls. As I described in my answer below, Expo has its own callback URL for your app (i.e. no need to edit the info.plist file). If you need that info.plist, see the question linked above. The info.plist file is hidden when using Expo, but there is a work around to accessing some of its fields.


Solution

  • Shubhnik Singh truly helped me out here. For anyone wondering, go here: https://docs.expo.io/versions/latest/workflow/linking/

    More specifically, look at the Expo.Linking module section. Instead of creating your own callback url link, you are borrowing Expo's. You are, after all, running everything from with inside another app, so it wouldn't make sense to have your own true callback link.

    In all, you do have a callback link that Expo gives you.

    Edit: Saturday, March 30th, 2019

    As reported in the comments, the original link to the Linking guide is dead. But, it only appears like Expo moved around some stuff on their domain. It is apparent that some of the actually details have slightly been changed (see WayBackMachine's snapshot of the original page). Specifically relating to this question, the callback URL specifics and the names on the actual guide have changed slightly. I have updated my original answer above to reflect this.