Reputation: 200
I want to build a React webapp to be used on an iPad.
Basically I just want to click on the HomeScreen of my WebApp and it should open in fullscreen mode.
But i am not sure if its possible to do that on a iPad, when I was searching for this topic I only found stuff for react-native. Yet I want to know if it’s possible to do w/ plain react.
Someone who can tell if this possible and if yes, how I should go about it?
Upvotes: 1
Views: 1798
Reputation: 316
If you wanted to keep this on the web, you could create a Progressive Web App using a Service Worker. There is a great general tutorial from Google at https://developers.google.com/web/fundamentals/getting-started/codelabs/your-first-pwapp/. PWA's can have a save to home screen option, where your web app is stored on the users home screen like an app and is viewed full screen.
Or a specific React implementation from Addy Osmani is available here - https://medium.com/@addyosmani/progressive-web-apps-with-react-js-part-i-introduction-50679aef2b12.
I created a PWA for a university project before I graduated and it was great fun. Browsers are starting to adopt this more, with other features features being introduced such as Background Sync.
Upvotes: 1
Reputation: 284
You can create an app that simply renders standard HTML/JS as though the user where in a browser with something like PhoneGap. The basic idea is to put an app icon on your mobile device that links to a regular website. This is what you would have to do to use React on a mobile device as though it were an app. Alternatively, people could just visit your React site through a browser.
React Native transpiles to Android and iOS code (Java and Swift), which you then compile into 2 native apps. One for iOS and one for Android. It looks and acts a lot like ReactJS, but it's a different beast and most regular React apps will not be portable to React Native without significant alterations.
Upvotes: 0