2
  • I am having a requirement,wherein i have a React-Native app (Primary App),and having a Game-App(Secondary App) which is also developed in React-native.

  • Now on a button click of Primary App I want to launch Secondary App,and play the game as part of Primary-App.Please let me know or guide me,How can I integrate these two separate entities and get the done.

  • Is there any way,to bundle Secondary react-native app and launch in Primary App?

Note :- Since i have hundreds of games it will be a bad idea to have code of all games in Primary app, so is there any way to launch each game as separate entity or in any bundle form something like that,as part of Primary App.

Thanks for your time.

  • You can open your andriod app in react-native's `webview`. – Sohan Patil May 01 '20 at 06:10
  • Thanks for suggestion @SohanPatil, but I have to eliminate that option,Since it's game App,i want to launch it as part of native module,and give the full power of native environment. – RajeshChouhan785 May 01 '20 at 06:11
  • I don't use React, but could you not use deep linking for this? – Doug May 01 '20 at 06:14
  • @Doug Thanks for suggestion but as per documentation of deep linking ,the app is launched outside of primary app,but here the requirement is to launch secondary app as part of Primary App. if you could recall, is there any way to launch the secondary app as part of primary app ? That will be helpful. Thanks – RajeshChouhan785 May 01 '20 at 06:21
  • Why secondary app needed to be part of primary app when secondary app can work standalone? Please explain why secondary app is needed to be part of primary? Is there score or statistic needed to be shared with Primary app? If such is the case you can use ContentProvider in second app to gave these info to primary app. Let secondary app run as standalone. – nitinkumarp May 01 '20 at 06:46
  • 1
    Please check this answer https://stackoverflow.com/a/57401584/7398574 – Neetin Solanki May 01 '20 at 07:04
  • @nitinkumarp Thanks for Suggestion if Secondary App is standalone, it will need to be installed on the user's device, i do not want that, i just want it to run as part of Primary app. – RajeshChouhan785 May 01 '20 at 07:34
  • @NeetinSolanki sure checking the mentioned link. Thanks. – RajeshChouhan785 May 01 '20 at 07:34

1 Answers1

1

You can use the Game App's root component as a normal React component in your Primary App, something along the lines of:

<PrimaryApp>
  ...
  <GameApp /> 
  ...
</PrimaryApp>

Update:

There is no easy way that I know of to achieve what you want – downloading and executing a separate react native bundle on demand. It is certainly feasible, but get ready to go a long way on your own.

Also, note this App Store Guidelines statement on what kind of apps Apple doesn't accept on the App Store:

3.2.2 Unacceptable

(i) Creating an interface for displaying third-party apps, extensions, or plug-ins similar to the App Store or as a general-interest collection.

ivanmoskalev
  • 2,004
  • 1
  • 16
  • 25
  • Thanks for suggestion @ivanmoskalev, since the above approach requires me to have code of Secondary app as part of primary one,since i have hundreds of game's it will be a bad idea to have code of all games in Primary app. so is there any way to launch each game as separate entity or in any bundle form something like that ? – RajeshChouhan785 May 01 '20 at 06:29
  • @RajeshChouhan785 can you add this requirement to your question then? – ivanmoskalev May 01 '20 at 06:30
  • Sure @ivanmoskalev. – RajeshChouhan785 May 01 '20 at 06:33
  • Thanks for Update @ivanmoskalev ,I will look into your suggestions. Can you recall if there is any way to bundle React-native Project and import the same bundle in Primary app,and import the required component from the bundle, so that i can use the same component,the way you mentioned at the top of comment. – RajeshChouhan785 May 01 '20 at 07:12
  • Hi @RajeshChouhan785 Did you find any solution for this. I am also having the same requirement. – ramesh m Nov 10 '22 at 07:44
  • Guys, Is there any solution for that? – Sumit Dhakad Jul 09 '23 at 07:34