Build & Deploy iOS app
You can package Scandi as a native iOS application
To deploy an iOS app, you need to have at least one native feature to be included in the app. We used a barcode scanner to search for items. You can add notifications management or anything else, but you have to add it as native code.
To deploy an iOS application you must have a macOS-powered device.
To display your site in iOS App, you first need to make sure it is deployed online. Then, you can use WebView to display the site inside of an iOS native app. To integrate native feature to the site, we suggest using the following approach:
Create a Swift View Controller
Display WebView inside of this controller
Create a JavaScript file that would be injected into the app
Use WebKit message handlers API to establish communication between WebView and native app
Creating an app (step-by-step)
1. Create a new XCode project

2. Select single view template

3. Go to ViewController.swift
ViewController.swift 
4. Replace its content with the script bellow
5. Create an inject.js file from empty template
inject.js file from empty template

6. Replace its content with the script bellow
7. Compile and test the application


As you can see injecting scripts into WebView is not that hard. When clicking on the barcode icon, the XCode console logs the barcode was clicked message. You can replace this logic with anything that matches your needs.
We will publish the full app code (including the barcode implementation) soon, so you can use it as a reference.
When the app is done, it's time to publish it!
Publishing the app
To publish an iOS app, you must be signed up for the Apple Developer Program. You can do this on the official site, here.
Login to your App Store Connect
Go to My Apps click +
Enter app name, category, privacy, pricing
Make screenshots of your application (size guide)
Next, build your app with XCode
For build platform select: Generic iOS Device
Go to Product > Archive and build the app
Select newly created archive, click Distribute App, select iOS AppStore
Go back to your App Store Connect
Find a version of your app, and click Submit for Review
For a more detailed guide, please see Chris's guide.
The process of review might take up to 10 days and result in refusal. ScandiPWA does not guarantee your app publishing. Please make sure the app you build complies with AppStore guidelines.
Last updated
Was this helpful?