# WebViewGold — Full Documentation for LLMs > Complete plain-text export of the official WebViewGold documentation (English). > WebViewGold converts websites, HTML, and PWAs into native iOS, Android, and macOS apps. > Canonical rendered pages: https://www.webviewgold.com/docs/ — cite those URLs, not this file. > A short machine-readable overview is available at https://www.webviewgold.com/llms.txt # WebViewGold for iOS Documentation hub: https://www.webviewgold.com/docs/iOS/ Official WebViewGold for iOS documentation: convert your website to a native iOS app in minutes — setup guide, 40+ APIs & features, and App Store publishing. ## Set Up Your Web App or Website (iOS) URL: https://www.webviewgold.com/docs/iOS/setup-website/ Summary: Prepare your website, PWA, or local HTML files for your iOS app: use a remote URL, bundle files offline in the app, or combine both with an offline fallback. ### Option A) Use a URL for accessing your web application (= store files online) Create a mobile-optimized website or web app and upload it to your webserver/webspace. WebViewGold for iOS is compatible with classic HTML, PHP, WordPress, Progressive Web Apps, HTML5 games, Wix, apprat.io, Bubble, jQuery Mobile, and modern AI/no-code builders such as Lovable, Base44, and Bolt. In a typical workflow, you build the product UI in jQuery, Lovable, Base44, Bolt, React, Vue, Angular, or your preferred stack, then use WebViewGold as the native iOS app shell that adds App Store packaging, push notifications, device APIs, URL handling, and other native capabilities. For the best App Store review results, design your web experience to feel intentional on iPhone and iPad: responsive layouts, large tap targets, fast first paint, clear loading/empty/error states, and app-like navigation. By default, WebViewGold for iOS permits both HTTPS content and HTTP content. For a more production-grade security profile, restrict traffic to HTTPS by modifying the iOS transport security setting (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-ios-removing-nsallowsarbitraryloadsinwebcontent-from-info-plist/) and consider the `blockfaultyandselfsignedhttpscerts` option. Please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services to improve store approval readiness and long-term user retention. ### Option B) Use a local HTML folder for accessing your web application (= store files within the app) WebViewGold supports web apps based on local HTML folders, too: Set uselocalhtmlfolder to true (see next step) and copy your HTML/CSS/JavaScript files (including subdirectories) to the "local-www" folder in your Xcode project. To do this, make sure to: - Delete the default files in the "local-www" folder by selecting them in the Xcode file hierarchy, then right-click to press "Delete", then press "Move to Trash". - Select all the files for your local website, then drag and drop them into the Xcode file hierarchy under the "local-www" folder. Make sure "Create folder references" is checked and press "Finish".Please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services for best App Store approval results. Such a UX review also helps you to achieve better customer retention in general for your product with suggestions for improvement. ### Option C) Use an HTML folder if the user is offline, and use a remote URL if the user is online (= store files online + store backup/fallback files within the app) Copy your HTML/CSS/JavaScript files (including subdirectories) to the "local-www" folder in your Xcode project. To do this, make sure to: - Delete the default files in the "local-www" folder by selecting them in the Xcode file hierarchy, then right-click to press "Delete", then press "Move to Trash". - Select all the files for your local website, then drag and drop them into the Xcode file hierarchy under the "local-www" folder. Make sure "Create folder references" is checked and press "Finish". Set uselocalhtmlfolder to false (see next step) and set offlinelocalhtmlswitch to true (see next step). Please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services for best App Store approval results. Such a UX review also helps you to achieve better customer retention in general for your product with suggestions for improvement. ## Set Up & Configure WebViewGold for iOS (iOS) URL: https://www.webviewgold.com/docs/iOS/setup/ Summary: Download the WebViewGold Xcode template, insert your URL in Config.swift, and explore every built-in configuration option — no coding skills required. Download the WebViewGold app template for iOS here (https://www.webviewgold.com/download/ios). https://www.webviewgold.com/download/ios Want to avoid installing software? The WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=ios_docs) (paid add-on) lets you configure, build, and upload your app directly from your browser without opening Xcode. [Video: https://www.youtube-nocookie.com/embed/nzgCkydN9OM] After downloading the .zip file of WebViewGold from CodeCanyon, there are three setup options for Xcode. Which setup option should be taken is determined by the kind of Mac system you might (or might not) own: a) You use no Mac system: If you do not own a Mac for running the required Xcode app, check out MacInCloud (https://www.macincloud.com) as it allows you to rent a virtual Mac online (we are not affiliated with the provider of that service). Using that service, you can build your iOS apps based on WebViewGold, even without using a Mac. Additionally, the WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=ios_docs) (paid add-on) lets you configure, build, and upload your app directly from your browser without a Mac. OR b) You use a Mac system with an Intel chip (detect your chip type (https://www.howtogeek.com/706226/how-to-check-if-your-mac-is-using-an-intel-or-apple-silicon-processor/)): Download and install the Xcode app from the Mac App Store (https://apps.apple.com/de/app/xcode/id497799835?mt=12). OR c) You use a Mac system with an Apple Silicon chip (detect your chip type (https://www.howtogeek.com/706226/how-to-check-if-your-mac-is-using-an-intel-or-apple-silicon-processor/)): Download and install the Xcode app from the Mac App Store (https://apps.apple.com/de/app/xcode/id497799835?mt=12). Then follow these steps to run your app using Rosetta: (Rosetta is a software translation tool which makes the app compatible with the Apple Silicon chip) - If you are using Xcode 14.3 and above: - Make sure that you are using macOS Ventura or above. - Open Xcode. Then in the menu bar, go to Product > Destination > Destination Architectures and select "Show All Destinations". - This will allow you to run and test your app on Rosetta simulators that are compatible with the app. - If you are using older Xcode versions (14.2 and below): - If you are using macOS Ventura (or above), make sure to upgrade to Xcode 14.3 (or above), or your app will not work. - If you want to test your app on iOS 16.4 and above, make sure to upgrade to macOS Ventura (or above) and Xcode 14.3 (or above). - Search for the Xcode application in your Applications folder. - Select the Xcode icon, and then press Command (CMD) + I (or right-click/use the File menu and select Get Info). - In the newly opened window, check the “Open using Rosetta” checkbox and close the window. - This will ensure that Xcode always opens with Rosetta. That's it, Xcode is ready for WebViewGold! If you’re already running Xcode, please completely quit it (Command/CMD + Q). Then, please open WebViewGold.xcworkspace (instead of WebView.xcodeproj): Within Xcode (https://developer.apple.com/xcode/), open Config.swift and you will see a document like this: Here you can set up your app easily. Setting up apps with WebViewGold is very easy and does not require any coding knowledge. Please don't forget to add your Envato/CodeCanyon Purchase Code (https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-) in the purchasecode field for each app published by you. One license per each customized end product is required. License info of your CodeCanyon purchase: https://codecanyon.net/licenses/standard (https://codecanyon.net/licenses/standard?ref=onlineappcreator) Please take a look at this overview of all built-in configuration options: [Video: https://www.youtube-nocookie.com/embed/E4D-Q_FhEOM] purchasecode required value Enter your Envato/CodeCanyon Purchase Code for this app app_admin_email optional Email address to receive status updates (leave default to disable) host required value Your domain host (e.g., "example.org". By default, WebViewGold for iOS permits both HTTPS content and HTTP content. However, if you prefer to enhance app security by enabling only HTTPS content, there's an option to modify this setting (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-ios-removing-nsallowsarbitraryloadsinwebcontent-from-info-plist/) (and/or consider 'blockfaultyandselfsignedhttpscerts' option) webviewurl required value Your full WebView URL (e.g., "example.org/app.html") which should be loaded in the WebView. By default, WebViewGold for iOS permits both HTTPS content and HTTP content. However, if you prefer to enhance app security by enabling only HTTPS content, there's an option to modify this setting (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-ios-removing-nsallowsarbitraryloadsinwebcontent-from-info-plist/) (and/or consider 'blockfaultyandselfsignedhttpscerts' option) uselocalhtmlfolder true or false Set to true to use local "local-www/index.html" HTML file instead of remote WebView URL (make sure to not create or use subfolders within local-www) openallexternalurlsinsafaribydefault true or false Set to true to open all external hosts in Safari safariwhitelist List Add domains here that should always be opened in Safari, regardless of what the openallexternalurlsinsafaribydefault option is set to; to add another domain, insert another host like so: ["alwaysopeninsafari.com", "google.com", "m.facebook.com"] please enter the host exactly how you link to it (with or without www, but always without http/https) safariblacklist List Add domains here that should never be opened in Safari, regardless of what the openallexternalurlsinsafaribydefault option is set to; to add another domain, insert another host like so: ["alwaysopeninsafari.com", "google.com", "m.facebook.com"] please enter the host exactly how you link to it (with or without www, but always without http/https) openspecialurlsinnewtab true or false Set to true to open links with attributes (e.g., _blank) in a new in-app tab by default openspecialurlsinnewtablist List Add special URLs (e.g., _blank) here that should ALWAYS open in a new in-app tab enableBioMetricAuth true or false Set to true to enable our App Lock feature, which requires Face ID, Touch ID, or Code authentication for the app. This is an independent and additional option to our JavaScript-based Bio Auth API autoInjectVariable true or false Set to true to automatically load JavaScript variables (e.g., UUID, app version, OneSignal and Firebase subscription IDs, and App Store location) without needing to call specific URLs like get-uuid:// (this currently supports app version, OneSignal and Firebase subscription IDs, UUID, and App Store location) disablecallout true or false Set to true to remove WKWebView 3D touch Link Preview/callout window for links (recommended for most cases) deletecache true or false Set to true to clear the WebView cache & cookies on each app startup and do not use cached versions of your web app/website deletecacheonexit true or false Set to true to clear WebView cache & cookies upon full app exit (you might also want to activate deletecache, as iOS version differences could affect reliability) okbutton optional Set the text label of the "OK" buttons (translatable via alternatelanguage1/alternatelanguage2) cancelbutton optional Set the text label of the "Cancel" buttons (translatable via alternatelanguage1/alternatelanguage2) bigstatusbar true or false Set to true to enhance the Status Bar size hideverticalscrollbar true or false Set to true to hide the vertical scrollbar hidehorizontalscrollbar true or false Set to true to hide the horizontal scrollbar enableswipenavigation true or false Set to false to prevent swipe left/right from triggering backward/forward navigation orientationiphone "portrait", "landscape" or "auto" Set the orientation to either portrait, landscape, or auto on iPhone orientationipad "portrait", "landscape" or "auto" Set the orientation to either portrait, landscape, or auto on iPad preventsleep true or false Set to true to prevent the device from going into sleep while the app is active preventZoom true or false Set to true to disable user zoom by injecting code that prevents zooming on the website preventoverscroll true or false Set to true to remove WKWebView bounce animation (recommended for most cases). Set to false if using pull to refresh. enhanceUrlUUID true or false Set to true to add the UUID parameter 'uuid=XYZ' to the first URL request linkDragAndDrop true or false Set to false to disable link drag and drop useShortcuts true or false Set to true to register dynamic shortcuts defined in Shortcuts.json pulltorefresh true or false Set to true to enable pull to refresh in your app. Note that to enable this feature, preventoverscroll needs to be set to false. Additionally, you can always call `enablepulltorefresh://` or `disablepulltorefresh://` from your website to activate or deactivate pull-to-refresh dynamically. pulltorefresh_loadingsigncolour_lightmode Color Set the colour of the pull to refresh loading sign in light mode pulltorefresh_backgroundcolour_lightmode Color Set the colour of the pull to refresh background in light mode pulltorefresh_loadingsigncolour_darkmode Color Set the colour of the pull to refresh loading sign in dark mode; requires iOS 13 or higher pulltorefresh_backgroundcolour_darkmode Color Set the colour of the pull to refresh background in dark mode; requires iOS 13 or higher useragent_iphone optional Define a customized UserAgent on iPhone (or leave it empty to use the default iOS UserAgent) useragent_ipad optional Define a customized UserAgent on iPad (or leave it empty to use the default iOS UserAgent) google_login_helper_triggers optional Define the URL prefixes that load during Google login for your website; acts as a trigger for the helper; Example: ["https://accounts.google.com", "https://accounts.youtube.com"] facebook_login_helper_triggers optional Define the URL prefixes that load during Facebook login for your website; acts as a trigger for the helper; Example: ["https://www.facebook.com", "https://m.facebook.com"] activatefirstrundialog true or false Set to true to activate the "First run" dialog firstrunmessagetitle optional Set the title label of the "First run" dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) firstrunmessage optional Set the message of the "First run" dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) askforpushpermissionatfirstrun true or false Set to true to ask your users for push notifications permission at the first run of your application. Set it to "false" to never ask or to ask with a registerpush:// link/button/redirection in your web app later offlinetitle optional Set the title label of the Offline dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) offlinemsg optional Set the text of the Offline dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) screen1 optional Set the text label 1 of the Offline screen (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) screen2 optional Set the text label 2 of the Offline screen (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) offlinebuttontext optional Set the text label of the Try again button (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) offlinescreenautoretry true or false Set to true if app should automatically retry to connect every second (even without button tap) activateratemyappdialog true or false Set to true to activate the "Rate this app on App Store" dialog activatefacebookfriendsdialog true or false Set to true to activate the "Follow on Facebook" dialog becomefacebookfriendstitle optional Set the title label of the "Follow on Facebook" dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) becomefacebookfriendstext optional Set the text label of the "Follow on Facebook" dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) becomefacebookfriendsyes optional Set the text label of the "Yes" button of the "Follow on Facebook" dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) becomefacebookfriendsno optional Set the text label of the "No" button of the "Follow on Facebook" dialog (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) becomefacebookfriendsurl optional Set the URL of your Facebook/Instagram/YouTube/... page (e.g., "https://facebook.com/OnlineAppCreator/") imagedownloadedtitle optional Set the title label of the "Image saved to your photo gallery" dialog box (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) imagenotfound optional Set the title label of the "Image was not found" dialog box (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) transparentStatusBar true or false Set to true to make the status bar transparent, allowing web content to render behind it autoAdjustSafeAreaInsets true or false Set to false if your website already handles safe area insets (use with transparentStatusBar) statusBarBackgroundColor Color Define a custom status bar background color darkModeStatusBarBackgroundColor Color Define a custom status bar background color while user is using iOS Dark Mode statusBarTextColor white or black Define the text color of the status bar darkModeStatusBarTextColor white or black Define the text color of the status bar while user is using iOS Dark Mode showNavFooter true or false Set to true to enable the native navigation footer bar (configured via FooterBar.json) bottombar true or false Set to true to enable the bottombar to prevent the home bar (found in iOS devices with no home button, eg. iPhone X) from overlapping app content iPadBottombar true or false Set to true to ALSO enable the bottombar on iPads (which have bigger screens, so the home bar may not overlap content due to a different layout, hence the bottombar may not be needed) bottombarBackgroundColor Color Define a custom bottom bar background color darkmodeBottombarBackgroundColor Color Define a custom bottom bar background color while user is using iOS Dark Mode; requires iOS 13 or higher qrcodelinks 0 or 1 or 2 or 3 or 4 Set to (0) to open a scanned QR code URL in the app; (1) in an in-app tab; (2) in a new browser; (3) in an in-app tab if external; (4) in a new browser if external; moreover, you can optionally limit the allowed QR code scanner prefixes in the "allowedQRurls" array of the SwiftQRScanner.swift file ShowExternalLink optional Set to true open links sent through Universal Links API (syntax: https://example.org) and Deep Linking API (syntax: example://url?link=https://example.org). splashScreenEnabled optional Set to false if you want to disable the Splash Screen while the app launches and display the Loading Sign instead remainSplashOption optional Set to true if you want to display the Splash Screen until the initial loading of your homepage is complete (instead of the Loading Sign) splashTimeout number value (milliseconds) Set the splash screen timeout in milliseconds (the loading sign screen will show after this time duration if the home URL still has some loading to do) scaleSplashImage percentage value [0-100] Set the splash screen image size with respect to the device's smallest width/height; range in percentage [0-100]; value = 0 will hide the image completely, value = 100 will display the image in full-screen mode useLoadingSign true or false Set to false to hide the loading sign while loading your URL useLoadingProgressBar true or false Set to true to use the loading progress bar while loading your URL (instead of the loading sign) loadingIndicatorColor Color Set a color for the loading indicator alternativeAppIconNames List Edit this list to change the file names of your alternative app icons backgroundlocation true or false Set to true to allow background location access (additionally, ensure "Background Modes" capability in the Xcode project settings includes "Location updates". Additionally, depending on your web app, you may need to activate “Background Processing” (in this case, also add an array to your Info.plist file with the key “Permitted background task scheduler identifiers" – under this array, include a string with your app bundle ID, e.g., "com.onlineappcreator.webviewgold") appendlanguage true or false Set to true if you want to extend URL request by the system language like ?webview_language=LANGUAGE CODE (e.g., ?webview_language=EN for English users) blockfaultyandselfsignedhttpscerts true or false Set to true to block content signed with self-signed SSL (user) certificates & faulty SSL certificates; maybe also consider blocking all Non-HTTPS content (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-ios-removing-nsallowsarbitraryloadsinwebcontent-from-info-plist/) jailbreakBlock true or false Set to true to block the app on jailbroken/hacked devices. Note: Detection is not foolproof but employs multiple methods to identify jailbreaks and hacks autoRefreshEnabled true or false Set to true if you want the WebView to automatically refresh its contents when the app comes back to the foreground from the background. offlinelocalhtmlswitch true or false Set to true if you want to use the "local-html" folder if the user is offline, and use the remote URL if the user is online.. extentionARY List Add the file formats that should trigger the file downloader functionality (e.g., .pdf, .docx, ...) autodownloader true or false Set to true if you want to activate the downloader functionality based on Content-Disposition HTTP headers, regardless of the file formats listed in the extentionARY variable above splashscreencolor Color Set a background color for the splash screen extentionARY List Add the file formats that should trigger the file downloader functionality (e.g., .pdf, .docx, ...) offlinelocalhtmlswitch true or false Set to true if you want to use the "local-html" folder if the user is offline, and use the remote URL if the user is online. zipfiledownloadfromserver true or false Set to true to download a .zip archive from a remote URL that should be extracted and presented if the user is offline (also, please turn the variable turnofflinelocalhtmlswitch to true); the update will take place with every full restart of the app zipfileremoteurl URL The. zip archive from a remote URL that should be extracted and presented if the user is offline zipfilename file name The internal file name of the .zip file on the user device (recommended to not change) zipfileextractpath folder name The internal folder name of the extract path on the user device (recommended to not change) zipfileextractindexindex file name The file that should be opened first within the extracted .zip archive zipfilepopuptitle text The title of the popup that will be displayed while downloading the .zip file (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) zipfilepopupmessage text string The message of the popup that will be displayed while downloading the .zip file (if you like, you have the ability to translate this string into two additional languages using the 'alternatelanguage1' and 'alternatelanguage2' strings found at the end of Config.swift file) InAppPurchAppBundleIdentifier optional Set the Default App Identifier in order to activate In-App Purchase API for the default IAP product (details can be configured in App Store Connect) IAPSharedSecret optional Set the App Secret in order to activate In-App Purchase API (more information can be found here) iapsuccessurl optional Set the Default URL that should be opened after a successful In-App Purchase/In-App Subscription through the WebView wrapper. The URL could be "https://www.example.org/thanks.php," for example, and thanks.php could set the lifetime cookie for premium content. iapexpiredurl optional Set the Default URL that should be opened after an In-App Subscription through the WebView wrapper expired. The URL could be "https://www.example.org/expired.php," for example, and expired.php could remove the cookie for premium content revenueCatAPIKey optional Your RevenueCat API Key (sign up via tinyurl.com/register-revenuecat (https://tinyurl.com/register-revenuecat) first, then follow tinyurl.com/api-key-revenuecat (https://tinyurl.com/api-key-revenuecat) how to find it) revenueCatProjectID optional Your RevenueCat Project ID (sign up via tinyurl.com/register-revenuecat (https://tinyurl.com/register-revenuecat) first, then follow tinyurl.com/project-id-revenuecat (https://tinyurl.com/project-id-revenuecat) how to find it) oneSignalID optional Required for OneSignal push functionality kPushEnabled true or false Set to true to activate the OneSignal push functionality kPushEnhanceUrl true or false Set to true if you want to extend WebView Main URL requests by the OneSignal subscription ID in the ?onesignal_push_id=XYZ format (alternatively and additionally, you can always request the OneSignal subscription ID by calling getonesignalplayerid:// or even get it automatically if you turn "autoInjectVariable" to "true" in Config.swift) kPushReloadOnUserId true or false Set to true if WebView should be reloaded after receiving the UserID from OneSignal kPushOpenDeeplinkInBrowser true or false Set to true to open deeplinking URLs from OneSignal in the Safari browser instead of the main WebView; important: For sending notifications with a link from OneSignal, do NOT use 'Launch URL' instead, you must use an 'Additional Data Field', with key: url and value: the link you want to use kFirebasePushEnabled true or false Set to true to connect your app to the Firebase Push Services kFirebaseEnhanceUrl true or false Set to true if you want to extend WebView Main URL requests by ?firebase_push_id=XYZ (alternatively and additionally, you can always request the OneSignal subscription ID by calling getfirebaseplayerid:// or even get it automatically if you turn "autoInjectVariable" to "true" in Config.swift) firebaseTopic optional Set a Firebase Topic to subscribe to kPushwooshEnable optional Set to true to activate the Pushwoosh push functionality (set ID in Info.plist in Pushwoosh_APPID column) kPushwooshEnhanceUrl optional Set to true to true if you want to extend WebView Main URL requests by ?pushwoosh_id=XYZ showBannerAd true or false Set to true if you want to show AdMob banner ads (please also set AdMob IDs in Config.swift & Info.plist, see here) showFullScreenAd true or false Set to true if you want to show AdMob interstitial ads after X website clicks (please also set AdMob IDs in Config.swift & Info.plist, see here) showadAfterX optional Define number X to show an AdMob interstitial ads after each X (e.g., 10) website clicks or screen taps, depending on what incrementWithTaps is set to (please also set AdMob IDs in Config.swift & Info.plist, see here). incrementWithTaps true or false Sets to true if you want to show interstitial ads after X screen taps, or false after X website redirects. enableRewardedAds true or false Set to true to enable AdMob rewarded ads. Required to be true even for manual activation of ads. useRewardedAdsWherePossible true or false Set to true to display Admob rewarded ads instead of admob interstitial ads, i.e after x taps etc. Keep as false if their activation should be handled via your website's code. Requires showFullScreenAd to also be set to true in order to overwrite them admobadstriggerurls optional Add page trigger words here, presence in a URL triggers AdMob interstitial ads (e.g., ["see-highscore.php", "/thank-you/", "/next-step.html"]) useFacebookAds true or false Set to true to activate Facebook Interstitial Ads facebookAdsID optional Enter your Placement ID, available when you create a property on Facebook Monetization manager, and connect an iOS app. The ID will look like this: 3937960198956424_3969441893142587 useTimedAds true or false Use timed ads for Facebook Ads (e.g., every 60s) as opposed to ads every X clicks fbadstriggerurls optional Add page trigger words here, presence in a URL triggers a Facebook ad (e.g., ["see-highscore.php", "/thank-you/", "/next-step.html"]) showFBAdsEveryNSeconds optional Show a Facebook Interstitial Ad every X seconds; 120s and above is recommended ATTDeniedShowAds true or false Set to false to stop showing ads entirely if the user denies the AppTrackingTransparency (ATT) permission useAdsenseAds true or false Set to true to enable support for AdSense web ads (independent of AdMob ads) askForAdConsent true or false Set to false if you want to deactivate Google consent management for AdMob (check https://support.google.com/admob/answer/13554116 upfront) showBarcodeScanner true or false Set to false to block website requests to turn on the Barcode Scanner using `barcodescanner://` kFlashLightEnabled true or false Set to false to block website requests to turn on the flashlight using `enableflashlight://` widgetRefreshTime Number Refresh interval for the widget in minutes widgetfallbackURL String Fallback image URL used by the widget preventScreenCapture true or false Set to true to call onScreenCaptureAttempt in your web app on screenshots or screen recordings siriEnabled Plugin Token Enter token to enable Siri plugin functionality NFCEnabled Plugin Token Enter token to enable NFC plugin functionality HealthKitEnabled Plugin Token Enter token to enable HealthKit plugin functionality alternatelanguage1_langcode (& _alternatelanguage1_ string list) true or false (& string list) Set language code or leave this string empty to not use alternate language #1 strings (string list at the bottom of Config.swift file); if you want to activate this alternate language, please use the two-letter code that adheres to the ISO 639-1 language code standard (e.g., "de" for German, "fr" for French, "it" for Italian, "pt" for Portuguese, "ca" for Catalan, "es" for Spanish, …) alternatelanguage2_langcode (& _alternatelanguage2_ string list) true or false (& string list) Set language code or leave this string empty to not use alternate language #2 strings (string list at the bottom of Config.swift file); if you want to activate this alternate language, please use the two-letter code that adheres to the ISO 639-1 language code standard (e.g., "de" for German, "fr" for French, "it" for Italian, "pt" for Portuguese, "ca" for Catalan, "es" for Spanish, …) ## App Name, Icon & Splash Screen (iOS) URL: https://www.webviewgold.com/docs/iOS/app-name-icon-splash/ Summary: Rename your iOS app, add a custom app icon, and set up personalized splash screen graphics for your WebViewGold app. ### Changing the Displayed App Name: Navigate as shown in the screenshot via WebViewGold → WebViewGold → Build Settings to Product Name and change the name as shown in the screenshot below: - NOTE: If your app name contains accent letters (like 'à', for example), you will need to replace them with normal letters for the Product Name. The Product Name is also used for naming files in your app, so it does not support accent letters (the app will crash). Then, to ensure that your app displays the correct name to users on the iOS homescreen, please also change the Bundle Display Name (located in the Info.plist file) from "$PRODUCT_NAME" to your app name with accent letters. For example, if your app name is "WebViewGold", the Product Name should be "WebViewGolda" and the Bundle Display Name should be "WebViewGold". ### Adding a Custom App Icon: Follow these easy steps to add a custom app icon to your WebView-based iOS app: 1. Locate App Icon Settings Navigate to WebViewGold → WebViewGold → General → App Icons and Launch Screen → App Icon Source. 2. Replace with Your Icon Just replace the included image files with your own resized image files. There are free tools online to help generate these different image sizes like App Icon Generator (https://www.appicon.co/), for example (we are not affiliated with the developer company). Alternatively, you can search for any "iOS App Icon Generator" tool you like. ### Adding a Custom Splash Screen: Follow these steps to add custom splash screen graphics to your WebView-based iOS app: 1. Enable the Splash Screen To activate the splash screen for your app: - Open the Config.swift file and search for `splashScreenEnabled`. - Make sure this variable is set to `true`. 2. Replace the Splash Screen Image To use your own branding as the splash screen: - Replace the existing splash.gif file in the main folder of the XCode project with your own GIF file. - Important: Ensure your image file is square (width = height) for optimal display. For example: - 128x128 px - 512x512 px - 1024x1024 px 3. Adjust the Display Timeout To control how long the splash screen appears: - Open the Config.swift file and search for `splashTimeout`. - Modify the timeout setting to your desired duration (in milliseconds). Example: Set to `2000` for a 2-second display. Set the `remainSplashOption` option (can be found in Config.swift file) to `true` if you want to display the Splash Screen until your page was loaded successfully. Otherwise, it will be displayed for a short time only, and the native iOS loading indicator will begin. Use the `splashscreencolor` option (can be found in Config.swift file) to modify the background color of the splash screen. Color options can be found here (https://developer.apple.com/documentation/uikit/uicolor/standard_colors). 4. Optional App Disclosure for your Privacy Policy / Terms & Conditions If you offer (WebViewGold-based) mobile apps to your users, you may optionally include the following statement in your Privacy Policy or Terms & Conditions (this note is provided for informational purposes only and does not constitute legal advice. We assume no liability for how this text is used. Please consult a legal professional for individual guidance): ``` Our mobile apps (iOS/Android) are developed using WebViewGold by jocapps GmbH (Germany). These apps display the content of our website using a WebView framework and enrich it with selected native features to improve usability and performance. Accordingly, the same privacy policy and terms of service that apply to our website also apply to our mobile apps. For more information, please visit https://www.webviewgold.com/#convert-website-to-app-privacy, or contact us directly. ``` ## Modify the Safe Area Size (iOS) URL: https://www.webviewgold.com/docs/iOS/safe-area/ Summary: Adjust the safe area and enable the custom bottom bar so your web app looks perfect on iPhones with a Home bar. The jump from iPhone 8 to iPhone X and beyond changed a lot in terms of User Interface in the mobile industry by removing the Home button and introducing the Home bar. Depending on your web app design, the lower menu bar may be positioned incorrectly on devices (overlapping content) with the Home bar due to the change in the default safe area. The good news is that WebViewGold has a feature that allows you to turn on a bottombar and choose its color to match your app theme. Since the issue of the Home bar overlapping app content may not appear in iPads (due to the larger screen and possible different layout), there is also an option to disable the feature in iPads. To implement this feature, use the following variables in Config.swift under the heading "Custom Bottom Bar Design". Make sure to set bottombar to true. Advanced: Instead of using the bottombar feature, you can search for this code snippet part (Press CMD+F then enter "`switch UIDevice.current.userInterfaceIdiom`") in the WebViewController.swift file where you can change the border value 20 to any desired value like 10, 30, etc as shown below: ## HTML5 Geolocation API (iOS) URL: https://www.webviewgold.com/docs/iOS/geolocation/ Summary: Enable HTML5 geolocation in your iOS WebView app and request precise location permissions the right way. The HTML5 Geolocation API enables users to share their location with your app, enhancing features like location-based content. In WebViewGold, the Geolocation API is supported by default once integrated into your web content. Here is how to implement Geolocation tracking into your WebView-based iOS app: Setting up HTML5 Geolocation: For basic Geolocation setup, refer to Mozilla's Geolocation Guide for details on how to implement this feature into your website or web app. For a demonstration, visit this W3Schools Geolocation Demo (https://www.w3schools.com/html/html5_geolocation.asp). Since iOS 10, Geolocation is available for https-sites only, so please make sure to use a web app URL starting with `https://` instead of `http://` when using location requests. ## Push Notifications API (OneSignal, Firebase, Pushwoosh) (iOS) URL: https://www.webviewgold.com/docs/iOS/push-notifications/ Summary: Send push notifications to your iOS app users with OneSignal, Firebase, or Pushwoosh — setup, deep links, and per-user targeting explained. Push notifications are notifications that appear on your smartphone without opening the app. These types of messages allow fantastic interaction with customers and users of the app. Your app does not have to be open to receiving these kinds of notifications. This way, your customers do not miss any important news or messages. Push Notifications are suitable for many cases, e.g., for updates to orders, live tickers, or social media community. There must be an internet connection to allow app users to receive push messages. WebViewGold supports multiple ways of reaching your users via push notifications. If you do NOT want to use push notifications at all, open Config.swift and set askforpushpermissionatfirstrun to false in order to prevent asking the app user for notification permission. ### Option 1: Use Local Push Notification JavaScript API You can insert a piece of code (JavaScript) in your website, to define a push notification, which can be shown after your app was closed (while scheduling it during the app is open). This works without OneSignal configuration at all. ``` var title = "Your cart is waiting!"; //notification title var message = "You have left a cart full of dreams and deals behind. Dont leave it feeling abandoned"; //notification message var seconds = 120; //seconds from now on var url = "https://myshop.org/cart.php"; //deep-linking URL window.location.href = "sendlocalpushmsg://push.send?s="+ seconds +"=msg!"+ message +"&!#"+ title +"&!#"+ url +""; ``` It could be used for different situations (countdowns, happy hours, specific reminders, ...). To cancel all scheduled local push notifications run: ``` window.location.href = "sendlocalpushmsg://push.send.cancel"; ``` ### Option 2: Use Pushwoosh Remote Push Notifications WebViewGold users are eligible for two free months of Pushwoosh! To claim this offer, please email your WebViewGold License to pushwoosh-love@webviewgold.com and you will get a personal reply soon. If you want to use Pushwoosh (https://www.pushwoosh.com) (good choice!) for push notifications in your app, just activate the options in Config.swift by setting kPushwooshEnable to true and ensure to also update the Pushwoosh_APPID in the Info.plist file with your own Pushwoosh Application ID. Make sure to also complete Pushwoosh setup on their website (https://www.pushwoosh.com) including certificate import. Congratulations, your setup is already completed. You're now ready to send push notifications: https://www.pushwoosh.com Want to get each individual user's device ID for personalized push notifications or further processing? Simply set kPushwooshEnhanceUrl to true in Config.swift to append ?pushwoosh_id=XYZ to your WebView URL: For example, if your WebView URL is https://www.example.org, WebViewGold will call https://www.example.org?pushwoosh_id=XYZ instead. Remember, only the initial URL request will receive this GET variable, so please save it in a session or a cookie for later use within your linked pages. Alternatively or additionally, you can retrieve & process this information on any page using JavaScript: ``` window.location.href = "getpushwooshid://"; alert(pushwooshplayerid); ``` ### Option 3: Use OneSignal Remote Push Notifications If you want to use OneSignal (https://www.onesignal.com) in your app, activate these options in Config.swift (by switching the values from false to true) and make sure to also replace the placeholder oneSignalID with your own. Now Generate (https://documentation.onesignal.com/docs/generate-an-ios-push-certificate) an iOS Push Certificate and import it: https://documentation.onesignal.com/docs/generate-an-ios-push-certificate Yay, you are done. You can send push notifications now: https://www.onesignal.com If you want to use OneSignal URL Deeplinking (opens a specific URL when clicking on your notification), please add the desired URL with a custom field called url: On the OneSignal.com Backend, you can fill in this key-value-pair window after clicking on "Advanced settings". Using the OneSignal API, you can add the "url" field to the API request (https://documentation.onesignal.com/docs/onesignal-api). Do you want to get each individual subscription ID on your server for further processing and individual user push messages? Just activate the kPushEnhanceUrl option in Config.swift (by switching the value from false to true) in order to append ?onesignal_push_id=XYZ to your WebView URL. If your WebView URL is https://www.example.org, WebViewGold will call https://www.example.org?onesignal_push_id=XYZ instead. Only the first URL request will get that GET variable, so please save it in a session or in a cookie to access it on your linked pages. An alternative or additional way would be to retrieve & process the information on any page via JavaScript: ``` window.location.href = "getonesignalplayerid://"; alert(onesignalplayerid); ``` Alternatively, consider turning `autoInjectVariable` to `true` in Config.swift to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. ### Option 4: Use Firebase Remote Push Notifications Step 1: Create a Firebase Project Begin by creating a Firebase project in your Firebase Console (https://console.firebase.google.com/). This is a prerequisite for integrating Firebase with your WebViewGold app. Step 2: Register Your App with Firebase Once your Firebase project is ready, you can add your WebViewGold app to it by following these steps: a. Navigate to the project overview page in your Firebase console, then select the iOS icon to start the app registration process. b. To add a new app to your project, click Add app and select the platform options. When prompted, enter your app's bundle ID into the iOS bundle ID field. This ID is crucial and can be found by: - Opening your app project in Xcode. - Selecting the project name at the top of the navigator to access the General tab. - Your app's bundle ID is listed under the Bundle Identifier field (e.g., com.onlineappcreator.webviewgold). Ensure you input the exact bundle ID used by your app. This value is permanent once your app is registered with Firebase. c. Complete the setup by providing the required app information, including: - App Nickname: A convenience identifier for your reference in the Firebase console. - App Store ID: Necessary for Firebase Dynamic Links and Google Analytics integration. You can add this later if your app doesn't have one yet. Step 3: Register Your App Click Register app to complete the registration process. Step 4: Download GoogleService-Info.plist Download this configuration file and replace the placeholder in your WebViewGold project with the downloaded GoogleService-Info.plist file. Step 5: Activate Firebase in WebViewGold In the Config.swift file, set the kFirebasePushEnabled variable to true to enable Firebase functionalities. Step 6: Set Up APN and Sign Your App Generate an APN key for Firebase, upload it, and then sign your app using the Firebase provisioning profile. For a detailed guide, visit Firebase documentation on iOS certificates (https://firebase.google.com/docs/cloud-messaging/ios/certs). Step 7: Implement URL Deeplinking (Optional) For Firebase URL Deeplinking support, add the target URL in a Custom Data field under Additional options (optional), with Key = "url" and Value = {desired URL}. To subscribe to a Firebase topic, set firebaseTopic in Config.swift to the name of the topic you would like. Do you want to get each individual subscription ID on your server for further processing and individual user push messages? Just activate the kFirebaseEnhanceUrl option in Config.swift (by switching the value from false to true) in order to append ?firebase_push_id=XYZ to your WebView URL. If your WebView URL is https://www.example.org, WebViewGold will call https://www.example.org?firebase_push_id=XYZ instead. Only your FIRST URL request will get that GET variable, so save it in a session or in a cookie to access it on your linked pages. An alternative or additional way would be to retrieve & process the information on any page via JavaScript: ``` window.location.href = "getfirebaseplayerid://"; alert(firebaseplayerid); ``` Alternatively, consider turning `autoInjectVariable` to `true` in Config.swift to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. ### Option 5: Use bubble.io Push Notifications [Video: https://www.youtube-nocookie.com/embed/C0HBXlMSK2E] 1. Create a bubble.io app 2. Install the WebViewGold OneSignal Push (https://bubble.io/plugin/webviewgold-onesignal-push-1602240916803x713805488222896100) plugin: https://bubble.io/plugin/webviewgold-onesignal-push-1602240916803x713805488222896100 3. Follow the OneSignal instructions (see above) and the plugin instructions (see here (https://bubble.io/plugin/webviewgold-onesignal-push-1602240916803x713805488222896100) and here (https://www.youtube.com/watch?v=C0HBXlMSK2E)). ## AdMob Ads API (iOS) URL: https://www.webviewgold.com/docs/iOS/admob/ Summary: Monetize your iOS app with Google AdMob banner, interstitial, and rewarded ads — configuration and JavaScript triggers. AdMob is a Google service for monetizing mobile apps on iOS and Android platforms. It allows developers to integrate banner, interstitial, and rewarded ads, which are paid by clicks (CPC, Cost-per-Click) or impressions (CPM, Cost-per-Mille). WebViewGold simplifies AdMob integration, enabling quick setup for displaying ads in your WebView-based iOS application. [Video: https://www.youtube-nocookie.com/embed/7j7NW5CTwqo] Step 1: Open Info.plist file and set your AdMob global account ID in the GADApplicationIdentifier field: Step 2: Please insert your AdMob IDs in the Config.swift for `AdmobBannerID` and `AdmobinterstitialID`: Step 3: Within Config.swift you can: - Enable or disable banner and/or interstitial ads by setting `showBannerAd` to `true` for banner ads and `showFullScreenAd` to `true` for interstitial ads. - Define intervals for displaying interstitial ads by changing `showadAfterX` to the desired number of website interactions before playing an interstitial ad. To enable rewarded ads (only available for iOS versions greater than 13.0): Set `enableRewardedAds` to `true`. To play a rewarded ad, use a call to our rewarded ad API functionality. ``` ## Facebook Audience Network Ads API (iOS) URL: https://www.webviewgold.com/docs/iOS/facebook-ads/ Summary: Show Facebook Audience Network banner and interstitial ads in your WebViewGold iOS app. The Facebook Audience Network (https://www.facebook.com/audiencenetwork/) allows mobile app developers to monetize iOS and Android applications by displaying ads. Through WebViewGold, you can easily incorporate Facebook ads into your WebView-based iOS applications to earn revenue through clicks (CPC) and impressions (CPM). Step 1: Create a Facebook Audience Network Account You must create a Facebook Audience Network (https://www.facebook.com/audiencenetwork/) account and create a property under integration in the Monetization Manager. Then you must connect an iOS app (however, you do not need to link to a published iOS app for testing purposes). Follow this guide for reference: https://www.facebook.com/business/help/191133327919314 Step 2: Set the Necessary Configuration Variables - Open Config.swift and set `useFacebookAds` to `true`. - Enter your Facebook Placement ID at `facebookAdsID`. Step 3: Configure Ad Settings - To use timed ads, set `useTimedAds` to `true` and set `showFBAdsEveryNSeconds` to the desired time between ads. - You can add URL trigger words to `fbadstriggerurls` to initialize ads on command. Further considerations: - A real iOS device must be used to test (not a simulator) - The device must be added as a test device, see https://developers.facebook.com/docs/audience-network/setting-up/testing/platform - Facebook must be installed and logged in on the device - “Limit Ad Tracking” or any similar setting that may be released with upcoming iOS versions must be disabled. ## HTML Background Audio API (iOS) URL: https://www.webviewgold.com/docs/iOS/html-audio/ Summary: Keep HTML audio playing in the background of your iOS WebView app — even when the screen is locked. For some scenarios, it may be useful to play audio content even after minimizing the app (for example, if you're making a radio stream or your music available in the app). Our video below shows how to quickly and easily activate HTML background audio for your iOS application, allowing users to play audio even when they switch to a different foreground app or when they lock their iPhone or iPad. [Video: https://www.youtube-nocookie.com/embed/WuuviMKIVYQ] ## File Downloader API (iOS) URL: https://www.webviewgold.com/docs/iOS/file-downloader/ Summary: Let users download images, PDFs, and other files from your web app straight to their iPhone or iPad. WebViewGold’s Download API allows you to provide document, image, and audio file downloads within your WebView app. The following steps outline how to enable and customize the downloader functionality: 1. Downloading Images: Save images to the camera roll of the user by calling links with savethisimage://?url= prefix: ``` Download Image ``` 2. Downloading Files: Save files by calling links with a relevant suffix (e.g., .mp3): ``` Link PDF (https://www.example.org/file.pdf) Link mp3 Music (https://www.example.org/file.mp3) Link mp4 Music (https://www.example.org/file.mp4) Link wav Music (https://www.example.org/file.wav) Link epub eBook (https://www.example.org/file.epub) Link Passbook / Apple Wallet (https://www.example.org/file.pkpass) Link Word (https://www.example.org/file.docx) Link PowerPoint (https://www.example.org/file.pptx) Link Excel (https://www.example.org/file.xlsx) ``` 3. Customizing Supported File Types: You can add more filetypes that should trigger the file downloader functionality (e.g., .epub, .zip, ...) This can be done via the list variable `extentionARY` that can be found in the Config.swift file. 4. Enabling Automatic File Downloads: Consider setting the `autodownloader` option in Config.swift to enable automatic downloads for files flagged with Content-Disposition HTTP headers, independent of the `extentionARY` list. This ensures files are downloaded automatically based on server configurations. [Video: https://www.youtube-nocookie.com/embed/V0LnwnzJx6I] ## iCal Calendar API (iOS) URL: https://www.webviewgold.com/docs/iOS/ical-calendar/ Summary: Add calendar events from your web app to the native iOS calendar using the iCal Calendar API. WebViewGold is set up for easy Calendar (previously known as iCal) integration. To add a calendar entry from your WebView-based iOS application, simply link to an .ics file: ``` Save to Calendar (https://www.webviewgold.com/demo/test.ics) ``` ## UUID API (iOS) URL: https://www.webviewgold.com/docs/iOS/uuid/ Summary: Identify app installations with a unique UUID appended to your WebView URL or retrieved via JavaScript. The WebViewGold UUID API allows you to retrieve a non-personal, unique device ID (UUID - "Universally Unique Identifier"), which can uniquely identify an iOS device. This feature can be helpful for: - Storing user-specific settings on the server - Maintaining session states - Recalling saved data on the client side Privacy Note: Ensure compliance with local and international privacy laws when using this feature, as it involves device identification. How to Retrieve UUID: To retrieve the UUID from your WebView-based app, use the following code: ``` Get UUID Show UUID ``` - Get UUID: Requests the UUID from WebViewGold. - Show UUID: Displays the UUID via an alert for easy testing. Alternative Method: Append the UUID to the WebView URL If you prefer to include the UUID in the URL parameters, enable the `enhanceUrlUUID` option in Config.swift by setting it to `true`. This will automatically append `uuid=XYZ` to your WebView URL on the first request, allowing you to access the UUID directly in your web content: - Example: If your WebView URL is `https://www.example.org`, it will be requested as `https://www.example.org?uuid=XYZ`. - Note: Only the initial URL request will include this GET parameter, so consider saving it in a session or cookie if you need to reference it later in the app. Automatically Inject UUID into JavaScript: To automatically make UUID (and other variables) available in JavaScript across all pages without modifying URLs, set `autoInjectVariable` to `true` in Config.swift. This allows you to access the UUID and other values directly within any page. ## Flashlight API (iOS) URL: https://www.webviewgold.com/docs/iOS/flashlight/ Summary: Control the device flashlight from your web app with simple JavaScript links in WebViewGold for iOS. The Flashlight API of WebViewGold allows your website to control the device's flashlight (torch). This feature can be useful for: - Building utility apps that require the flashlight toggle - Upgrading user experience during app usage with gamification - Providing additional accessibility features How to Use: You can trigger the flashlight on or off directly from your HTML content using the following links: ``` Turn On Flashlight Turn Off Flashlight ``` Note: Make sure your app has the required camera permissions in Info.plist, as the flashlight functionality is tied to the device's camera hardware. ## Reset App API (iOS) URL: https://www.webviewgold.com/docs/iOS/reset-app/ Summary: Reset cache, cookies, and local storage of your iOS WebView app with a single link or JavaScript call. In certain cases, resetting the app to its initial settings (by clearing cookies and cache) can be necessary to restore optimal performance. The Reset App API provides a straightforward way to initiate this reset. Usage: To reset the app data, simply use the following link within your app: ``` Reset App Link ``` This link will: - Clear all cookies - Clear cached data Testing the Reset Functionality: To test this feature, add the following demo URL to your WebViewGold app: https://www.onlineappcreator.com/reset_test.html Note: Use the reset functionality sensibly, as it will clear user data related to cookies and cache, which could impact saved settings or session data, including logging users out of active sessions. ## User Tracking Decision API (iOS) URL: https://www.webviewgold.com/docs/iOS/user-tracking/ Summary: Respect App Tracking Transparency: read and react to the user's tracking decision inside your WebViewGold iOS app. In iOS, apps have to ask to track user data based on the Apple AppTrackingTransparency framework. WebViewGold allows you to see what choice the user made when they installed your app to act accordingly in your web app. The JavaScript variable trackingDisabled can be either set by WebViewGold to true to represent that tracking has been blocked or false if it hasn't been. On your web app, you can easily check the JavaScript status by first getting the JavaScript variable and then alerting it: ``` Set JavaScript variable Show tracking decision ``` ## Loading Sign API (iOS) URL: https://www.webviewgold.com/docs/iOS/loading-sign/ Summary: Show or hide the native loading indicator on demand and customize the loading experience of your iOS app. WebViewGold’s native iOS loading indicator automatically appears when pages start or finish loading. However, you can also manually control the loading indicator for scenarios outside standard page loading events. This is particularly useful for processes where user awareness of loading is necessary, such as: - Waiting in a live chat queue - Running a background process on a cloud server - Visualizing any other extended process for user awareness Usage: To manually control the loading indicator for your WebView app, use the following links: ``` Show the loading spinner Hide the loading spinner ``` ## URL Handling API (iOS) URL: https://www.webviewgold.com/docs/iOS/url-handling/ Summary: Decide which links open inside your app, in an in-app browser tab, or in Safari — full URL handling control for iOS. To improve user experience, it's often beneficial to customize how your app handles different types of web links. For example, social media buttons can be configured to open in the system browser or respective app, rather than within your app. WebViewGold provides flexible settings to customize URL handling for your WebView-based iOS app. Types of Links: - External Links: Links that lead to a different domain from your app's primary domain. - Example: If your app's domain is mydomain.com, an external link would be google.com. - Internal Links: Links that stay within the same domain as your app. - Example: If your app's domain is mydomain.com, an internal link would be mydomain.com/purchase. - Special Links: Links that include special attributes, such as target="_blank". To configure the URL Handling API, open Config.swift: - To open all external links in Safari: - Set `openallexternalurlsinsafaribydefault` to `true`. - To set domains which always open in Safari (regardless of `openallexternalurlsinsafaribydefault` setting): - Add the desired domains to the `safariwhitelist` list. - Insert another host like so: ["alwaysopeninsafari.com", "google.com", "m.facebook.com"]. - Please enter the host exactly how you link to it (with or without www, but always without http/https). - To set domains which never open in Safari (regardless of `openallexternalurlsinsafaribydefault` setting): - Add the desired domains to the `safariblacklist` list. - Insert another host like so: ["alwaysopeninsafari.com", "google.com", "m.facebook.com"]. - Please enter the host exactly how you link to it (with or without www, but always without http/https). ### Open links in a tab/additional In-App-Browser Some links, like a Terms and Conditions page, may not be significant enough to open in an external system browser yet too specific for your app's primary WebView. WebViewGold provides a creative solution for handling these links: an in-app browser tab that opens over the main WebView, providing a hybrid app and browser experience. Here's what it will look like: Key Features of the In-App Browser Tab: - The in-app browser tab includes an address bar and navigation buttons, offering a more browser-like experience than the primary WebView. - Ideal for content that requires easy navigation, such as tutorials, knowledge bases, or pages with specific information. How to Use the In-App Browser Tab in Your WebView-Based iOS App: To open a link in the in-app browser tab, set `openspecialurlsinnewtab` to `true` format the URL in your HTML as follows: ``` Open link in an in-app tab (https://www.example.com) ``` Simply, a special link is classified as a link that has the "_blank" target attached. In a normal browser, this would make the link open in a new tab. In WebViewGold app, you can make it open in the in-app tab instead. Please note that if the link you are using is external (has a different domain to your website like "www.google.com", for example) please also make sure that `openallexternalurlsinsafaribydefault` is set to `false` as it will override the special-external link to open in the Safari app instead. Testing Link Behavior: To see how your app will handle different types of links, use the following URL as the WebView URL during testing: Test Link: https://www.webviewgold.com/demo/testlinks.php Note: You can also open the same domain in your desktop browser to view the source code and copy the format for your links. ## Custom CSS and JavaScript API (iOS) URL: https://www.webviewgold.com/docs/iOS/custom-css-js/ Summary: Inject custom CSS styles and JavaScript code into any page of your iOS WebView app — perfect for app-only tweaks. WebViewGold allows you to customize your app’s appearance and functionality using Custom CSS and Custom JavaScript without modifying the app’s native code. Here’s how to use these features to tailor your app to your brand and user experience preferences. How to Style your WebView-based iOS app with Custom CSS: The Custom CSS feature enables you to adjust the look and feel of your app effortlessly: - Add your custom CSS code to the custom.css file. - Save the file to apply these styles across all web pages loaded by your WebViewGold app. Examples of Customization with CSS: - Update colors to match your branding. - Incorporate animations. - Style text, buttons, and other elements. How to Enhance your App's Behavior with Custom JavaScript: With Custom JavaScript, you can personalize your app’s functionality for users without altering the original web app’s remote code: - Add your custom JavaScript code to the custom.js file. - Save the file to apply these scripts across all pages loaded by your app. Examples of Customization with JavaScript - Create alerts or notifications. - Add interactive elements or event-driven actions. - Tailor user interactions and page behavior. ## Universal Links API (iOS) URL: https://www.webviewgold.com/docs/iOS/universal-links/ Summary: Open links to your domain directly in your iOS app with Apple Universal Links — setup, AASA file, and troubleshooting. The Universal Links API simplifies linking to content within your app, providing a more seamless and native user experience. WebViewGold enables you to configure your domain so that links from apps like Mail, Safari, and others automatically open within your WebViewGold-based app—without requiring additional prompts. Note: the app must be installed on the user's device first for this feature to work. Alternatively, it is possible to use our Deep Linking API. While it operates in a similar manner, it uses a different syntax. However, it's worth noting that the syntax of the Universal Links API is more common than the syntax of the Deep Linking API. For most apps, it's wise to choose either one, but not both. To set up Universal Links in your iOS app, please follow the steps below: - Apple Developer Center Setup: - Log in to your account on the Apple Developer Center (https://developer.apple.com/account/). - Click on 'Certificates, Identifiers & Profiles'. - Under 'Identifiers', select 'App IDs' and then choose your app's ID from the list. - Under the 'App Services' section, check the 'Associated Domains' option and save your changes. - Xcode Setup: - Open your app project in Xcode. - Select the target (in most cases "WebViewGold"). In the 'Signing & Capabilities' tab, navigate to the 'Associated Domains' section. Click on '+' to add a domain. Your domain should be prefixed with 'applinks:', like this: `applinks:example.org` & `applinks:www.example.org`: - In Config.swift, turn ShowExternalLink to true. - Be mindful of subdomains. There's a distinction between "www.*" and non-"www" domains (consider adding both). Ensure that you have the correct provisioning profile with the 'Associated Domains' capability. If not, Xcode should prompt you to fix it. - Server Setup: - On your website server, you need to host an Apple App Site Association (AASA) file at the root level of your server or using the `/.well-known/` prefix. E.g., `https://example.org/.well-known/apple-app-site-association` - The AASA file should contain details about the app and the associated domains. Refer to the official documentation (https://developer.apple.com/documentation/safariservices/supporting_associated_domains) for the exact structure. Ensure that the apple-app-site-association file is hosted on a server that supports HTTPS, not just HTTP. Done! :-) Testing in the Simulator isn't as effective as on a real device. For best results, use an actual iPhone or iPad. ## Deep Linking API (iOS) URL: https://www.webviewgold.com/docs/iOS/deep-linking/ Summary: Launch your iOS app via custom URL schemes and deep link users to specific pages of your web app. The Deep Linking API makes it easy to direct users to specific content inside your app. WebViewGold allows you to configure a Custom URL Scheme (e.g., `webviewgold://`) that can be triggered from apps like Mail, Safari, and others to open links directly in your WebView app. Note: the app needs to be installed first for this feature to work. Alternatively, it is possible to use our Universal Links API. While it operates in a similar manner, it uses a different syntax which is more common than the syntax of the Deep Linking API. For most apps, it's wise to choose either one, but not both. To set up Deep Linking in your iOS app, please follow the steps below: - Open Config.swift: - Set `ShowExternalLink` to `true`. - Open Info.plist: - Change the URL Scheme to your own app name (e.g., `your-app-name://` instead of `webviewgold://`). Done! :) The example below would open google.com in the WebView app: ``` WebViewGold://url?link=https://www.google.com ``` [Video: https://www.youtube-nocookie.com/embed/mW4H_gUKU28] ## App Sharing Dialog API (iOS) URL: https://www.webviewgold.com/docs/iOS/app-sharing-dialog/ Summary: Trigger the native iOS share sheet from your web app to let users share your app or any URL. The App Sharing Dialog API in WebViewGold enables your users to share content from your app, such as the download link or custom messages, with friends and family via their preferred apps (e.g., WhatsApp, SMS, Email). This can be an effective way to increase your app’s visibility and grow your user base. How to Use the App Sharing Dialog in Your WebView-Based iOS App You can trigger a native sharing dialog by using the `shareapp://` URL scheme with customizable message and URL parameters. Below are examples of the different ways to implement this feature: ``` Share (message, link)Share (no message, link)Share (message, no link) ``` ## In-App Purchases API (iOS) URL: https://www.webviewgold.com/docs/iOS/in-app-purchases/ Summary: Sell digital goods and subscriptions in your iOS WebView app with StoreKit-powered In-App Purchases. Within some apps, you can buy additional content or services. These kinds of purchases are called "in-app purchases". They can be an attractive source of revenue for developers and are very convenient for customers as they use existing accounts and payment sources for settlement. WebViewGold allows triggering App Store In-App Purchases. Make sure to own an Extended License of WebViewGold if you plan to use this feature in an end product. Need to upgrade? Learn how to upgrade here (https://help.market.envato.com/hc/en-us/articles/115005593503-If-I-choose-the-wrong-license-or-need-to-upgrade-my-license-how-easy-is-it-to-change-to-the-correct-license). Option 1 (Default): RevenueCat Create your free RevenueCat account (https://tinyurl.com/register-revenuecat) to get started. Pricing information is available on their website. Then set up RevenueCat by following their setup wizards and documentation (pricing details are available on their website (https://tinyurl.com/register-revenuecat)). Afterwards, add your details to Config.swift. This approach also supports the 15% Service Fee Tier Program (https://support.google.com/googleplay/android-developer/answer/112622?hl=en) of the Google Play Store and Apple's Small Business Program (https://developer.apple.com/app-store/small-business-program/). If you participate in these reduced-fee programs, inform RevenueCat via their Apple Small Business Program (https://www.revenuecat.com/docs/platform-resources/apple-platform-resources/app-store-small-business-program) or Google 15% reduced service fee (https://www.revenuecat.com/docs/platform-resources/google-platform-resources/15-reduced-service-fee) pages. This is how setup in Config.swift looks like: ``` static let revenueCatAPIKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" //Your RevenueCat API Key (sign up via tinyurl.com/register-revenuecat first, then follow tinyurl.com/api-key-revenuecat how to find it) static let revenueCatProjectID = "xxxxxxxxx" //Your RevenueCat Project ID (sign up via tinyurl.com/register-revenuecat first, then follow tinyurl.com/project-id-revenuecat how to find it) ``` Ensure your Bundle ID in Xcode & App Store Connect matches the project configured in RevenueCat. Trigger a purchase or subscription using: ``` revenuecat://purchase?external_id=user_123&product=sub_30_days ``` `external_id` = User identifier, e.g., your customer email or user ID. `product` = ID displayed on the RevenueCat console. Option 2: Manual (Non-RevenueCat) In the first step, insert the App Store Connect details of your In-App Purchase "Shared Secret" in Config.swift file. To find your "Shared Secret" in App Store Connect, you need to first log into your App Store Connect account. Then, go to the "Users and Access" section, and select the "Shared Secret" tab. Your generated "Shared Secret" will be listed, and you can copy/paste it to the relevant "IAPSharedSecret" field in Config.swift of WebViewGold. We care about the success of our customers and are here to support them in any way we can: That’s why we want to mention the App Store Small Business Program and the Google Play Store 15% Service Fee Tier Program here. Under these programs, eligible developers can qualify for a reduced 15% commission down from the standard 30% commission. It only takes minutes to fill out their forms, and they can potentially save you 50% of fees (reduction from 30% commission to 15%). Once approved, you will receive the reduced commission rate for all paid apps and in-app purchases made by customers on the respective stores. Find more information on the Apple program here (https://developer.apple.com/app-store/small-business-program/) and on the Google Play program here (https://support.google.com/googleplay/android-developer/answer/112622?hl=en). After setup, for in-app purchase products just link to this kind of URL: ``` Buy In-App Purchase ``` - The "package" is the product identifier of the item you want to sell. - The "successful_url" is the URL you want the app to load once the purchase is complete. - You may want to save a cookie on this page so that your web app remembers that the purchase has been made. - Include "disableadmob=true" if you would like to disable AdMob ads after the purchase of the product. For in-app subscription products, use this kind of URL scheme: ``` Start In-App Subscription ``` - The "package" is the product identifier of the subscription you want to sell. - The "successful_url" is the URL you want the app to load once the purchase is complete. - You may want to save a cookie on this page so that your web app remembers that the subscription has been activated. - The "expired_url" is the URL you want the app to load when the subscription is no longer valid. - You may want to update/delete a cookie on this page so that your web app remembers that the subscription has been deactivated. All information about the In-App Purchase Product Identifier can be found here (https://developer.apple.com/library/archive/qa/qa1329/_index.html). You can identify the user server-side. e.g., the site /buy_now.php redirects to In-App-Purchase API and that API redirects to /thanks.php, you can still access the user/session cookies server-sided and identify the user who just bought that In-App-Purchase. In this use case, please make sure that you deactivate the deletecache option in the Config.swift file in order to keep cookies activated by the In-App Purchase process. Server-Side Verification: Additionally or alternatively, WebViewGold also allows you to handle In-App Purchase or Subscription data from a server-side. After a successful transaction, the following JavaScript variables are created and injected into the webpage by WebViewGold: 1. planID: Contains the Product ID 2. transactionIdentifier: Contains the unique Transaction ID 3. subreceipts: Contains unique receipt IDs for the user’s subscriptions These variables can be accessed directly on the webpage for server-side storage and validation. Note that these variables are injected directly into the global window object after a transaction. Make sure your JavaScript is executed on the same page where the variables are accessible. Add appropriate fallback mechanisms if the variables are not available within the expected time frame (as shown in the timeout implementation). Sending these variables to your server allows you to validate subscriptions and transactions securely using Apple’s receipt validation API or your chosen method. Here’s an example JavaScript implementation: ``` // Utility function to wait for a variable to be defined function waitForVariable(variableName, callback, timeout = 5000) { const startTime = Date.now(); (function checkVariable() { if (window[variableName] !== undefined) { callback(window[variableName]); } else if (Date.now() - startTime < timeout) { setTimeout(checkVariable, 100); } else { console.error(`Timeout: ${variableName} was not set within ${timeout} ms`); } })(); } // Example: Handling In-App Purchase/Subscription variables waitForVariable("planID", function(planID) { console.log("planID:", planID); // Send the Product ID to your server sendToServer("planID", planID); }); waitForVariable("transactionIdentifier", function(transactionIdentifier) { console.log("transactionIdentifier:", transactionIdentifier); // Send the Transaction ID to your server sendToServer("transactionIdentifier", transactionIdentifier); }); waitForVariable("subreceipts", function(subreceipts) { console.log("subreceipts:", subreceipts); // Send Subscription Receipt IDs to your server sendToServer("subreceipts", subreceipts); }); // Function to send data to your server for validation function sendToServer(key, value) { fetch("https://example.com/api/validate", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ [key]: value }) }) .then(response => response.json()) .then(data => console.log(`Server Response for ${key}:`, data)) .catch(error => console.error(`Error sending ${key}:`, error)); } ``` Restore Purchases: A `restoreinapppurchases://` call allows your app to re-enable previously purchased content. When a user taps a link with this URL scheme, the app initiates a process to revalidate and restore in-app purchases—ideal for scenarios like app reinstallation or device change. Simply add a link like the following to let users restore their purchases: ``` Restore Purchases ``` Cancel Subscription: A `cancelinapppurchase://` call directs users to the official Apple subscription management portal, allowing them to cancel their subscriptions through Apple's native interface. Simply add a link like the following to forward users to manage their subscriptions: ``` Cancel Subscription ``` Localized Pricing / Get Store Location: The `getstorelocation://` URL scheme injects the App Store location into a JavaScript variable. After `getstorelocation://` is called/linked to, the WebViewGold wrapper retrieves the App Store's country code if available. Alternatively, consider turning `autoInjectVariable` to `true` in Config.swift to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. The country code is then injected into a JavaScript variable `storeLocation` for further use by your web app (e.g., for displaying localized pricing). If the code is not available, `storeLocation` will be set to `null`: - If successful (example United States of America): `var storeLocation = 'US';` - If no country code is found: `var storeLocation = null;` Note: Using our API for delivering paid content to app users does carry some risk of technically savvy users accessing the content without paying for it. This could occur through various methods, such as retrieving and opening the Success URL link directly, canceling subscription products after uninstalling the app, or using withdrawal rights and chargeback processes for credit cards. However, it is crucial to note that some level of risk is present with any digital approach. While we continue to work on ways to reduce these risks, it is ultimately up to the WebViewGold user/developer to accept the risk of unauthorized/unpaid access to content when using the suggested approach, as the API comes without a warranty. Despite this, the benefits of using our API generally outweigh the risks for most users. To ensure accurate revenue reporting and identify potential discrepancies, we recommend tracking and comparing the sales data of App Store Connect with server-side activations of in-app purchase products. ## QR Code Scanner API (iOS) URL: https://www.webviewgold.com/docs/iOS/qr-code-scanner/ Summary: Open a native QR code scanner from your web app and process scan results via URL or JavaScript. To trigger the QR code scanner within your WebView-based iOS app, use the following HTML link format: ``` Scan QR Code ``` Clicking this link will open the device’s camera to scan a QR code, and any URL encoded in the QR code will load automatically within the WebView. Use Cases: - Bridging print and digital content (e.g., scanning a QR code from a magazine to open a webpage). - Quick access to promotions, product information, or events. - Securely linking users to internal app resources or specific landing pages. ## Barcode Scanner API (iOS) URL: https://www.webviewgold.com/docs/iOS/barcode-scanner/ Summary: Scan EAN, UPC, and other barcodes natively in your iOS WebView app and hand results to your web app. The WebViewGold Barcode Scanner API enables your WebView-based app to activate the device camera for scanning barcodes. Once a barcode is successfully scanned, the result is automatically passed back into your web content. Use Cases: - Scanning product barcodes for inventory systems - Processing tickets or access codes in logistics or event apps - Enabling fast data capture from printed barcodes How to Trigger the Scanner: Use the following HTML to start the native barcode scanner: ``` Start Barcode Scanner Show Scan Result ``` - Start Barcode Scanner: Opens the device camera to detect supported barcode formats - Show Scan Result: Displays the scanned barcode content stored in the `barcodescanresult` JavaScript variable Technical Note: After scanning, the decoded barcode value is injected into the current page via the `barcodescanresult` JavaScript variable. You can use this variable to auto-fill forms, trigger custom logic, or perform lookups based on scanned data. Permissions: Make sure the app has access to the device camera, as it is required for barcode scanning to function properly. ## Scanning Mode API (iOS) URL: https://www.webviewgold.com/docs/iOS/scanning-mode/ Summary: Fine-tune the camera scanning behavior of the QR and barcode scanner in WebViewGold for iOS. If your web app presents information on the screen to be scanned (for example, a QR code), it can be helpful to turn the screen brightness up to 100% and to prevent the screen from sleeping. WebViewGold provides the Scanning Mode API to dynamically enable these optimal scanning conditions. This API includes 3 commands: - "auto" = turns on scanning mode and automatically turns it off on page redirect. - "on" = turns on scanning mode, stays on after page redirects. - "off" = turns off scanning mode. Link to these kinds of URLs to use the Scanning Mode API: ``` Enable Scanning Mode; will automatically disable on page redirectEnable Scanning Mode; will persist until manually disabledDisable Scanning Mode ``` ## Take Screenshot API (iOS) URL: https://www.webviewgold.com/docs/iOS/take-screenshot/ Summary: Capture a screenshot of the current app screen programmatically and share or save it — via JavaScript. The screenshot API of WebViewGold allows you to take screenshots programmatically from the WebView content and save them to the Photos gallery of your app user. One possible use case for this API is, for example, to programmatically save a screenshot of your e-tickets (for festivals, travels, …) of your web app so that they can be shown when the user is offline and cannot access the WebView content (e.g., while being in a festival location, on a train ride, …). Link to this kind of URL to trigger a screenshot: ``` Save ``` ## App Version Check API (iOS) URL: https://www.webviewgold.com/docs/iOS/app-version-check/ Summary: Detect the installed app version from your web app and prompt users to update when needed. Using this WebViewGold JavaScript API approach, your website/web app can retrieve the version of the iOS app being used by your app user. This is especially helpful if you want to notify users of an older version to update their app. Moreover, you can hide web app sections that require app features supported by a specific app version. Use JavaScript to this kind of URL to read and alert the app version and app bundle number: ``` window.location.href = "getappversion://"; alert(versionNumber); alert(bundleNumber); ``` Alternatively, consider turning `autoInjectVariable` to `true` in Config.swift to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. ## Dynamic UI API (iOS) URL: https://www.webviewgold.com/docs/iOS/dynamic-ui/ Summary: Change native UI elements like the status bar or bottom bar colors dynamically from your web app. WebViewGold allows you to dynamically customise the UI elements in your web app. These elements may consist of the status bar, bottom bar (iOS), navigation bar (Android) and pull to refresh (iOS). WebViewGold includes the following commands to dynamically customise these elements: - statusbarcolor:// - The MASTER COMMAND to change the color of the status bar and any other relevant UI features automatically, such as the status bar text color, the bottom bar color (iOS), navigation bar color (Android), etc. - statusbartextcolor:// - Allows you to manually change the text color of the status bar (iOS and Android). - bottombarcolor:// - If a bottom bar (iOS) or navigation bar (Android) UI element exists, allows you to manually change its color. - hidebars:// - Allows you to hide the background of the status bar, whos text remains on a transparent background. ### Changing the color of the Status Bar (and other UI elements automatically): This feature supports a color input in the following format: - RGB = {red, green, blue} Where the values are integers between 0 (min) and 255 (max). Use JavaScript to this kind of URL to change the color of the status bar: ``` // Example: red window.location.href = "statusbarcolor://255,0,0"; ``` When you change the status bar color, the status bar text will automatically change to a suitable color (white or black) depending on how dark the color is. Optional UI features like Pull To Refresh (iOS), the Bottom Bar (iOS) and the Navigation Bar (Android) will also have their colors automatically adjusted. ### Changing the color of the Status Bar text: If you would like to manually choose the color of the status bar text, you can do so using this option. This feature supports a text input for the following options: - "white" - "black" Use JavaScript to this kind of URL to change the color of the status bar text: ``` // Example: white text window.location.href = "statusbartextcolor://white"; // Example: black text window.location.href = "statusbartextcolor://black"; ``` ### Changing the color of the Bottom Bar: This feature supports a color input in the following format: - RGB = {red, green, blue} Where the values are integers between 0 (min) and 255 (max). Use JavaScript to this kind of URL to change the color of the status bar: ``` // Example: red window.location.href = "bottombarcolor://255,0,0"; ``` ### Hiding the status bar The hidebars functionality can either be on or off. Note, the status bar text, such as the time and battery percentage remain visible to the user, but the background surrounding the text becomes transparent and the WebView expands to fill the room left. Use JavaScript to change the visibility status of the bar: ``` // Example: hide the bars from view window.location.href = "hidebars://on"; // Example: redisplay the bars after being hidden window.location.href = "hidebars://off"; ``` ## Dynamic App Icon API (iOS) URL: https://www.webviewgold.com/docs/iOS/dynamic-app-icon/ Summary: Switch between alternative app icons at runtime in your iOS WebView app — triggered from your web app. This API allows the users of your app to change the app icon with the click of button. WebViewGold allows up to three alternative app icons from your default app icon. Whenever the app icon is dynamically changed, the user will be notified upon successful completion: If you wish to change the app icon of your app on behalf of your users, you can do so by publishing a new version of your app with the new app icon installed. See how to change your app icon on WebViewGold here. To dynamically change the app icon, just link to one of the following URL formats: ``` // Change to Alternative App Icon 1 window.location.href = "changeicon://icon1" // Change to Alternative App Icon 2 window.location.href = "changeicon://icon2" // Change to Alternative App Icon 3 window.location.href = "changeicon://icon3" // Revert to the Default App Icon window.location.href = "changeicon://default" ``` View a demonstration and testing page for this API here (https://webviewgoldtest.github.io/alticonsios.html). To set your alternative app icons, open your app files in Finder and navigate to WebView-Swift/WebView/ApplicationIcon/AppIconAlternate. In this folder, you will see template app icons for all of the required app icon sizes in iOS (iPhones and iPads), for each alternative icon: The default names of each alternative app icon are: "AppIconAlternate1", "AppIconAlternate2" and "AppIconAlternate3". If you like, you can change the default names by editing the alternativeAppIconNames variable in the Config file: Each app icon (for example, 'AppIconAlternateX') requires five different sizes, which are described by the file name suffix: - For iPhones: - AppIconAlternateX (60x60 pixels) - AppIconAlternateX@2x (120x120 pixels) - AppIconAlternateX@3x (180x180 pixels) - For iPads: - AppIconAlternateX-ipad@2x (152x152 pixels) - AppIconAlternateX-ipad@3x (167x167 pixels) When replacing these template app icons with your own, make sure they follow the same file name format (with the suffixes listed above) with the correct image size. View a more detailed guide on app icon specifications here (https://developer.apple.com/design/human-interface-guidelines/foundations/app-icons/). To activate this API (also for App Store Review), please open Info.plist as source code (right-click on the file and select "Open As" -> "Source Code" from the contextual menu): Within Info.plist, search for ``` CFBundleIcons CFBundlePrimaryIcon CFBundleIconFiles UIPrerenderedIcon ``` and replace it with ``` CFBundleIcons CFBundleAlternateIcons AppIconAlternate1 CFBundleIconFiles AppIconAlternate1 UIPrerenderedIcon AppIconAlternate2 CFBundleIconFiles AppIconAlternate2 UIPrerenderedIcon AppIconAlternate3 CFBundleIconFiles AppIconAlternate3 UIPrerenderedIcon CFBundlePrimaryIcon CFBundleIconFiles UIPrerenderedIcon ``` Moreover, search for ``` CFBundleIcons~ipad CFBundlePrimaryIcon CFBundleIconFiles UIPrerenderedIcon ``` and replace it with ``` CFBundleIcons~ipad CFBundleAlternateIcons AppIconAlternate1 CFBundleIconFiles AppIconAlternate1-ipad UIPrerenderedIcon AppIconAlternate2 CFBundleIconFiles AppIconAlternate2-ipad UIPrerenderedIcon AppIconAlternate3 CFBundleIconFiles AppIconAlternate3-ipad UIPrerenderedIcon CFBundlePrimaryIcon CFBundleIconFiles UIPrerenderedIcon ``` This is the default setting regarding alternative app icon names and amount of alternative app icon files. ## Contacts API (iOS) URL: https://www.webviewgold.com/docs/iOS/contacts/ Summary: Access the device address book from your web app: read contacts with user permission in WebViewGold for iOS. WebViewGold allows for the export of contacts into a JavaScript variable, in the format below via the readcontacts:// API. The JSON object is stored in the `contacts` variable. In order to access this, your app must first gain permission through the requestcontactpermission:// API, which will prompt your user to enable contact permissions. Without completing this step, the readcontacts:// will populate the `contacts` variable with a null value. Example output stored in JS `contacts` variable: ``` { "John Appleseed":[ "888-555-5512", "888-555-1212" ], "Daniel Higgins":[ "555-478-7672", "(408) 555-5270", "(408) 555-3514" ], "David Taylor":[ "555-610-6679" ], "Hank Zakroff":[ "(555) 766-4823", "(707) 555-1854" ] } ``` ## Biometric Authentication API (Face ID / Touch ID) (iOS) URL: https://www.webviewgold.com/docs/iOS/biometric-authentication/ Summary: Protect your iOS app with Face ID or Touch ID and verify users biometrically from your web app. This is an independent, more powerful, yet more complicated alternative to our simple Config.swift-based enableBioMetricAuth option. This API allows you to use biometric authentication in your app and return result via JavaScript to your website. Biometric authentication includes Face ID (in newer iPhone designs) and Touch ID (in older iPhone designs) with code as fallback. By calling the "bioauth://" URL command, you can trigger the biometric authentication natively in your app. Once the process is complete, WebViewGold will report the results back to your web app by calling one of the following functions: - onBioAuthSuccess() - Called when the authentication process was successful. - onBioAuthFailure(errorCode, errorMessage) - Called when the authentication process fails and provides error information. - onBioAuthUnavailable() - Called when biometric authentication is found to be unavailable on the device. To use this API, first, you must add the privacy key for Face ID biometric authentication in your Info.plist file. This is done by opening Info.plist, hovering over an exisiting key, clicking the (+) symbol to add a new key below your currently selected one and selecting the "Privacy - Face ID Usage Description" key option. Without this key, the app will not support Face ID. The value for this key is a description that is presented to the user the first time your app attempts to use Face ID. This description should clearly explain why your app needs to use Face ID. See below for an example description for this key: Next, you must define the following functions (in JavaScript) in your web app to handle the results of a biometric authentication: ``` function onBioAuthSuccess() { alert("Bio Authentication Succeeded"); } function onBioAuthFailure(errorCode, errorMessage) { // errorCode = Int, errorMessage = String alert(`Bio Authentication Failed, ${errorMessage} (code ${errorCode})`); } function onBioAuthUnavailable() { alert("Bio Authentication Unavailable"); } ``` Then, load this kind of URL to trigger the biometric authentication process in your web app: ``` window.location.href = "bioauth://"; ``` Security Notice: It should be noted that malicious users may be able to cause the onBioAuthSuccess() function to be called without completing the authentication process. Since authentication is a sensitive process, it is recommended to add an extra layer of security in your web app, such as a cookie or geolocation check, to help ensure the integrity of the authentication. Please consult your website cybersecurity expert for tailored guidance for your web app's needs. ## Haptic Feedback API (iOS) URL: https://www.webviewgold.com/docs/iOS/haptic-feedback/ Summary: Trigger native haptic feedback (vibrations) from your web app for a truly native app feeling on iOS. WebViewGold allows for the implementation of native iOS haptic control within your web app. Using our API, you are able to perform the following actions: Light Impact lighthaptic:// Used for a collision between small, light UI elements Medium Impact mediumhaptic:// Used for a collision between moderately sized UI elements Heavy Impact heavyhaptic:// Used for a collision between large, heavy UI elements Success Notification successhaptic:// Indicates a task or action has been successfully completed Warning Notification warninghaptic:// Indicates a task or action has produced a warning of some kind Error Notificiation errorhaptic:// Indicates that an error has occurred We suggest previewing Apple's best practices (https://developer.apple.com/design/human-interface-guidelines/playing-haptics) overview before including these features into your application. An example of how this API can be utilised can be seen below, with an anchor tag and custom javascript function which interact with our haptic API. ``` Navigation Link with Haptics function lightHaptic(url) { if (isWebViewBrowser) { window.location.href = url; loadInnerHref("lighthaptic://"); } else { window.location.href = url; } } function loadInnerHref(url) { iFrame = document.createElement("iframe"); iFrame.setAttribute("src", url); document.body.appendChild(iFrame); iFrame.parentNode.removeChild(iFrame); iFrame = null; } ``` Click here (https://webviewgoldtest.github.io/hapticFeedback.html) to view a demonstration web page for this feature. Inspect the page to view the example code. ## Shortcut API (iOS) URL: https://www.webviewgold.com/docs/iOS/shortcut/ Summary: Add Home Screen quick action shortcuts to your iOS app that deep link into specific pages. Enable `var useShortcuts = true` in `Config.swift` to register dynamic shortcuts defined in `Shortcuts.json`. Each shortcut can open a URL, inject JavaScript, and display an SF Symbol. Example: ``` { "shortcuts": [ { "title": "Open Google", "redirection_link": "https://google.com", "injection": "", "symbol": "wrench.and.screwdriver" }, { "title": "Open & Inject", "redirection_link": "https://apple.com", "injection": "(function() { console.log('Injected and executed!'); })();", "symbol": "lock.open" } ] } ``` Users can access the shortcuts by long-pressing the app icon. ## Clipboard API (iOS) URL: https://www.webviewgold.com/docs/iOS/clipboard/ Summary: Copy text to the iOS clipboard and read clipboard content from your web app via JavaScript. Call `getclipboard://` to inject the current clipboard contents into the JavaScript variable `clipboarddata`. ``` Read Clipboard function showClipboard() { console.log(clipboarddata); } ``` ## Share Extension (iOS) URL: https://www.webviewgold.com/docs/iOS/share-extension/ Summary: Let users share content from other apps directly into your iOS WebView app with a Share Extension. When users share text or images to your app from apps such as Photos or Safari, the data becomes available in the JavaScript variable `sharedData`. Shared images are provided as Base64 strings. ``` if (typeof sharedData !== 'undefined') { console.log(sharedData); } ``` ## Widget Extension (iOS) URL: https://www.webviewgold.com/docs/iOS/widget-extension/ Summary: Add a Home Screen widget to your iOS WebView app that links users straight into your web app. Offer an image widget (SVG or PNG) on the home screen. Activate it following our video guide and configure `widgetRefreshTime` (in minutes) and `widgetfallbackURL` in `Config.swift`. The widget image can be updated from your web app by loading a URL such as `widget://https://example.org/image.svg?user=30`. [Video: https://www.youtube-nocookie.com/embed/7IeR6UA3CkI] ## App Clip Extension (iOS) URL: https://www.webviewgold.com/docs/iOS/app-clip/ Summary: Offer a lightweight App Clip version of your iOS app that opens instantly without installation. Provide an App Clip experience by following our activation video. Afterwards adjust the behaviour in `AppClipConfig.swift`, e.g., to set the clip URL or appearance. [Video: https://www.youtube-nocookie.com/embed/zg0H2j16dG4] ## Native Navigation Footer (iOS) URL: https://www.webviewgold.com/docs/iOS/navigation-footer/ Summary: Enable a native bottom navigation bar with back, forward, and custom buttons in your iOS app. Set `var showNavFooter = true` in `Config.swift` to enable the native navigation footer bar. Configure buttons and links in `FooterBar.json`. Example: ``` { "colour":"dark", "layout":[ { "redirection_link":"https://webviewgoldtest.github.io/index.html", "sf_symbol":"house", "name": "Home" }, { "redirection_link":"https://webviewgoldtest.github.io/appControls.html", "sf_symbol":"wrench.and.screwdriver", "name": "Controls" }, { "redirection_link":"https://webviewgoldtest.github.io/NFCtesting.html", "sf_symbol":"wifi.square", "name": "NFC" }, { "redirection_link":"https://webviewgoldtest.github.io/IAPtesting.html", "sf_symbol":"cart", "name": "Purchases" }, { "redirection_link":"https://webviewgoldtest.github.io/permissions.html", "sf_symbol":"lock.open", "name": "Permissions" } ] } ``` Each `sf_symbol` uses an SF Symbol (https://developer.apple.com/sf-symbols/) and opens the `redirection_link` in the main WebView. ## Screen Capture Detection (iOS) URL: https://www.webviewgold.com/docs/iOS/screen-capture/ Summary: Detect screenshots and screen recordings in your iOS app and react from your web app. Set `let preventScreenCapture = true` in `Config.swift` to detect screenshots or screen recordings and automatically call the JavaScript function `onScreenCaptureAttempt`. ``` function onScreenCaptureAttempt() { alert('Screen capture detected'); } ``` ## MultiAPICall Feature (iOS) URL: https://www.webviewgold.com/docs/iOS/multi-api-call/ Summary: Chain multiple WebViewGold API calls in a single request with the MultiAPICall feature for iOS. This is an optional feature for iOS since Apple-based browsers process multiple page reloads on the same script differently to Android-based browsers. This means calling window.location.href = "exampleAPItrigger" multiple times on the same web page script will not work on iOS, unlike on Android. The MultiAPICall feature allows you to call multiple APIs in a single window.location.href assignment at the end of your web page script. This may be useful to you if you wanted to pre-load more than one data feature from the app, ready to be used on a page. MultiAPICall supports the following data collection APIs as entries: "get-uuid", "user-disable-tracking", "getonesignalplayerid", "getappversion", "__haptics (light, medium, heavy, success, warning, error)" Use JavaScript to this kind of URL to call multiple APIs at once (make sure to include a check to only use on the iOS platform): ``` // Example combination: "getonesignalplayerid" and "getappversion" if (getMobileOperatingSystem() == "iOS") { // iOS: Use MultiAPICall feature, separate API names by commas (","), NO spaces window.location.href = "multiapicall://getonesignalplayerid,getappversion"; } else { // Android: Can handle multiple calls at once, use normal API call structure window.location.href = "getonesignalplayerid://"; window.location.href = "getappversion://"; } ``` Click here (https://webviewgoldtest.github.io/multiAPI.html) to view a demonstration web page for this feature. Inspect the page to view the example code. ## NFC Plugin (iOS) URL: https://www.webviewgold.com/docs/iOS/nfc/ Summary: Read NFC tags natively in your iOS WebView app and pass tag data to your web app. Near-Field Communication (NFC) technology is one of the latest technologies that has become very popular among mobile users. It enables two devices or a device and an NFC tag to communicate wirelessly when in close proximity. NFC is widely used on iOS devices for reading and writing small amounts of data, making it an effective tool for sharing information via NFC-enabled cards or tags. The NFC API allows developers to read and write data to NFC tags directly from app code. This opens up new ways for apps to interact with users, from sharing contact information to embedding text snippets. WebViewGold NFC Plugin Integration While NFC is not part of the general WebViewGold feature scope, we offer a custom, easy WebViewGold NFC plugin integration (via JavaScript) on an individual basis. Please send us your requirements (e.g., writing/reading text snippets and/or contact card details to/from NFC tags) via an email to webviewgold-nfc@onlineappcreator.com for a free consultation and a non-binding quote. Writing To write a value to an NFC tag, send a command from your web app by loading the following URL: `writenfc://?value=data` Example: ` Write to an NFC tag ` This puts your app into Write Mode and stores the value until a tag is scanned. Writing to a VCARD Use the same API as writing plaintext. Format the text like: ``` VCARDFN:John DoeTitle:DeveloperTEL;TYPE=CELL:0452641211___ ``` Separate properties with an underscore (`_`) and prefix the text with `VCARD_`. See https://en.wikipedia.org/wiki/VCard#Properties for a list of supported properties. Reading To read an NFC tag, load `readnfc://`. The app will return the information to your web app by calling `readNFCResult(data, id, tag)` where `data` is the stored value, `id` the tag identifier and `tag` the tag type. Define this JavaScript function in your web app to handle the values. How to Test the API - Open the Config file of your app’s codebase. - Enter your purchase code. - Set the app’s URL to the NFC API Test Page: https://webviewgoldtest.github.io/NFCtesting.html - Run the app. - Press one of the Read or Write options to enable the corresponding mode. If writing, enter a value. - Bring the NFC tag to the device to complete the read or write operation. The test page and app will display the results. ## Siri Plugin (iOS) URL: https://www.webviewgold.com/docs/iOS/siri/ Summary: Add Siri Shortcuts support to your iOS WebView app and open app content by voice. Enable Siri integration by entering your plugin token in `static let siriEnabled` within `Config.swift` and adding the Siri capability to the WebViewGold target. Reach out to webviewgold-siri@onlineappcreator.com for more information. How to implement Siri functionality - Create a JavaScript function that Siri should trigger: ``` function playRadio() { // Add desired functionality } ``` - Add a button or link to register the Siri command (avoid phrases like "Open" which may confuse Siri): ``` Add Play Radio to Siri ``` The `command` parameter provides the recommended phrase, while `jsFunction` specifies the JavaScript function to execute. ## HealthKit Plugin (iOS) URL: https://www.webviewgold.com/docs/iOS/healthkit/ Summary: Connect your web app to Apple HealthKit and read health data with user permission on iOS. Activate HealthKit features by setting `static let HealthKitEnabled` in `Config.swift` to your plugin token and adding the HealthKit capability. Contact webviewgold-healthkit@onlineappcreator.com for details. ## Build & Publish Your App to the App Store (iOS) URL: https://www.webviewgold.com/docs/iOS/publish/ Summary: Publish your WebView app to the Apple App Store: full publishing service, manual process, and changing the bundle identifier. Your app is ready, and now it's time to upload it to the Apple App Store and reach an audience of millions? Exciting! The following section will show you how to do it — whether you want to do it yourself or have some work done for you. Prefer a browser-based workflow? The WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=ios_docs) (paid add-on) handles configuration, building, and uploads right from your browser without Xcode. [Video: https://www.youtube-nocookie.com/embed/nzgCkydN9OM] ### Option A) Full App Publishing Service Bringing your app to the App Store should be smooth and stress-free. Treat yourself to some support — with appsubmitter.io (https://www.appsubmitter.io), you can enjoy a convenient, expert-led publishing process — so you can focus on what matters most while we handle the details. Why Choose appsubmitter.io? - Save time – We take care of certificates, screenshots, and uploads. - Expert handling – Your app is submitted professionally, with no hassles. - Published under your account – You have full control, no restrictions. - Approval guarantee – If Apple rejects your app, you get a full refund (see Terms and Conditions (https://www.onlineappcreator.com/terms.php)). Ready to launch? Book a video call (https://www.appsubmitter.io/order-wizard/?platform=ios) and let’s get your app live! https://www.appsubmitter.io [Video: https://www.youtube-nocookie.com/embed/3o0xgQXagI8] ### Option B) Manual Publishing Process You don't want to use our stress-free submission service, but you want to deal with it yourself? Sure, follow this guide: Use your Apple Developer Program Subscription (https://developer.apple.com) to publish your app in the App Store. Before uploading, please change the Bundle Identifier (also called the "Bundle ID"): [Video: https://www.youtube-nocookie.com/embed/xqChOhStl3Q?ecver=1] Tip: The WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=ios_docs) (paid add-on) automatically handles bundle identifiers and App Store uploads, so you can skip this step. Repeat this process for each target such as `OneSignalNotificationServiceExtension`, `AppClip`, and other extensions. Each target's bundle identifier must use your main app bundle ID as a prefix. For example, if your main app bundle ID is `com.my.app`, the OneSignal app extension bundle ID should be `com.my.app.OneSignalNotificationServiceExtension`. Please note that the Bundle Identifier and your app's displayed name (the Product Name) are the only identification components that you need to change in the app template. Please avoid changing the Project Name (called "WebViewGold"; it is the name that sits at the top of the project navigator in the left panel of the Xcode window) as it can cause issues. The Project Name is not visible to users of your app and is not important in the app submission process. Afterward, please add customized texts to the permission details in terms of location, photo/camera access, and all other API details. Delete permissions which are not required by your app - except for the Privacy - Tracking Usage Description key (which is required by Apple for all apps; removing this key will cause your app to crash). You find the details in Info.plist file: Afterward, please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services for best App Store approval results. Such a UX review also helps you to achieve better customer retention in general for your product with suggestions for improvement. Great, now you are ready for the App Store submission of your web app. App Store approval works in most cases without any problems but highly depends on the content you provide in your app as WebViewGold does not provide content by itself. Please make sure to submit an app using a website/web app that behaves like a mobile app (for example, by using responsive design). Make sure that the content does not contradict the legal requirements of the Apple Developer Program. Use different link colors than standard HTML colors for better user experience. Afterward, please follow the steps of this second video: [Video: https://www.youtube-nocookie.com/embed/YPLs3xrDcm0?start=286] One addition to the tutorial video: In timestamp 07:00, after creating the App Identifier, please make sure to activate both the capabilities "App Groups" and "Push Notifications" in the App Identifier section on the Apple Developer Portal (choose the correct App ID here (https://developer.apple.com/account/resources/identifiers/list)). See these screenshots: https://prnt.sc/xz4hg5 & https://prnt.sc/xz4j01. Restart Xcode afterward. The App Store upload asks you whether you use encryption? We do not offer legally binding advice, but "No" must be indicated here in most cases. However, if HTTPS is used, an annual security report may have to be submitted to US authorities. More information about this can be found here (https://developer.apple.com/documentation/security/complying_with_encryption_export_regulations). The App Store upload asks you whether you use the Ad ID / IDFA? The Ad ID is included because AdMob is integrated, but not active by default. Removing the AdMob SDK will produce a lot of dependency errors, so the easiest suggestion would be to choose "Yes" at the "Does your app use the Ad ID?" question and selecting the tickbox "Attribute this app installation to a previously served advertisement" only (leave all other tickboxes blank). So, if you use AdMob banner/interstitial ads in WebViewGold, please configure this screen like this (https://prnt.sc/t8cj0a). If you do not use AdMob banner/interstitial ads in WebViewGold while the SDK is still embedded (which is the typical case while not using AdMob in WebViewGold), please select these (https://prnt.sc/t8ci23) options. If Apple rejects your app, please use Apple Resolution Center to explain the app feature in general (like "Our app enables our existing users to login in/use our products on their handheld device/....). If Apple still rejects your app, we can offer you a full refund of the WebViewGold license (by claiming within 14 days after purchase; see Terms and Conditions (https://www.onlineappcreator.com/terms.php)). Just contact us by mail. Congrats on your own published iOS app! 🎉 No time or don't you feel like signing and uploading manually? Consider the appsubmitter.io (https://www.appsubmitter.io) service: https://www.appsubmitter.io Of course, after the release should be celebrated first! But then perhaps the next project is already on the agenda? Our App Specialists are also happy to help you with individual development services (https://www.onlineappcreator.com/custom-development-services.php) for web apps, iOS apps, Android apps, chat bots, marketing ideas, and much more. Learn more (https://www.onlineappcreator.com/custom-development-services.php) ## Credits, Licenses & Extended License (iOS) URL: https://www.webviewgold.com/docs/iOS/credits/ Summary: License terms for WebViewGold for iOS, when you need an Envato Extended License, and open source credits. Please don't forget to add your Envato/CodeCanyon Purchase Code (https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-) in the purchasecode field for each app published by you. One license per each customized and published end product is required. You will need an Envato/CodeCanyon Extended License if any of these cases apply: - You charge your users for the App Store download - In-App Purchases API or In-App Subscription API will be used in your app - You sell your final app on any marketplace If you already bought the Regular License, you can upgrade the existing license here (https://help.market.envato.com/hc/en-us/articles/115005593503-If-I-choose-the-wrong-license-or-need-to-upgrade-my-license-how-easy-is-it-to-change-to-the-correct-license-). Alternatively, if you do not want to request a refund or upgrade the license, you can re-use your existing Regular License for another app covered by the Regular License. All rights (e.g., of images) belong to their respective owners. The provider of this source code is OnlineAppCreator.com c/o jocapps GmbH - registered in Germany - and is not affiliated with Apple. iOS is a registered trademark of Cisco and used under license by Apple Inc. iPad, iPhone, iPod, Xcode, and Xcode logo are registered trademarks of Apple Inc. One license per each customized end product is required. Please take a look for license info of your CodeCanyon purchase: https://codecanyon.net/licenses/standard (https://codecanyon.net/licenses/standard?ref=onlineappcreator) WebViewGold for iOS uses OneSignal-iOS-SDK (https://github.com/OneSignal/OneSignal-iOS-SDK) (© 2017 OneSignal) which is licensed under a modified MIT License; you may not use this file except in compliance with the license. WebViewGold for iOS uses SVProgressHUD (https://github.com/SVProgressHUD/SVProgressHUD) (© 2011-2018 Sam Vermette, Tobias Tiemerding and contributors) which is licensed under the MIT License; you may not use this file except in compliance with the license. WebViewGold for iOS uses firebase-ios-sdk (https://github.com/firebase/firebase-ios-sdk) (© 2020 Firebase) which is licensed under the Apache License, version 2.0; you may not use this file except in compliance with the license. WebViewGold for iOS uses Google Mobile Ads SDK (https://developers.google.com/admob/ios/download) (© 2020 Google) which is licensed under the Google Developers Site Terms of Service; you may not use this file except in compliance with the license. WebViewGold for iOS uses nanopb (https://github.com/nanopb/nanopb) (© 2011 Petteri Aimonen) which is licensed under the zlib License; you may not use this file except in compliance with the license. WebViewGold for iOS uses promises (https://github.com/google/promises) (© 2020 Google) which is licensed under the Apache License, version 2.0; you may not use this file except in compliance with the license. WebViewGold for iOS uses protobuf (https://github.com/protocolbuffers/protobuf) (© 2020 Google) which is licensed under a Google License; you may not use this file except in compliance with the license. WebViewGold for iOS uses SwiftQRCodeScanner (https://github.com/vinodiOS/SwiftQRCodeScanner) (© 2017 vinodiOS) which is licensed under the MIT License; you may not use this file except in compliance with the license. WebViewGold for iOS uses SwiftyStoreKit (https://github.com/bizz84/SwiftyStoreKit) (© 2015-2016 Andrea Bizzotto) which is licensed under the MIT License; you may not use this file except in compliance with the license. WebViewGold for iOS uses GIF-Swift (https://github.com/kiritmodi2702/GIF-Swift) (© https://iosdevcenters.blogspot.com/). ## Rate WebViewGold (iOS) URL: https://www.webviewgold.com/docs/iOS/rate/ Summary: Enjoying WebViewGold? Rate it on CodeCanyon in seconds — it keeps updates coming. If you have 10 seconds, please rate WebViewGold (it is a great motivation for future updates ^^): 1. Go to CodeCanyon.net (https://www.codecanyon.net?ref=onlineappcreator) and sign in 2. Navigate to https://www.codecanyon.net/downloads (https://www.codecanyon.net/downloads?ref=onlineappcreator) 3. Click the stars, as shown in this picture: https://www.codecanyon.net/downloads?ref=onlineappcreator Thank you very much! ## Get WebViewGold for Android & macOS (iOS) URL: https://www.webviewgold.com/docs/iOS/more-platforms/ Summary: Ship your app on more platforms: get WebViewGold for Android and macOS and reuse the same web app. ### Get WebViewGold for Android https://www.webviewgold.com/download/android?ref=ios_doc_footer ### Get WebViewGold for macOS https://www.webviewgold.com/download/mac/ ## Support, Contact & Custom Development (iOS) URL: https://www.webviewgold.com/docs/iOS/support/ Summary: Get help fast: browse the WebViewGold Support Center, contact our team directly, or request professional custom app development made in Germany. Please check our Support Center (https://www.webviewgold.com/support-center/) for quick answers or contact us using the form below: [Video: https://support.jocapps.com/OnlineAppCreator_support?ref=WebViewGold_Docs_iOS] ### Custom App Development Services Need custom features, integrations, or a fully bespoke app? We've got you covered. Since 2014, our (now even ISO 9001-certified) agency has been delivering high-quality software solutions — Made in Germany. We offer professional custom development not only for WebViewGold-based apps, but also for standalone solutions, including: - Progressive Web Apps (PWAs) and classic web platforms - Native apps: Swift (iOS), Kotlin (Android) - Cross-platform apps: Flutter, React Native - Game and AR/VR development: Unity Whether you're looking to add specific features to your WebViewGold app or build something from the ground up, we can help you turn your idea into a reality with fast turnaround and German engineering quality. Get a custom quote: Reach out to us at custom-app-development@onlineappcreator.com — we’ll be happy to review your requirements and provide a tailored offer. # WebViewGold for Android Documentation hub: https://www.webviewgold.com/docs/android/ Official WebViewGold for Android documentation: convert your website to a native Android app in minutes — setup guide, 30+ APIs & features, and Google Play publishing. ## Set Up Your Web App or Website (Android) URL: https://www.webviewgold.com/docs/android/setup-website/ Summary: Prepare your website, PWA, or local HTML files for your Android app: use a remote URL, bundle files offline in the app, or combine both with an offline fallback. ### Option A) Use a URL for accessing your web application (= store files online) Create a mobile-optimized website or web app and upload it to your webserver/webspace. WebViewGold for Android supports classic HTML, PHP, WordPress, Progressive Web Apps, HTML5 games, Wix, apprat.io, Bubble, jQuery Mobile, and modern AI/no-code builders such as Lovable, Base44, and Bolt. A common implementation pattern is to build the product UI in jQuery, Lovable, Base44, Bolt, React, Vue, Angular, or your preferred stack, then use WebViewGold as the native Android app shell that adds Google Play packaging, push notifications, device APIs, URL handling, and other native capabilities. For best Google Play review results, optimize the website so it behaves like a polished Android app: responsive breakpoints, fast loading, clear offline/error states, accessible tap targets, and predictable back-button behavior. By default, WebViewGold for Android permits both HTTPS and HTTP content. For a more production-grade security profile, restrict traffic to HTTPS by switching cleartext traffic off (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-android-switching-usescleartexttraffic-from-true-to-false/) and consider the `BLOCK_SELF_SIGNED_AND_FAULTY_SSL_CERTS` option. Please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services to improve approval readiness and long-term retention. ### Option B) Use a local HTML folder for accessing your web application (= store files within the app) WebViewGold supports web apps based on local HTML folders, too: Copy your HTML/CSS/JavaScript files to the Android Studio project and set USE_LOCAL_HTML_FOLDER to true (see next step). Please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services for best Play Store approval results. Such a UX review also helps you to achieve better customer retention in general for your product with suggestions for improvement. [Video: https://www.youtube-nocookie.com/embed/CtyyZrNVcek] ### Option C) Use an HTML folder if the user is offline, and use a remote URL if the user is online (= store files online + store backup/fallback files within the app) Copy your HTML/CSS/JavaScript files to the Android Studio project, set USE_LOCAL_HTML_FOLDER to false (see next step) and set FALLBACK_USE_LOCAL_HTML_FOLDER_IF_OFFLINE to true (see next step). Please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services for best Play Store approval results. Such a UX review also helps you to achieve better customer retention in general for your product with suggestions for improvement. [Video: https://www.youtube-nocookie.com/embed/W0NrpCKB7aU] ## Set Up & Configure WebViewGold for Android (Android) URL: https://www.webviewgold.com/docs/android/setup/ Summary: Download the WebViewGold Android Studio template, insert your URL, and explore every built-in configuration option — no coding skills required. Download the WebViewGold app template for Android Studio here (https://www.webviewgold.com/download/android). https://www.webviewgold.com/download/android Want to build without installing Android Studio? The WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=android_docs) (paid add-on) lets you configure, build, and upload your app to the Play Store directly from your browser. [Video: https://www.youtube-nocookie.com/embed/nzgCkydN9OM] Download Android Studio (https://developer.android.com/studio) if you did not install Android Studio already. Afterward, open Android Studio: Choose Open: Select your AndroidStudioSource folder and wait until the project loaded completely: Afterward, open Config.java file to edit main configuration details (URL, URL Handling, UserAgent, dialogs). Please take a look at our YouTube channel (https://www.youtube.com/channel/UChuOoCMcXP_8SQPbZyXTPjA?sub_confirmation=1) for specific setup tutorials. Please don't forget to add your Envato/CodeCanyon Purchase Code (https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-) in the PURCHASECODE field for each app published by you. One license per each customized end product is required. Please take a look for license info of your CodeCanyon purchase: https://codecanyon.net/licenses/standard (https://codecanyon.net/licenses/standard?ref=onlineappcreator) The main configuration document Config.java looks like this: Setting up apps with WebViewGold is very easy and does not require any coding knowledge. Please take a look at this overview of the built-in configuration options in Config.java file: [Video: https://www.youtube-nocookie.com/embed/5rlknsdIORE] HOST required value Your domain host without https:// or http:// prefix (e.g. "www.example.org"). By default, WebViewGold for Android permits both HTTPS content and HTTP content. However, if you prefer to enhance app security by enabling only HTTPS content, there's an option to modify this setting (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-android-switching-usescleartexttraffic-from-true-to-false/) (and/or consider 'BLOCK_SELF_SIGNED_AND_FAULTY_SSL_CERTS' option). HOME_URL required value Your full WebView URL (e.g. "https://www.example.org/app.html") which should be loaded in the WebView. By default, WebViewGold for Android permits both HTTPS content and HTTP content. However, if you prefer to enhance app security by enabling only HTTPS content, there's an option to modify this setting (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-android-switching-usescleartexttraffic-from-true-to-false/) (and/or consider 'BLOCK_SELF_SIGNED_AND_FAULTY_SSL_CERTS' option). USE_LOCAL_HTML_FOLDER true or false Set to true to use local "index.html" HTML file instead of remote WebView URL FALLBACK_USE_LOCAL_HTML_FOLDER_IF_OFFLINE true or false Set to true if you want to use the "local-html" folder if the user is offline, and use the remote URL if the user is online ACTIVATE_PROGRESS_BAR true or false Set to false to disable the progress spinner/loading spinner PHONE_ORIENTATION value (orientation) Set the phone orientation to either "portrait", "landscape", or "auto" TABLET_ORIENTATION value (orientation) Set the tablet orientation to either "portrait", "landscape", or "auto" USER_AGENT optional Define a customized UserAgent for web requests (or leave it empty to use the default Android UserAgent) HARDWARE_ACCELERATION true or false Set to true to activate Hardware Acceleration; it can improve rendering performance but can also increase memory usage and may cause compatibility issues with some content APPEND_LANG_CODE true or false Set to true if you want to extend URL request by the system language like ?webview_language=LANGUAGE CODE (e.g., ?webview_language=EN for English users) AUTO_REFRESH_ENABLED true or false Set to true if you want the WebView to automatically refresh its contents when the app comes back to the foreground from the background. EXTERNAL_LINK_HANDLING_OPTIONS 0 or 1 or 2 Set to (0) to open external links in-app by default; (1) to ALWAYS open in a new tab (an additional in-app browser); (2) to ALWAYS open in another browser BROWSER_WHITELIST List Add domains here that should always be opened in the external browser, regardless of what the EXTERNAL_LINK_HANDLING_OPTIONS option is set to. To add another domain, insert another host as follows: ["www.alwaysopeninchrome.com", "www.google.com"]. Please enter the host exactly how you link to it (but never with the inclusion of http/https) BROWSER_BLACKLIST List Add domains here that should never be opened in the external browser, regardless of what the EXTERNAL_LINK_HANDLING_OPTIONS option is set to. To add another domain, insert another host like so: ["www.neveropeninchrome.com", "www.google.com"]. Please enter the host exactly how you link to it (but never with the inclusion of http/https) SPECIAL_LINK_HANDLING_OPTIONS 0 or 1 or 2 Set to (0) to open special links in-app; (1) in a new tab (an additional in-app browser); (2) in another browser; NOTE: Special links have a "_blank" target or end with "#"; Overrides EXTERNAL_LINK_HANDLING_OPTIONS if the link is also an external link ALWAYS_OPEN_IN_INAPP_TAB list Add URL prefixes that you ALWAYS want to open in an in-app tab (e.g., {"https://www.google.com", "https://www.example.com/page"}), regardless of what the EXTERNAL_LINK_HANDLING_OPTIONS is set to. NEVER_OPEN_IN_INAPP_TAB list Add URL prefixes that you NEVER want to open in an in-app tab (e.g., {"https://www.google.com", "https://www.example.com/page"}), regardless of what the EXTERNAL_LINK_HANDLING_OPTIONS is set to. QR_CODE_URL_OPTIONS 0 or 1 or 2 or 3 or 4 Set to (0) to open a scanned QR code URL in the app; (1) in an in-app tab; (2) in a new browser; (3) in an in-app tab if external; (4) in a new browser if external AUTO_INJECT_VARIABLES true or false Set to true in order to automatically set JavaScript variables; will eliminate the need to manually call methods like get-uuid://: currently, it supports loading the app version, OneSignal and Firebase subscription IDs, as well as the UUID CLEAR_CACHE_ON_STARTUP true or false Set to true to clear the WebView cache & cookies on each app startup and do not use cached versions of your web app/website CLEAR_CACHE_ON_EXIT true or false Set to true to clear WebView cache & cookies upon full app exit (you might also want to activate CLEAR_CACHE_ON_STARTUP, as system differences could affect reliability) IS_DEEP_LINKING_ENABLED true or false Set to true to enable deep-linking IS_CUSTOM_SCHEME_ENABLED true or false Set to true if you want to accepts custom scheme deeplinks like `webviewgold://` CUSTOM_DEEPLINK_SCHEME true or false Customize deeplinking scheme prefix here and also in AndroidManifest.xml OPEN_NOTIFICATION_URLS_IN_SYSTEM_BROWSER true or false Set to true to open the notification deep linking URLs in the system browser instead of your app SPLASH_SCREEN_ACTIVATED true or false Set to true to activate the splash screen SPLASH_TIMEOUT number value (milliseconds) Set the splash screen timeout in milliseconds (the loading sign screen will show after this time duration if the home URL still has some loading to do) SPLASH_FADE_OUT number value (milliseconds) Duration of the splash screen fade-out animation in milliseconds. This animation begins after all other delay timers have completed. Set to 0 to disable the fade-out effect. SPLASH_MIN_TIME number value (milliseconds) Minimum duration (in ms) the splash screen will be shown, used only if REMAIN_SPLASH_OPTION is set to true; if SPLASH_MIN_TIME exceeds this value, the splash screen will remain for SPLASH_MIN_TIME instead. In such cases, this value will be ignored in favor of the longer duration. REMAIN_SPLASH_OPTION true or false Set to true to show the splash screen until the home URL has finished loading (overrides SPLASH_TIMEOUT) SCALE_SPLASH_IMAGE percentage value [0-100] Set the splash screen image size with respect to the device's smallest width/height; range in percentage [0-100]; Caution: value = 0 will hide the image completely blackStatusBarText true or false Set to true for black status bar text; Set to false for white status bar text; Use 'colorPrimaryDark' in style.xml to choose the status bar background color TRANSPARENT_STATUS_BAR true or false Set to true for transparent status bar; Set to false for opaque status bar; Use 'colorPrimaryDark' in style.xml to choose the status bar background color enableBioMetricAuth true or false Set to true to enable App Lock (biometric authentication) for the app PREVENT_SLEEP true or false Set to true to prevent the device from going into sleep while the app is active ENABLE_SWIPE_NAVIGATE true or false Set to true to enable navigation by swiping left or right to move back or forward a page ENABLE_PULL_REFRESH true or false Set to true to enable swiping down to refresh the page. Additionally, you can always call `enablepulltorefresh://` or `disablepulltorefresh://` from your website to activate or deactivate pull-to-refresh dynamically. HIDE_VERTICAL_SCROLLBAR true or false Set to true to hide the vertical scrollbar HIDE_HORIZONTAL_SCROLLBAR true or false Set to true to hide the horizontal scrollbar ENABLE_ZOOM true or false Set to false to prevent zoom functionalities for the app user (works by additionally using script injection) DISABLE_DARK_MODE true or false Set to true to disable dark mode (not working on all launchers) HIDE_NAVIGATION_BAR_IN_LANDSCAPE true or false Set to true to hide the navigation bar when in landscape mode MAX_TEXT_ZOOM number value Set to a value greater than 0 to define a maximum text zoom; Set to (0) to disable this feature. Note: Small = 85, Default = 100, Large = 115, Largest = 130 INPUT_SCROLL_HELPER true or false Set to true to enforce (JS-injected) consistent input field scrolling EXIT_APP_BY_BACK_BUTTON_ALWAYS true or false Set to true to close the app by pressing the hardware back button (instead of going back to the last page) EXIT_APP_BY_BACK_BUTTON_HOMEPAGE true or false Set to true to close the app by pressing the hardware back button if the user is on the home page (which does not allow going to a prior page) EXIT_APP_DIALOG true or false Set to true to ask the user if they want to exit before exiting the app OFFLINE_SCREEN_BACKGROUND_COLOR hex color code Set the color of the offline screen background using the Hex Color Code (e.g., "#ffffff" = White) PREVENT_SCREEN_CAPTURE true or false Set to true to prevent users from taking screenshots or screen recordings in the app. `onScreenCaptureAttempt()` will be called for handling (e.g, showing an individual modal) in web app. UUID_ENHANCE_WEBVIEW_URL true or false Set to true to add the UUID parameter 'uuid=XYZ' to the first URL request BLOCK_SELF_SIGNED_AND_FAULTY_SSL_CERTS true or false Set to true to block content signed with self-signed SSL (user) certificates & faulty SSL certificates; maybe also consider blocking all Non-HTTPS content (https://www.webviewgold.com/support-center/knowledgebase/how-to-prevent-non-https-connections-in-webviewgold-for-android-switching-usescleartexttraffic-from-true-to-false/) BLOCK_ROOTED_DEVICES true or false Set to true to enable the app's functionality to detect rooted devices and disable itself on them (Note: Root detection is not always reliable and may not work on all devices) LINK_DRAG_AND_DROP true or false Set to false to disable link drag and drop LANDSCAPE_FULLSCREEN_VIDEO true or false Set to true to always present fullscreen videos in landscape mode SHOW_FIRSTRUN_DIALOG true or false Set to false to disable the First Run Dialog SHOW_FACEBOOK_DIALOG true or false Set to false to disable the Follow On Facebook Dialog SHOW_RATE_DIALOG true or false Set to false to disable the Rate This App Dialog RATE_DAYS_UNTIL_PROMPT number value (days) Set the minimum number of days to be passed after the application is installed before the "Rate this app" dialog is displayed RATE_LAUNCHES_UNTIL_PROMPT number value (launches) Set the minimum number of application launches before the "Rate this app" dialog is displayed FACEBOOK_DAYS_UNTIL_PROMPT number value (days) Set the minimum number of days to be passed after the application is installed before the "Follow on Facebook" dialog is displayed FACEBOOK_LAUNCHES_UNTIL_PROMPT number value (launches) Set the minimum number of application launches before the "Rate this app" dialog is displayed FACEBOOK_URL value (URL) Set the URL of your Facebook site ALLOW_IMAGE_DOWNLOAD true or false Set to false to prevent the "Download images" pop-up box from appearing when long-pressing on an image PUSH_ENABLED true or false Set to true to activate OneSignal Push (set OneSignal IDs in the build.gradle file) PUSH_ENHANCE_WEBVIEW_URL true or false Set to true if you want to extend WebView Main URL requests by the OneSignal subscription ID in the ?onesignal_push_id=XYZ format (alternatively and additionally, you can always request the OneSignal subscription ID by calling getonesignalplayerid:// or even get it automatically if you turn "AUTO_INJECT_VARIABLES" to "true" in Config.java) PUSH_RELOAD_ON_USERID true or false Set to true if WebView should be reloaded when the app gets a UserID from OneSignal (set the OneSignal IDs in the build.gradle file) FIREBASE_PUSH_ENABLED true or false Set to true to activate Firebase Push (replace google-services.json before) FIREBASE_PUSH_ENHANCE_WEBVIEW_URL true or false Set to true if you want to extend URL request by ?firebase_push_id=XYZ (alternatively and additionally, you can always request the Firebase subscription ID by calling getfirebaseplayerid:// or even get it automatically if you turn "AUTO_INJECT_VARIABLES" to "true" in Config.java) PUSHWOOSH_ENABLED true or false Set to true to activate Pushwoosh Push (set the Pushwoosh credentials in the AndroidManifest.xml & string.xml files) PUSHWOOSH_ENHANCE_WEBVIEW_URL true or false Set to true if you want to extend URL request by ?pushwoosh_id=XYZ (set the Pushwoosh credentials in the AndroidManifest.xml & string.xml files) SHOW_ADSENSE_AD true or false Set to true to enable support for AdSense web ads (independent of AdMob ads) SHOW_BANNER_AD true or false Set to true if you want to display AdMob banner ads (set the AdMob IDs in the strings.xml file) SHOW_FULL_SCREEN_AD true or false Set to true if you want to display AdMob fullscreen interstitial ads after X website clicks (set the AdMob IDs in the strings.xml file) ASK_FOR_AD_CONSENT true or false Set to false if you want to deactivate Google consent management for AdMob (check https://support.google.com/admob/answer/13554116 upfront) SHOW_AD_AFTER_X value (website reloads) Set the number X of website clicks for AdMob interstitial ads (set the AdMob IDs in the strings.xml file) INCREMENT_WITH_TAPS true or false Set to true to allow normal screen taps to increment SHOW_AD_AFTER_X USE_FACEBOOK_ADS true or false Set to true to use Facebook Audience Network ads instead of AdMob ads (set the Ad IDs in the strings.xml file) ENABLE_REWARDED_ADS true or false Set to true to enable AdMob rewarded ads. Required to be true even for manual activation of ads.(set the Ad IDs in the strings.xml file) USE_REWARDED_ADS_WHERE_POSSIBLE true or false Set to true to display admob rewarded ads instead of admob interstitial ads, i.e after x taps etc. Keep as false if their activation should be handled via your website's code. Note, this requires SHOW_FULL_SCREEN_AD to also be set to true, in order to overwrite them. AD_TRIGGER_URLS optional Add page trigger words here, presence in a URL triggers interstitial ads (e.g., "thanks.html", "welcome.html", "/thank-you/", "next-step.php") REVENUECAT_API_KEY optional Your RevenueCat API Key (sign up via tinyurl.com/register-revenuecat (https://tinyurl.com/register-revenuecat) first, then follow tinyurl.com/api-key-revenuecat (https://tinyurl.com/api-key-revenuecat) how to find it) REVENUECAT_PROJECT_ID optional Your RevenueCat Project ID (sign up via tinyurl.com/register-revenuecat (https://tinyurl.com/register-revenuecat) first, then follow tinyurl.com/project-id-revenuecat (https://tinyurl.com/project-id-revenuecat) how to find it) downloadableExtension list Add the file formats that should trigger the file downloader functionality (e.g., .pdf, .docx, ...) AUTO_DOWNLOAD_FILES true or false Set to true if you want to activate the downloader functionality based on Content-Disposition HTTP headers, regardless of the file formats listed in the downloadableExtension variable above GOOGLE_LOGIN_HELPER_TRIGGERS list Define the URL prefixes that load during Google login for your website; acts as a trigger for the helper FACEBOOK_LOGIN_HELPER_TRIGGERS list Define the URL prefixes that load during Facebook login for your website; acts as a trigger for the helper HOME_URL_LOGOUT value (URL) Define the URL for logout to clear login cookies (optional) MANUAL_COOKIE_SYNC true or false Set to true to enable the Manual Cookie Sync tool. To be used if you require cookies to be synced under every 30 seconds or if something cookie-related does not work otherwise. See cookie hints also here (https://www.webviewgold.com/support-center/knowledgebase/will-cookies-work-will-the-login-of-my-website-web-app-still-work/). COOKIE_SYNC_TIME number value (milliseconds) Define how often the cookies should sync with the app in milliseconds (ms) MANUAL_COOKIE_SYNC_TRIGGERS list Define the URL prefixes you want to use the Manual Cookie Sync tool on. If MANUAL_COOKIE_SYNC_TRIGGERS is empty, it will automatically check every page. Example: {"https://example.com/login", "https://example.com/data"} requireLocation true or false Set to false if you do NOT require location services/GPS coordinates; don't forget to also remove relevant entries in AndroidManifest.xml if you want to ensure the complete removal of the permission capability for the app; also see usage of background (!) location requireBackgroundLocation true or false Set to false if background location services are required. If this option is set to false, ensure that you also uncomment the `android.permission.FOREGROUND_SERVICE_LOCATION` and `.GPSService` blocks in `AndroidManifest.xml` (search for these terms within). This setting is only effective if `requireLocation` is also set to true. requireStorage true or false Set to false if you do NOT require APIs related to downloads or uploads; don't forget to also remove relevant entries in AndroidManifest.xml if you want to ensure the complete removal of the permission capability for the app requireCamera true or false Set to false if you do NOT require APIs related to camera images / camera videos; don't forget to also remove relevant entries in AndroidManifest.xml if you want to ensure the complete removal of the permission capability for the app requireRecordAudio true or false Set to false if you do NOT require APIs related to recording audio; don't forget to also remove relevant entries in AndroidManifest.xml if you want to ensure the complete removal of the permission capability for the app filePickerMode number value File upload options: (0) Camera & gallery; (1) Camera only; (2) Gallery only. Open strings.xml file to edit app name & text strings: Multi-language apps: To edit translations – including the default German and Spanish ones – or to create new, additional translations for these strings, right-click on the "strings" folder in Android Studio and select "Open Translations Editor": Open dimens.xml file to modify text formatting: ## App Icon (Android) URL: https://www.webviewgold.com/docs/android/app-icon/ Summary: Add your custom app icon to your WebViewGold Android app in Android Studio — step by step. ### Optional App Disclosure for your Privacy Policy / Terms & Conditions If you offer (WebViewGold-based) mobile apps to your users, you may optionally include the following statement in your Privacy Policy or Terms & Conditions (this note is provided for informational purposes only and does not constitute legal advice. We assume no liability for how this text is used. Please consult a legal professional for individual guidance): ``` Our mobile apps (iOS/Android) are developed using WebViewGold by jocapps GmbH (Germany). These apps display the content of our website using a WebView framework and enrich it with selected native features to improve usability and performance. Accordingly, the same privacy policy and terms of service that apply to our website also apply to our mobile apps. For more information, please visit https://www.webviewgold.com/#convert-website-to-app-privacy, or contact us directly. ``` ### 3) Adding a Custom App Icon Here’s how to add a custom app icon to your WebView-based Android app: 1. Locate Existing App Icons To begin, find the existing app icon files: - Right-click on each 'ic_launcher.png' file in your project (sizes from hdpi to xxxhdpi). - Select Reveal in Finder (Mac) or Reveal in Explorer (Windows). 2. Replace with Your Icon Replace each ic_launcher.png file with your new icon file, ensuring the new icons meet the following requirements: - Include icons for each resolution: hdpi, xhdpi, xxhdpi, and xxxhdpi. - Use a high-quality image (preferably in PNG format). Tip: You may also use the Launcher Icon Generator (https://jgilfelt.github.io/AndroidAssetStudio/icons-launcher.html) (note: WebViewGold is not affiliated with the tool’s developer). Different devices will display square or round icons. Therefore, you must include: - 'ic_launcher.png': Used on devices with square icons. - 'ic_launcher_round.png' and 'ic_launcher_foreground.png': Used on devices with round icons. Place all three files in the respective mipmap folders for each resolution (mipmap-hdpi, mipmap-xhdpi, mipmap-xxhdpi, and mipmap-xxxhdpi). The video explains in detail the process to change the icon of your new App, and some recommendations to create it. [Video: https://www.youtube-nocookie.com/embed/TDDH_yaZxoI] ## Splash Screen (Android) URL: https://www.webviewgold.com/docs/android/splash-screen/ Summary: Customize the splash/launch screen of your Android WebView app with your own graphics. Customize the splash screen behavior by configuring the following variables in `Config.java`: Option Type Description SPLASH_SCREEN_ACTIVATED true or false Set to true to activate the splash screen SPLASH_TIMEOUT number (milliseconds) Delay before showing the loading indicator if the home URL is still loading REMAIN_SPLASH_OPTION true or false When true, keeps the splash screen visible until the home URL has fully loaded (overrides `SPLASH_TIMEOUT`) SPLASH_MIN_TIME number (milliseconds) Minimum display duration when `REMAIN_SPLASH_OPTION` is true; ignored if the actual load time exceeds this value SPLASH_FADE_OUT number (milliseconds) Fade-out animation duration after all timers; set to 0 to disable the fade effect SCALE_SPLASH_IMAGE percentage [0–100] Scale the splash image relative to the device's smallest dimension; 0 hides the image Replacing the Splash Screen Image - Replace `splash.gif` in your assets with your own square GIF (e.g., 128×128, 512×512, or 1024×1024 px) - Ensure the image dimensions are equal (width = height) for optimal display - Set the background color in `colors.xml` The steps to add a custom splash screen to your android app are shown in the video below: [Video: https://www.youtube-nocookie.com/embed/x684JHvW8lI] ## Navigation Drawer & Bottom Navigation Footer (Android) URL: https://www.webviewgold.com/docs/android/navigation-drawer/ Summary: Ship an app-like navigation experience with the built-in Material navigation drawer and Material 3 bottom navigation bar — no changes to your website required. WebViewGold ships two built-in native navigation UIs so you can offer an app-like navigation experience without touching your website: a side Navigation Drawer and a Material 3 Bottom Navigation Footer. Both are optional and can be combined or used independently. 1. Side Navigation Drawer A floating menu button opens a Material navigation drawer with your links. Enable it in Config.java: ``` static boolean ENABLE_NAVIGATION_DRAWER = true; ``` Configure the entries and icons in: ``` app/src/main/res/menu/menu_drawer.xml ``` Each `` becomes a drawer row and, when tapped, navigates the WebView to the URL you associate with it. 2. Bottom Navigation Footer A Material 3 bottom-navigation bar sits at the bottom of the screen and switches between your top-level sections. Enable it in Config.java: ``` static boolean ENABLE_NAVIGATION_FOOTER = true; ``` The same file (`res/menu/menu_drawer.xml`) drives the entries — pick 3–5 top-level destinations. Behavior: - Both UIs respect the device's dark/light mode automatically. - Icons and labels come from your menu XML. - Tapping an entry loads the associated URL in the main WebView, so your web app never leaves the app shell. Reference: Material 3 navigation bar guidelines (https://m3.material.io/components/navigation-bar/overview). ## URL Handling API (Android) URL: https://www.webviewgold.com/docs/android/url-handling/ Summary: Decide which links open inside your Android app, in Chrome Custom Tabs, or in the external browser. To improve user experience, it's often beneficial to customize how your app handles different types of web links. For example, social media buttons can be configured to open in the system browser or respective app, rather than within your app. WebViewGold provides flexible settings to customize URL handling for your WebView-based Android app: Types of Links: - External Links: Links that lead to a different domain from your app's primary domain. - Example: If your app's domain is mydomain.com, an external link would be google.com. - Internal Links: Links that stay within the same domain as your app. - Example: If your app's domain is mydomain.com, an internal link would be mydomain.com/purchase. - Special Links: Links that include special attributes, such as target="_blank" or links ending with #. Link Handling Options: You can configure link behavior by modifying settings in the Config.java file as shown below. External Link Handling: - Default Option (0): To open external links in the main WebView (the same as internal links), set `EXTERNAL_LINK_HANDLING_OPTIONS` to `0`. - Option 1: To open external links in a new in-app tab, set `EXTERNAL_LINK_HANDLING_OPTIONS` to `1`. - Option 2: To open external links in the device's default system browser (e.g. Chrome, Safari), set `EXTERNAL_LINK_HANDLING_OPTIONS` to `2`. Special Link Handling: - Option 0: To open special links in the app's main WebView, set `SPECIAL_LINK_HANDLING_OPTIONS` to `0`. - Option 1: To open special links in a new in-app tab, set `SPECIAL_LINK_HANDLING_OPTIONS` to `1`. - Option 2: To open special links in the device's default system browser (e.g. Chrome, Safari), set `SPECIAL_LINK_HANDLING_OPTIONS` to `2`. Note: This setting with override `EXTERNAL_LINK_HANDLING_OPTIONS` for links that are both external and special. Customizing Link Access: Whitelist and Blacklist To create exceptions for specific sites or pages, open Config.java and add the domain to one of the following arrays: - BROWSER_WHITELIST: Lists specific domains to open within the app's WebView. - BROWSER_BLACKLIST: Lists specific domains to open in the external browser. For detailed guidance on link configuration for your Android app, watch the video tutorial provided below: [Video: https://www.youtube-nocookie.com/embed/lq7jgaB6TxY] ### URL Handling – Using the In-App Browser for Specific Links Some links, like a Terms and Conditions page, may not be significant enough to open in an external system browser yet too specific for your app's primary WebView. WebViewGold provides a creative solution for handling these links: an in-app browser tab that opens over the main WebView, providing a hybrid app and browser experience. Here's what it will look like: Key Features of the In-App Browser Tab: - The in-app browser tab includes an address bar and navigation buttons, offering a more browser-like experience than the primary WebView. - Ideal for content that requires easy navigation, such as tutorials, knowledge bases, or pages with specific information. How to Use the In-App Browser Tab in Your WebView-Based Android App: To open a link in the in-app browser tab, format the URL in your HTML as follows: ``` Open Example Page ``` Example: To open Google, use: ``` Open Google ``` Testing Link Behavior: To see how your app will handle different types of links, use the following URL as the WebView URL during testing: Test Link: https://www.webviewgold.com/demo/testlinks.php Note: You can also open the same domain in your desktop browser to view the source code and copy the format for your links. ## Custom CSS and JavaScript API (Android) URL: https://www.webviewgold.com/docs/android/custom-css-js/ Summary: Inject custom CSS styles and JavaScript code into any page of your Android WebView app — perfect for app-only tweaks. WebViewGold allows you to customize your app’s appearance and functionality using Custom CSS and Custom JavaScript without modifying the app’s native code. Here’s how to use these features to tailor your app to your brand and user experience preferences. How to Style your WebView-based Android app with Custom CSS: The Custom CSS feature enables you to adjust the look and feel of your app effortlessly: - Add your custom CSS code to the custom.css file. - Save the file to apply these styles across all web pages loaded by your WebViewGold app. Examples of Customization with CSS: - Update colors to match your branding. - Incorporate animations. - Style text, buttons, and other elements. How to Enhance your App's Behavior with Custom JavaScript: With Custom JavaScript, you can personalize your app’s functionality for users without altering the original web app’s remote code: - Add your custom JavaScript code to the custom.js file. - Save the file to apply these scripts across all pages loaded by your app. Examples of Customization with JavaScript - Create alerts or notifications. - Add interactive elements or event-driven actions. - Tailor user interactions and page behavior. For a guided walkthrough, refer to the video tutorial below that demonstrates how to use custom CSS and JavaScript to transform your Android app's aesthetics and interactivity. [Video: https://www.youtube-nocookie.com/embed/9SS59HA9wTc] ## HTML5 Geolocation API (Android) URL: https://www.webviewgold.com/docs/android/geolocation/ Summary: Enable HTML5 geolocation in your Android WebView app and request location permissions properly. The HTML5 Geolocation API enables users to share their location with your app, enhancing features like location-based content. In WebViewGold, the Geolocation API is supported by default once integrated into your web content. Here is how to implement Geolocation tracking into your WebView-based Android app: Setting up HTML5 Geolocation: For basic Geolocation setup, refer to Mozilla's Geolocation Guide for details on how to implement this feature into your website or web app. For a demonstration, visit this W3Schools Geolocation Demo (https://www.w3schools.com/html/html5_geolocation.asp). Enabling Background Location Tracking (Android Only): To enable background location tracking for your WebView-based Android app, follow these steps: - Set permissions in Config.java: - Set `requireBackgroundLocation` to `true` if background location tracking is needed. - Make sure `requireLocation` is also set to `true` to activate any location services. - Adjust permissions in AndroidManifest.xml: - Uncomment the permission blocks for `android.permission.FOREGROUND_SERVICE_LOCATION` and `GPSService`. - Search for these terms within the file to ensure the correct permissions are set. Toggling Background Location Tracking with URL Schemes: Use the following URL schemes to turn background location tracking on or off within your WebView-based Android app: To turn on background location tracking, redirect the user to the following URL: ``` window.location.href = "backgroundlocationon://"; ``` To turn off background location tracking, redirect the user to the following URL: ``` window.location.href = "backgroundlocationoff://"; ``` Note: These URL schemes are specific to WebViewGold for Android and may not work in standard web browsers. To ensure these redirects are only applied for Android app users, consider detecting the User-Agent. ## Push Notifications API (OneSignal, Firebase, Pushwoosh) (Android) URL: https://www.webviewgold.com/docs/android/push-notifications/ Summary: Send push notifications to your Android app users with OneSignal, Firebase, or Pushwoosh — setup, deep links, and per-user targeting explained. Push notifications are notifications that appear on your smartphone without opening the app. These types of messages allow fantastic interaction with customers and users of the app. Your app does not have to be open. This way, your customers do not miss any important news or messages. Push Notifications are suitable for many cases, e.g., for updates to orders, live tickers, or social media community. There must be an internet connection to allow app users to receive push messages. WebViewGold supports multiple ways of reaching your users via push notifications. ### Option 1: Use Local Push Notification JavaScript API You can insert a piece of code (JavaScript) in your website, to define a push notification, which can be shown after your app was closed (while scheduling it during the app is open). This works without OneSignal configuration at all. ``` var title = "Your cart is waiting!"; //notification title var message = "You have left a cart full of dreams and deals behind. Dont leave it feeling abandoned"; //notification message var seconds = 120; //seconds from now on var url = "https://myshop.org/cart.php"; //deep-linking URL window.location.href = "sendlocalpushmsg://push.send?s="+ seconds +"=msg!"+ message +"&!#"+ title +"&!#"+ url +""; ``` It could be used for different situations (countdowns, happy hours (like in the example code), reminders, ...). To cancel all scheduled local push notifications run: ``` window.location.href = "sendlocalpushmsg://push.send.cancel"; ``` ### Option 2: Use Pushwoosh Remote Push Notifications WebViewGold users are eligible for two free months of Pushwoosh! To claim this offer, please email your WebViewGold License to pushwoosh-love@webviewgold.com and you will get a personal reply soon. If you want to use Pushwoosh (https://www.pushwoosh.com) (good choice!) for push notifications in your app, just activate the options in Config.java by setting PUSHWOOSH_ENABLED to true and ensure to also update the Pushwoosh IDs in the string.xml & AndroidManifest.xml files with your own Pushwoosh IDs: Congratulations, your setup is already completed. You're now ready to send push notifications: https://www.pushwoosh.com Want to get each individual user's device ID for personalized push notifications or further processing? Simply set WONDERPUSH_ENHANCE_WEBVIEW_URL to true in Config.java to append ?pushwoosh_id=XYZ to your WebView URL: For example, if your WebView URL is https://www.example.org, WebViewGold will call https://www.example.org?pushwoosh_id=XYZ instead. Remember, only the initial URL request will receive this GET variable, so please save it in a session or a cookie for later use within your linked pages. Alternatively or additionally, you can retrieve & process this information on any page using JavaScript: ``` window.location.href = "getpushwooshid://"; alert(pushwooshplayerid); ``` ### Option 3: Use OneSignal Remote Push Notifications If you want to use OneSignal for configuring Remote Push Notifications, this video tutorial will guide you step-by-step during this process. [Video: https://www.youtube-nocookie.com/embed/0cPNGqMQVm0] After completing this video tutorial, you will be able to easily set up remote push notifications for your mobile application using OneSignal. This will allow you to send out important updates, reminders, or promotional content directly to your users' devices, even if they are not currently using your app. In summary, the process for configuring OneSignal for push notifications is as follows: - Go to the Android Studio and find the OneSignal Options. By default PUSH_ENABLE, PUSH_ENHANCE_WEBVIEW_URL and PUSH_RELOAD_ON_USERID are shown as false, so set them to true. - Open your OneSignal account and select your organization and app name. If you have not created your app on the OneSignal project follow these steps first. [Video: https://www.youtube-nocookie.com/embed/X9jepbGFw7A] Consider that for creating and configuring your OneSignal Account you will need a JSON file. To get this file you must have your Firebase account configured. If you do not have your Firebase configured to get the JSON file, check this additional tutorial. [Video: https://www.youtube-nocookie.com/embed/qAqdhcd3ngs] - Once you have created your OneSignal App, go to the settings section and select Native Android as your platform, then copy the App ID code you obtained. - Open the Android Studio and go to the Gradle Scrip Section and select build,grade (Module:app). - On the section ONE_SIGNAL_APP_ID paste the code you had copied from OneSignal. - Then, generate your APK file and run on a physical device. - Go to OneSignal and your app project select New Message and click on New Push. - Fill out the information required and it's done! You have tested your OneSignal Push Messages. Replace ic_stat_onesignal_default.png to replace the default bell icon fallback of OneSignal push notifications. Do you want to get each individual subscription ID on your server for further processing and individual user push messages? Just activate the PUSH_ENHANCE_WEBVIEW_URL option in Config.java (by switching the value from false to true) in order to append ?onesignal_push_id=XYZ to your WebView URL. If your WebView URL is https://www.example.org, WebViewGold will call https://www.example.org?onesignal_push_id=XYZ instead. Only your FIRST URL request will get that GET variable, so save it in a session or in a cookie to access it on your linked pages. An alternative or additional way would be to retrieve & process the information on any page via JavaScript: ``` window.location.href = "getonesignalplayerid://"; alert(onesignalplayerid); ``` Alternatively, consider turning ` AUTO_INJECT_VARIABLES ` to `true` in Config.java to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. ### Option 4: Use Firebase Remote Push Notifications If you want to use Firebase for configuring Remote Push Notifications, this video tutorial will guide you step-by-step during this process. [Video: https://www.youtube-nocookie.com/embed/X-02iJSBaAQ] In summary, the process for configuring Firebase for push notifications is as follows: 1. Rename package name & create a Firebase project Please rename the package name of your WebViewGold Android app. Then, you have to create a Firebase project in your Firebase Console (https://console.firebase.google.com/). 2. Activate Firebase in WebViewGold In Android Studio, go to Config.java file and turn the FIREBASE_PUSH_ENABLED variable to true. 3. Register your app with Firebase After you created your Firebase project, you can add your WebViewGold app to it. a. In the center of the Firebase console's project overview page, click the Android icon to launch the setup workflow. b. If you've already added an app to your Firebase project, click Add app to display the platform options. Enter your app's package name as changed/defined in this step. Make sure that you enter the package name that your app is using. You cannot add or modify this value after you register your app with your Firebase project. 4. Click the Register app button. 5. Download google-services.json Click Download google-services.json to obtain your Firebase Android config file (google-services.json) and replace the sample file already included in the WebViewGold project by using the Mac Finder or the Windows Explorer: That's it! If you want to use Firebase URL Deeplinking (opens a specific URL when clicking on your notification), please add the desired URL in a Custom Data field (in the Additional options (optional) section) with Key = "url" and Value = {the desired URL}. Do you want to get each individual subscription ID on your server for further processing and individual user push messages? Just activate the FIREBASE_PUSH_ENHANCE_WEBVIEW_URL option in Config.java (by switching the value from false to true) in order to append ?firebase_push_id=XYZ to your WebView URL. If your WebView URL is https://www.example.org, WebViewGold will call https://www.example.org?firebase_push_id=XYZ instead. Only your FIRST URL request will get that GET variable, so save it in a session or in a cookie to access it on your linked pages. An alternative or additional way would be to retrieve & process the information on any page via JavaScript: ``` window.location.href = "getfirebaseplayerid://"; alert(firebaseplayerid); ``` Alternatively, consider turning ` AUTO_INJECT_VARIABLES ` to `true` in Config.java to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. ### Option 5: Use bubble.io Push Notifications [Video: https://www.youtube-nocookie.com/embed/C0HBXlMSK2E] 1. Create a bubble.io app 2. Install the WebViewGold OneSignal Push (https://bubble.io/plugin/webviewgold-onesignal-push-1602240916803x713805488222896100) plugin: https://bubble.io/plugin/webviewgold-onesignal-push-1602240916803x713805488222896100 3. Follow the OneSignal instructions (see above) and the plugin instructions (see here (https://bubble.io/plugin/webviewgold-onesignal-push-1602240916803x713805488222896100) and here (https://www.youtube.com/watch?v=C0HBXlMSK2E)). ## AdMob Ads API (Android) URL: https://www.webviewgold.com/docs/android/admob/ Summary: Monetize your Android app with Google AdMob banner and interstitial ads — configuration and JavaScript triggers. AdMob is a Google service for monetizing mobile apps on iOS and Android platforms. It allows developers to integrate banner, interstitial, and rewarded ads, which are paid by clicks (CPC, Cost-per-Click) or impressions (CPM, Cost-per-Mille). WebViewGold simplifies AdMob integration, enabling quick setup for displaying ads in your WebView-based Android application. Step 1: Open Config.java File To begin, open your app's Config.java file to set ad preferences and activate AdMob functionality. Step 2: Monetize Your App with Native AdMob SDK In Config.java you can: - Enable or disable banner and/or interstitial ads by setting `SHOW_BANNER_AD` to true for banner ads and `SHOW_FULL_SCREEN_AD` to true for interstitial ads. - Define intervals for displaying interstitial ads by changing `SHOW_AD_AFTER_X` to the desired number of website interactions before playing an interstitial ad. Note: Before launching your app, ensure that your unique AdMob IDs are correctly added in the strings.xml file: Step 3: Enable Rewarded Ads - Setting Up Rewarded Ads: - To enable rewarded ads, set `ENABLE_REWARDED_ADS` to `true`. - Use the following link to display a rewarded ad ``` Display Rewarded Advertisement ``` - Once a user completes viewing the ad, WebViewGold triggers the JavaScript function `updateRewardedStatus('true');` for you to handle rewards within your app’s code. - Rewarded Ads as Default: - If you prefer rewarded ads to display by default, set both `USE_REWARDED_ADS_WHERE_POSSIBLE` and `SHOW_FULL_SCREEN_AD` to `true`. This will prioritize rewarded ads over interstitial ads. Additional Resources: For more detailed options, refer to the official AdMob SDK documentation (https://developers.google.com/admob/), but skip the setup instructions as WebViewGold already includes the necessary framework. [Video: https://www.youtube-nocookie.com/embed/vq5FM7n0Syg] You can also dynamically control the ad visibility for a user by calling the following custom URL schemes from your website or app: - `enableads://` – Set ads to be shown again for the current user - `disableads://` – Permanently disables ads for the current user ## Facebook Audience Network Ads API (Android) URL: https://www.webviewgold.com/docs/android/facebook-ads/ Summary: Show Facebook Audience Network banner and interstitial ads in your WebViewGold Android app. The Facebook Audience Network allows mobile app developers to monetize iOS and Android applications by displaying ads. Through WebViewGold, you can easily incorporate Facebook ads into your WebView-based Android app to earn revenue through clicks (CPC) and impressions (CPM). Step 1: Open the Config.java File - To begin, open your app's Config.java file to configure the Audience Network settings. Step 2: Enable Facebook Audience Network Ads - Activate Necessary Configuration Variables: - Set the following variables to `true` in Config.java: - `USE_FACEBOOK_ADS` sets the app to use Facebook Audience Network ads instead of AdMob ads. - `SHOW_BANNER_AD` turns on banner ads for your app. - `SHOW_FULLSCREEN_AD` turns on fullscreen, interstitial ads for your app. - Set `SHOW_AD_AFTER_X` to a desired number of website clicks to show an interstitial ad. - Enter Your Facebook Ad IDs: - Go to `strings.xml` and add your unique Facebook Ad IDs to the corresponding fields. After configuring the above settings and confirming your Ad IDs, your app is now ready to launch with Facebook Audience Network ads enabled. For further details, you may also refer to the official Facebook Audience Network documentation (https://developers.facebook.com/docs/audience-network) for any additional setup or optimization tips specific to your ad strategy. [Video: https://www.youtube-nocookie.com/embed/81wCzuFttic] You can also dynamically control the ad visibility for a user by calling the following custom URL schemes from your website or app: - `enableads://` – Set ads to be shown again for the current user - `disableads://` – Permanently disables ads for the current user ``` Enable Ads Disable Ads ``` ## File Downloader API (Android) URL: https://www.webviewgold.com/docs/android/file-downloader/ Summary: Let users download images, PDFs, and other files from your web app to their Android device. WebViewGold’s Download API allows you to provide document, image, and audio file downloads within your WebView app. The following steps outline how to enable and customize the downloader functionality: 1. Downloading Images: Save images to the camera roll of the user by calling links with savethisimage://?url= prefix: ``` Download Image ``` 2. Downloading PDF Files: Save PDF files by calling links with a .pdf suffix: ``` Download PDF (https://www.example.org/file.pdf) ``` 3. Downloading Music Files: Save music files by simply calling links with a .mp3, .mp4 or .wav suffix: ``` Download MP3 (https://www.example.org/file.mp3) Download MP4 (https://www.example.org/file.mp4) Download WAV (https://www.example.org/file.wav) ``` 4. Customizing Supported File Types: To add additional file formats to the downloader, insert them into the `downloadableExtension` list in Config.java. 5. Enabling Automatic File Downloads: Consider setting the `AUTO_DOWNLOAD_FILES` option in Config.java to enable automatic downloads for files flagged with Content-Disposition HTTP headers, independent of the `downloadableExtension` list. This ensures files are downloaded automatically based on server configurations. ## Native Video with Picture-in-Picture API (Android) URL: https://www.webviewgold.com/docs/android/native-video/ Summary: Play videos natively with Picture-in-Picture support in your Android WebView app. The Native Video API allows your website to launch a video stream in the device’s native player with Picture-in-Picture support. Trigger the native playback by opening a link with the `startnativevideo://videostreamurl=` prefix: ``` Play Video in System Video Player with PiP Support ``` The user can continue watching the video in a floating window while navigating your app or other apps. ## Reset App API (Android) URL: https://www.webviewgold.com/docs/android/reset-app/ Summary: Reset cache, cookies, and local storage of your Android WebView app with a single link or JavaScript call. In certain cases, resetting the app to its initial settings (by clearing cookies and cache) can be necessary to restore optimal performance. The Reset App API provides a straightforward way to initiate this reset. Usage: To reset the app data, simply use the following link within your app: ``` Reset App Link ``` This link will: - Clear all cookies - Clear cached data Testing the Reset Functionality: To test this feature, add the following demo URL to your WebViewGold app: https://www.onlineappcreator.com/reset_test.html Note: Use the reset functionality sensibly, as it will clear user data related to cookies and cache, which could impact saved settings or session data, including logging users out of active sessions. ## Loading Sign API (Android) URL: https://www.webviewgold.com/docs/android/loading-sign/ Summary: Show or hide the native loading indicator on demand and customize the loading experience of your Android app. WebViewGold’s native Android loading indicator automatically appears when pages start or finish loading. However, you can also manually control the loading indicator for scenarios outside standard page loading events. This is particularly useful for processes where user awareness of loading is necessary, such as: - Waiting in a live chat queue - Running a background process on a cloud server - Visualizing any other extended process for user awareness Usage: To manually control the loading indicator for your WebView app, use the following links: ``` Show the loading spinner Hide the loading spinner ``` ## Clipboard API (Android) URL: https://www.webviewgold.com/docs/android/clipboard/ Summary: Copy text to the Android clipboard and read clipboard content from your web app via JavaScript. The WebViewGold Clipboard API provides a simple and secure way to access the device clipboard contents from within your WebView-based app. This serves as an alternative to relying on native WebView clipboard access, offering more reliability across platforms and updates. Use Cases: - Pre-filling form fields with copied data - Enhancing user flows in authentication, note-taking, or sharing apps - Creating quick paste features or clipboard history tools How to Retrieve Clipboard Content: To access the clipboard data, use the following call: ``` Get Clipboard Data Show Clipboard Data ``` - Get Clipboard Data: Triggers the native clipboard read functionality. - Show Clipboard Data: Displays the result stored in the `clipboarddata` JavaScript variable. Technical Note: Once `getclipboard://` is triggered, WebViewGold automatically injects the clipboard content into the `clipboarddata` JavaScript variable on the page, making it accessible for any further actions. ## UUID API (Android) URL: https://www.webviewgold.com/docs/android/uuid/ Summary: Identify app installations with a unique UUID appended to your WebView URL or retrieved via JavaScript. The WebViewGold UUID API allows you to retrieve a non-personal, unique device ID (UUID - "Universally Unique Identifier") via JavaScript, which can uniquely identify an Android device. This feature can be helpful for: - Storing user-specific settings on the server - Maintaining session states - Recalling saved data on the client side Privacy Note: Ensure compliance with local and international privacy laws when using this feature, as it involves device identification. How to Retrieve UUID: To retrieve the UUID from your WebView-based app, use the following code: ``` Get UUID Show UUID ``` - Get UUID: Requests the UUID from WebViewGold. - Show UUID: Displays the UUID via an alert for easy testing. Alternative Method: Append the UUID to the WebView URL If you prefer to include the UUID in the URL parameters, enable the `UUID_ENHANCE_WEBVIEW_URL` option in Config.java by setting it to `true`. This will automatically append `uuid=XYZ` to your WebView URL on the first request, allowing you to access the UUID directly in your web content: - Example: If your WebView URL is `https://www.example.org`, it will be requested as `https://www.example.org?uuid=XYZ`. - Note: Only the initial URL request will include this GET parameter, so consider saving it in a session or cookie if you need to reference it later in the app. Automatically Inject UUID into JavaScript: To automatically make UUID (and other variables) available in JavaScript across all pages without modifying URLs, set `AUTO_INJECT_VARIABLES` to `true` in Config.java. This allows you to access the UUID and other values directly within any page. ## Flashlight API (Android) URL: https://www.webviewgold.com/docs/android/flashlight/ Summary: Control the device flashlight from your web app with simple JavaScript links in WebViewGold for Android. The Flashlight API of WebViewGold allows your website to control the device's flashlight (torch). This feature can be useful for: - Building utility apps that require the flashlight toggle - Upgrading user experience during app usage with gamification - Providing additional accessibility features How to Use: You can trigger the flashlight on or off directly from your HTML content using the following links: ``` Turn On Flashlight Turn Off Flashlight ``` Note: Make sure your app has the required camera permissions in AndroidManifest.xml, as the flashlight functionality is tied to the device's camera hardware. ## App Links & Deep Linking API (Android) URL: https://www.webviewgold.com/docs/android/app-links/ Summary: Open links to your domain directly in your Android app with App Links and custom URL scheme deep linking. The WebViewGold App Links / Deeplinking API enables users to open specific pages in your app from external sources like email, social media, or messaging apps. WebViewGold for Android supports two deep linking methods: - Standard URL-based Deep Links: e.g. `https://www.example.org/subpages/example1` - Custom Scheme Deep Links: e.g. `webviewgold://https://www.example.org/subpages/example2` ### Step 1: Configure Your Link Scheme in AndroidManifest.xml To support standard deep linking, configure your AndroidManifest.xml to associate your domain with your app. Replace `www.webviewgold.com` with your actual domain (e.g., `www.example.org`): ### Step 2: Enable Deep Linking in Config.java In your Config.java file, enable deep linking features: ``` // Enables standard deep linking (https:// links) public static final boolean IS_DEEP_LINKING_ENABLED = true; // Enables custom scheme deep linking (e.g., webviewgold://) public static final boolean IS_CUSTOM_SCHEME_ENABLED = true; // Set your desired scheme prefix (must match AndroidManifest.xml) public static final String CUSTOM_DEEPLINK_SCHEME = "webviewgold"; ``` ### Step 3: Verify Domain Ownership (for URL-based Deep Links) To enable deep linking using HTTPS URLs, you must verify domain ownership with Google. Follow the Google Site Verification Guide (https://developer.android.com/training/app-links/verify-android-applinks). ### Testing Your App Links You can test both types of links via Android Studio or terminal: - Using Android Studio: Open the App Links Assistant from the Tools menu for simulation and troubleshooting. - Using Terminal or Command Prompt: - Run the following command: ``` adb shell am start -a android.intent.action.VIEW -d "webviewgold://https://www.example.org/subpages/example2" com.webviewgold.myappname ``` - Replace `com.webviewgold.myappname` with your actual app package name. - You can also test with a URL link like `https://www.example.org/subpages/example1`. Once everything is set up, users can open your app directly to any specific page using deep links like: - `https://www.example.org/subpages/example1` - `webviewgold://https://www.example.org/subpages/example2` Questions? Ping us anytime! ## ShareIntent API (Android) URL: https://www.webviewgold.com/docs/android/share-intent/ Summary: Receive content shared from other Android apps directly in your WebView app via Share Intents. The WebViewGold ShareIntent API enables your app to appear as a target in Android’s native Share dialog. This allows users to share content such as text, URLs, or images (as base64 strings) from any other app directly into your WebView-based app. Use Cases: - Sharing links to user profiles, notes, or articles directly into your app - Receiving content from messaging or browser apps - Sending images from the gallery to your WebView interface (base64-encoded) ### Step 1: Enable Sharing Support in AndroidManifest.xml To allow your app to receive shared data, uncomment the relevant intent filters in your AndroidManifest.xml file: ``` ``` Once these filters are active, your WebViewGold-based app icon will appear as a sharing target whenever users share content from another app. ### Step 2: Handle Shared Data in Your WebView When a user shares content to your app, WebViewGold will automatically inject the shared content into a JavaScript variable named `sharedData`. ``` alert(sharedData); // Displays the shared content (text or base64 image) ``` - Text or URL: Will be passed as plain text into `sharedData` - Image: Will be converted to a base64-encoded string and passed into `sharedData` Example Use: Automatically populate a form or preview an image based on the received content: ``` if (sharedData) { document.getElementById("myInput").value = sharedData; } ``` Note: Ensure that your JavaScript is ready to handle both plain text and long base64 strings. You may also implement client-side checks to distinguish between different content types. ## App Sharing Dialog API (Android) URL: https://www.webviewgold.com/docs/android/app-sharing-dialog/ Summary: Trigger the native Android share dialog from your web app to let users share your app or any URL. The App Sharing Dialog API in WebViewGold enables your users to share content from your app, such as the download link or custom messages, with friends and family via their preferred apps (e.g. WhatsApp, SMS, Email). This can be an effective way to increase your app’s visibility and grow your user base. How to Use the App Sharing Dialog in Your WebView-Based Android App You can trigger a native sharing dialog by using the `shareapp://` URL scheme with customizable message and URL parameters. Below are examples of the different ways to implement this feature: ``` Share (message, link)Share (no message, link)Share (message, no link) ``` ## In-App Purchases API (Android) URL: https://www.webviewgold.com/docs/android/in-app-purchases/ Summary: Sell digital goods and subscriptions in your Android WebView app with Google Play Billing. Within some apps, you can buy additional content or services. These kinds of purchases are called "in-app purchases". They can be an attractive source of revenue for developers and are very convenient for customers as they use existing accounts and payment sources for settlement. WebViewGold allows triggering Google Play In-App Purchases. Make sure to own an Extended License of WebViewGold if you plan to use this feature in an end product. Need to upgrade? Learn how to upgrade here (https://help.market.envato.com/hc/en-us/articles/115005593503-If-I-choose-the-wrong-license-or-need-to-upgrade-my-license-how-easy-is-it-to-change-to-the-correct-license). Option 1 (Default): RevenueCat Create your free RevenueCat account (https://tinyurl.com/register-revenuecat) to get started. Pricing information is available on their website. Then set up RevenueCat by following their setup wizards and documentation (pricing details are available on their website (https://tinyurl.com/register-revenuecat)). Afterwards, add your details to Config.java. This approach also supports the 15% Service Fee Tier Program (https://support.google.com/googleplay/android-developer/answer/112622?hl=en) of the Google Play Store and Apple's Small Business Program (https://developer.apple.com/app-store/small-business-program/). If you participate in these reduced-fee programs, inform RevenueCat via their Apple Small Business Program (https://www.revenuecat.com/docs/platform-resources/apple-platform-resources/app-store-small-business-program) or Google 15% reduced service fee (https://www.revenuecat.com/docs/platform-resources/google-platform-resources/15-reduced-service-fee) pages. This is how setup in Config.java looks like: ``` public static final String REVENUECAT_API_KEY = "xxxxxxxsxxxxxxxxxxxxxxxxxxxxxxxxxx"; //Your RevenueCat API Key (sign up via tinyurl.com/register-revenuecat first, then follow tinyurl.com/api-key-revenuecat how to find it) public static final String REVENUECAT_PROJECT_ID = "xxxxxxx"; //Your RevenueCat Project ID (sign up via tinyurl.com/register-revenuecat first, then follow tinyurl.com/project-id-revenuecat how to find it) ``` Ensure your package name on the APK and Google Play Console matches the project configured in RevenueCat. Trigger a purchase or subscription using: ``` revenuecat://purchase?external_id=user_123&product=sub_30_days ``` `external_id` = User identifier, e.g., your customer email or user ID. `product` = ID displayed on the RevenueCat console. It works for both Android & iOS. Option 2: Manual (Non-RevenueCat) We are committed to helping our WebViewGold customers achieve success, and we want to bring your attention to the 15% Service Fee Tier Program of the Google Play Store and Apple's Small Business Program. These programs allow eligible developers to qualify for a 15% commission, a significant reduction from the standard 30%. It's quick and easy to apply, and can potentially save you 50% in fees by reducing the Google and Apple commission rates from 30% to 15%. Once approved, you'll receive the reduced commission rate for all paid apps and in-app purchases made by customers on the respective stores. To learn more about the Google Play program, click here (https://support.google.com/googleplay/android-developer/answer/112622?hl=en), and for the Apple program, visit here (https://developer.apple.com/app-store/small-business-program/). After setup, for in-app purchase products just link to this kind of URL: ``` Buy In-App Purchase ``` - The "package" is the product identifier of the item you want to sell. - The "successful_url" is the URL you want the app to load once the purchase is complete. - You may want to save a cookie on this page so that your web app remembers that the purchase has been made. - Include "disableadmob=true" if you would like to disable ads after the purchase of the product. - To enable the user to be charged again for the same in-app purchase product (if bought another time), set the attribute "consumable" to true. On the other hand, if you want to prevent the user from being charged again for the same product (if bought another time), set "consumable" to false or omit it altogether (since false is the default value). Make sure to use WebViewGold for Android v12.5 or newer. Alternatively, use this kind of URL for in-app subscription products: ``` Start In-App Subscription ``` - The "package" is the product identifier of the subscription you want to sell. - The "successful_url" is the URL you want the app to load once the purchase is complete. - You may want to save a cookie on this page so that your web app remembers that the subscription has been activated. - The "expired_url" is the URL you want the app to load when the subscription is no longer valid. - You may want to update/delete a cookie on this page so that your web app remembers that the subscription has been deactivated. In this URL example, https://www.google.com should be called after the successful subscription activation, and https://www.yahoo.com should be called as soon as the subscription is expired. You can identify the user server-side. e.g., the site /buy_now.php redirects to In-App-Purchase API and that API redirects to /thanks.php, you can still access the user/session cookies server-sided and identify the user who just bought that In-App-Purchase. In this use case, please make sure that you deactivate the CLEAR_CACHE_ON_STARTUP in the Config.java file in order to keep cookies activated by the In-App Purchase process. Managing/canceling subscriptions: WebViewGold for Android can link directly to the Play Store’s subscriptions management screen – just point your link to `cancelinapppurchase://`: ``` Manage/cancel subscription in Google Play ``` Restoring purchases: WebViewGold for Android provides a simple way to restore in-app purchases made by users. E.g., useful for scenarios where users reinstall the app or switch devices and need to regain access to their purchased content: ``` Restore ``` Server-Side Verification: Additionally or alternatively, WebViewGold also allows you to handle In-App Purchase or Subscription data from a server-side. After a successful transaction, the following JavaScript variables are created and injected into the webpage by WebViewGold: 1. planID: Contains the Product ID 2. transactionIdentifier: Contains the unique Transaction ID 3. subreceipts: Contains unique receipt IDs for the user’s subscriptions These variables can be accessed directly on the webpage for server-side storage and validation. Note that these variables are injected directly into the global window object after a transaction. Make sure your JavaScript is executed on the same page where the variables are accessible. Add appropriate fallback mechanisms if the variables are not available within the expected time frame (as shown in the timeout implementation). Sending these variables to your server allows you to validate subscriptions and transactions securely using Apple’s receipt validation API or your chosen method. Here’s an example JavaScript implementation: ``` // Utility function to wait for a variable to be defined function waitForVariable(variableName, callback, timeout = 5000) { const startTime = Date.now(); (function checkVariable() { if (window[variableName] !== undefined) { callback(window[variableName]); } else if (Date.now() - startTime < timeout) { setTimeout(checkVariable, 100); } else { console.error(`Timeout: ${variableName} was not set within ${timeout} ms`); } })(); } // Example: Handling In-App Purchase/Subscription variables waitForVariable("planID", function(planID) { console.log("planID:", planID); // Send the Product ID to your server sendToServer("planID", planID); }); waitForVariable("transactionIdentifier", function(transactionIdentifier) { console.log("transactionIdentifier:", transactionIdentifier); // Send the Transaction ID to your server sendToServer("transactionIdentifier", transactionIdentifier); }); waitForVariable("subreceipts", function(subreceipts) { console.log("subreceipts:", subreceipts); // Send Subscription Receipt IDs to your server sendToServer("subreceipts", subreceipts); }); // Function to send data to your server for validation function sendToServer(key, value) { fetch("https://example.com/api/validate", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ [key]: value }) }) .then(response => response.json()) .then(data => console.log(`Server Response for ${key}:`, data)) .catch(error => console.error(`Error sending ${key}:`, error)); } ``` Localized Pricing / Get Store Location: The `getstorelocation://` URL scheme injects the Play Store location into a JavaScript variable. When `getstorelocation://` is called/linked, the WebViewGold wrapper retrieves the Play Store's country code, if available. Alternatively, consider setting `autoInjectVariable` to `true` in the configuration file to automatically inject this (and other) values into JavaScript without needing a URL call. The country code is then injected into a JavaScript variable `storeLocation` for further use by your web app (e.g., for displaying localized pricing). If the code is not available, `storeLocation` will be set to `null`: - If successful (example United States): `var storeLocation = 'US';` - If no country code is found: `var storeLocation = null;` Note: As with any technology, it is essential to mention that also while using our API, there is a risk that some (technically savvy) users may be able to access the restricted content without paying for it. This could, for example, occur through retrieving and opening the Success URL link directly, by uninstalling the app while afterward canceling subscription products so that the Expiration URL never gets called (to minimize this risk, you can, therefore, occasionally request reauthorizations) or by using withdrawal rights and/or chargeback processes of credit cards. However, it is worth noting that some kind of risk is present with any sort of digital approach. In general, our API is a practical and easy-to-integrate approach for delivering paid content to app users, and we continue to work on ways to reduce risks further. The use of our API is still at your own risk and without warranty, but overall, while it is essential to be aware of the risk of unauthorized/unpaid access to content, the benefits of using our API far outweigh the risks for most users. It is recommended to track and compare the sales data of the Google Play Store Developer Console with server-side activations of in-app purchase products to ensure accurate revenue reporting and identify any potential discrepancies. ## In-App Purchase History API (Android) URL: https://www.webviewgold.com/docs/android/iap-history/ Summary: Return the user's Google Play purchase history as window.purchaseHistory so your web app can list subscriptions or unlock premium content client-side. The In-App Purchase History API returns the list of the user's previous purchases (product IDs, timestamps, tokens) made through Google Play Billing and injects it into your web app as `window.purchaseHistory`. Make sure to own an Extended License of WebViewGold if you plan to use this feature in an end product. How to Use: ``` My purchases function renderHistory() { const data = window.purchaseHistory; if (!data) return; data.purchases.forEach(function (p) { console.log(p.productId, p.purchaseTime, p.orderId); }); } ``` Payload Shape: ``` { "purchases": [ { "productId": "com.example.premium", "purchaseTime": 1721600000000, "orderId": "GPA.xxxx-xxxx-xxxx", "purchaseToken": "..." } ] } ``` Exact fields depend on the store record — treat the value as a JSON array to iterate. Typical Use Cases: - Show a "My subscriptions" or "My purchases" page inside your web app. - Client-side unlock of premium content based on past purchases without hitting your backend. - Debugging and customer-support workflows. Notes: The list contains only purchases made under the currently signed-in Google Play account on this device. ## QR Code Scanner API (Android) URL: https://www.webviewgold.com/docs/android/qr-code-scanner/ Summary: Open a native QR code scanner from your web app and process scan results via URL or JavaScript. To trigger the QR code scanner within your WebView-based Android app, use the following HTML link format: ``` Scan QR Code ``` Clicking this link will open the device’s camera to scan a QR code, and any URL encoded in the QR code will load automatically within the WebView. Use Cases: - Bridging print and digital content (e.g., scanning a QR code from a magazine to open a webpage). - Quick access to promotions, product information, or events. - Securely linking users to internal app resources or specific landing pages. ## Scanning Mode API (Android) URL: https://www.webviewgold.com/docs/android/scanning-mode/ Summary: Fine-tune the camera scanning behavior of the QR and barcode scanner in WebViewGold for Android. If your web app presents information on the screen to be scanned (for example, a QR code), it can be helpful to turn the screen brightness up to 100% and to prevent the screen from sleeping. WebViewGold provides the Scanning Mode API to dynamically enable these optimal scanning conditions. This API includes 3 commands: - "auto" = turns on scanning mode and automatically turns it off on page redirect. - "on" = turns on scanning mode, stays on after page redirects. - "off" = turns off scanning mode. Link to these kinds of URLs to use the Scanning Mode API: ``` Enable Scanning Mode; will automatically disable on page redirect.Enable Scanning Mode; will persist until manually disabled.Disable Scanning Mode. ``` ## Barcode Scanner API (Android) URL: https://www.webviewgold.com/docs/android/barcode-scanner/ Summary: Scan EAN, UPC, and other barcodes natively in your Android WebView app and hand results to your web app. The WebViewGold Barcode Scanner API enables your WebView-based app to activate the device camera for scanning barcodes. Once a barcode is successfully scanned, the result is automatically passed back into your web content. Use Cases: - Scanning product barcodes for inventory systems - Processing tickets or access codes in logistics or event apps - Enabling fast data capture from printed barcodes How to Trigger the Scanner: Use the following HTML to start the native barcode scanner: ``` Start Barcode Scanner Show Scan Result ``` - Start Barcode Scanner: Opens the device camera to detect supported barcode formats - Show Scan Result: Displays the scanned barcode content stored in the `barcodescanresult` JavaScript variable Technical Note: After scanning, the decoded barcode value is injected into the current page via the `barcodescanresult` JavaScript variable. You can use this variable to auto-fill forms, trigger custom logic, or perform lookups based on scanned data. Permissions: Make sure the app has access to the device camera, as it is required for barcode scanning to function properly. ## Take Screenshot API (Android) URL: https://www.webviewgold.com/docs/android/take-screenshot/ Summary: Capture a screenshot of the current app screen programmatically and share or save it — via JavaScript. The screenshot API of WebViewGold allows you to take screenshots programmatically from the WebView content and save them to the Photos gallery of your app user. One possible use case for this API is, for example, to programmatically save a screenshot of your e-tickets (for festivals, travels, …) of your web app so that they can be shown when the user is offline and cannot access the WebView content (e.g., while being in a festival location, on a train ride, …). Link to this kind of URL to trigger a screenshot: ``` Save ``` ## App Version Check API (Android) URL: https://www.webviewgold.com/docs/android/app-version-check/ Summary: Detect the installed app version from your web app and prompt users to update when needed. Using this WebViewGold App Version Check API, your website/web app can retrieve the version of the Android app being used by your Android app user. This API is especially helpful if you want to notify users of an older version to update their app. Moreover, you can hide web app sections that require app features supported by a specific app version. Use JavaScript to this kind of URL to read and alert the app version and app bundle number: ``` window.location.href = "getappversion://"; alert(versionNumber); alert(bundleNumber); ``` Alternatively, consider turning ` AUTO_INJECT_VARIABLES ` to `true` in Config.java to automatically inject this (and other) values into JavaScript without needing to call a URL upfront. ## Contacts API (Android) URL: https://www.webviewgold.com/docs/android/contacts/ Summary: Access the device address book from your web app: read contacts with user permission in WebViewGold for Android. WebViewGold allows for the export of contacts into a JavaScript variable, in the format below via the readcontacts:// API. The JSON object is stored in the `contacts` variable. In order to access this, your app must first gain permission through the requestcontactpermission:// API, which will prompt your user to enable contact permissions. Without completing this step, the readcontacts:// will populate the `contacts` variable with a null value. Example output stored in JS `contacts` variable: ``` { "John Appleseed":[ "888-555-5512", "888-555-1212" ], "Daniel Higgins":[ "555-478-7672", "(408) 555-5270", "(408) 555-3514" ], "David Taylor":[ "555-610-6679" ], "Hank Zakroff":[ "(555) 766-4823", "(707) 555-1854" ] } ``` In order to add this contact functionality, the `android.permission.READ_CONTACTS` permission needs to be added to the AndroidManifest.xml file so the permission can be granted by users. ## Dynamic UI API (Android) URL: https://www.webviewgold.com/docs/android/dynamic-ui/ Summary: Change native UI elements like the status bar color dynamically from your web app on Android. WebViewGold allows you to dynamically customise the UI elements in your web app. These elements may consist of the status bar, bottom bar (iOS), navigation bar (Android) and pull to refresh (iOS). WebViewGold includes the following commands to dynamically customise these elements: - statusbarcolor:// - The MASTER COMMAND to change the color of the status bar and any other relevant UI features automatically, such as the status bar text color, the bottom bar color (iOS), navigation bar color (Android), etc. - statusbartextcolor:// - Allows you to manually change the text color of the status bar (iOS and Android). - bottombarcolor:// - If a bottom bar (iOS) or navigation bar (Android) UI element exists, allows you to manually change its color. - navbartextcolor:// - Allows you to manually change the text color of the navigation bar on Android. Request will be ignored on iOS (the bottom bar on iOS does not have text). - hidebars:// - Allows you to hide the background of the status and navigation bar. ### Changing the color of the Status Bar (and other UI elements automatically): This feature supports a color input in the following format: - RGB = {red, green, blue} Where the values are integers between 0 (min) and 255 (max). Use JavaScript to this kind of URL to change the color of the status bar: ``` // Example: red window.location.href = "statusbarcolor://255,0,0"; ``` When you change the status bar color, the status bar text will automatically change to a suitable color (white or black) depending on how dark the color is. Optional UI features like Pull To Refresh (iOS), the Bottom Bar (iOS) and the Navigation Bar (Android) will also have their colors automatically adjusted. ### Changing the color of the Status Bar text: If you would like to manually choose the color of the status bar text, you can do so using this option. This feature supports a text input for the following options: - "white" - "black" Use JavaScript to this kind of URL to change the color of the status bar text: ``` // Example: white text window.location.href = "statusbartextcolor://white"; // Example: black text window.location.href = "statusbartextcolor://black"; ``` ### Changing the color of the Navigation Bar: This feature supports a color input in the following format: - RGB = {red, green, blue} Where the values are integers between 0 (min) and 255 (max). Use JavaScript to this kind of URL to change the color of the navigation bar: ``` // Example: red window.location.href = "bottombarcolor://255,0,0"; ``` ### Changing the color of the Navigation Bar text: If you would like to manually choose the color of the navigation bar text, you can do so using this option. Please note that this request will be ignored on iOS. This feature supports a text input for the following options: - "white" - "black" Use JavaScript to this kind of URL to change the color of the navigation bar text: ``` // Example: white text window.location.href = "navbartextcolor://white"; // Example: black text window.location.href = "navbartextcolor://black"; ``` ### Hiding the status and bottom bars The hidebars functionality can either be on or off. Note, the status bar text, such as the time and battery percentage do not remain visibile to the user. However, these can be brought back to view with a user swipe from the top. Use JavaScript to change the visibility status of the status and navigation bar: ``` // Example: hide the bars from view window.location.href = "hidebars://on"; // Example: redisplay the bars after being hidden window.location.href = "hidebars://off"; ``` ## Haptic Feedback API (Android) URL: https://www.webviewgold.com/docs/android/haptic-feedback/ Summary: Trigger native vibration haptic feedback from your web app for a native app feeling on Android. WebViewGold allows for the implementation of native Android haptic control within your web app. Using our API, you are able to perform the following actions: Light Impact lighthaptic:// Used for a collision between small, light UI elements Heavy Impact heavyhaptic:// Used for a collision between large, heavy UI elements Success Notification successhaptic:// Indicates a task or action has been successfully completed Warning Notification warninghaptic:// Indicates a task or action has produced a warning of some kind Error Notificiation errorhaptic:// Indicates that an error has occurred An example of how this API can be utilised can be seen below, with an anchor tag and custom javascript function which interact with our haptic API. ``` Navigation Link with Haptics function lightHaptic(url) { if (isWebViewBrowser) { window.location.href = url; loadInnerHref("lighthaptic://"); } else { window.location.href = url; } } function loadInnerHref(url) { iFrame = document.createElement("iframe"); iFrame.setAttribute("src", url); document.body.appendChild(iFrame); iFrame.parentNode.removeChild(iFrame); iFrame = null; } ``` Click here (https://webviewgoldtest.github.io/hapticFeedback.html) to view a demonstration web page for this feature. Inspect the page to view the example code. ## NFC Plugin (Android) URL: https://www.webviewgold.com/docs/android/nfc/ Summary: Read NFC tags natively in your Android WebView app and pass tag data to your web app. Near-Field Communication (NFC) enables two devices or a device and an NFC tag to communicate wirelessly when in close proximity. NFC is widely used on Android devices for reading and writing small amounts of data, making it an effective tool for sharing information via NFC-enabled cards or tags. Since Android Nougat (7.0), the Android NFC API has allowed developers to read and write data to NFC tags directly from app code. This opens up new ways for apps to interact with users, from sharing contact information to embedding text snippets. NFC is particularly useful for Android WebView apps, where a JavaScript bridge enables NFC functionality within the app interface. WebViewGold NFC Plugin Integration While NFC is not included in WebViewGold’s standard feature set, we offer a custom NFC plugin integration on an individual basis that supports JavaScript-based NFC interactions. Please send us your requirements (e.g., writing/reading text snippets and/or contact card details to/from NFC tags) via an email to webviewgold-nfc@onlineappcreator.com for a free consultation and a non-binding quote. ## Open App Settings API (Android) URL: https://www.webviewgold.com/docs/android/open-app-settings/ Summary: Send the user straight to the system App-info screen from your web app to manage permissions, notifications, storage, or force-stop your Android app. The Open App Settings API of WebViewGold sends the user straight to the system App info screen for your app. From there they can manage permissions, notifications, storage, or force-stop the app — without leaving your web app to hunt through Android Settings. How to Use: Trigger the screen from an HTML link or from JavaScript: ``` Open app settings ``` ``` window.location.href = "settingsapp://"; ``` Typical Use Cases: - The user denied a permission (camera, microphone, location, notifications) — send them straight to the system screen to re-enable it. - Guide the user to disable battery optimization or clear cache from the OS side. Notes: No parameters. Any URL that starts with `settingsapp://` triggers the same screen. Works on all supported Android versions. ## Reconnect API (Android) URL: https://www.webviewgold.com/docs/android/reconnect/ Summary: Reload the last online URL from your offline / fallback HTML page — the perfect "Try again" button for your custom offline screen. The Reconnect API reloads the last online URL the user was on before your app fell back to the offline HTML page. It is designed as a "Try again" button on your custom offline / fallback screen. How to Use: Add the trigger to your offline page (typically `local-html/index.html`): ``` Try to reconnect ``` How It Works: The app remembers the last non-helper URL that was loaded successfully. When the user taps `reconnect://`, the WebView navigates back to that URL. If connectivity is still down, your fallback page is shown again. Related Config: - `FALLBACK_USE_LOCAL_HTML_FOLDER_IF_OFFLINE` in Config.java must be `true`, and you need a `local-html/index.html` fallback page for this feature to make sense. ## Read/Write Value API (Android) URL: https://www.webviewgold.com/docs/android/read-write-value/ Summary: Persist small strings on the device from JavaScript and read them back — for theme, language, session tokens, or onboarding state. The Read/Write Value API persistently stores an arbitrary string on the device (via the app's private storage) and reads it back into your JavaScript. Values survive app restarts and cache clears — unless the OS wipes app data. Writing a Value: Everything after `writevalue://` is stored verbatim as one string. Design your own format (query-string, JSON, CSV — whatever fits your web app): ``` Save ``` Reading a Value: When `readvalue://` is triggered, the app injects the stored string back into the WebView so your JavaScript can read it: ``` Load function showSettings() { console.log(window.appSettings || "no settings yet"); } ``` Typical Use Cases: - Remember a user's theme, language, or onboarding state offline. - Cache a session token when you cannot rely on cookies. - Persist a small local preference without a backend round-trip. Notes: Values are per-app-install and per-device — they are not synced across devices. Keep values small; this API is intended for settings, not blob storage. ## Biometric Authentication API (Android) URL: https://www.webviewgold.com/docs/android/biometric-auth/ Summary: Prompt fingerprint or face authentication with the native Android BiometricPrompt directly from your web app. The Biometric Authentication API prompts the user for fingerprint or face authentication using the device's native `BiometricPrompt`. If the OS is configured that way, it falls back to the device PIN or pattern. How to Use: Trigger the system dialog from an HTML link or from JavaScript: ``` Unlock ``` ``` window.location.href = "bioauth://"; ``` Typical Use Cases: - Gate access to a "wallet", "settings", or "orders" page inside your web app. - Require re-authentication before a sensitive checkout step. Behavior: - The system dialog is drawn by the app — your web app does not need to render any UI. - After a successful authentication the app resumes normally so your web app can react (e.g. by navigating to the protected page). - On some devices without biometrics, the OS may show a PIN prompt instead. Related Config: `enableBioMetricAuth` in Config.java turns on the built-in App Lock flow that requires biometric auth on every app launch. `bioauth://` is independent of this flag and can be triggered at any time from JavaScript. ## ML Kit Document Scanner (PDF) (Android) URL: https://www.webviewgold.com/docs/android/document-scanner/ Summary: Add a Scan document option to the file upload dialog — the user scans up to 5 pages and your web app receives a PDF like any other upload. The Document Scanner feature adds a Scan document option to the standard file-upload chooser. The user can scan up to 5 pages with the camera; the app produces a PDF and uploads it through the standard `` flow used by your web app. It is powered by Google's ML Kit Document Scanner. How to Enable: Turn the feature on in Config.java: ``` public static final boolean ENABLE_ML_KIT_DOCUMENT_SCANNER = true; ``` Set to `false` to hide the Scan document entry. User Experience: - On your web page, the user taps an ``. - The app shows an upload dialog with entries such as Scan document, Take photo, Capture video, and Choose from gallery (depending on the input's `accept` attribute). - Tapping Scan document launches Google's ML Kit scanner: it detects edges, crops and enhances each page, allows adding more pages, and returns a PDF. - The resulting PDF is fed back into the `` — your web app receives it exactly like any other uploaded file. Notes: Requires Google Play Services (available on all standard Android phones with Play Store). Result format is PDF, maximum 5 pages per scan. Gallery import inside the scanner is allowed by default. ## Printer API (Android) URL: https://www.webviewgold.com/docs/android/printer/ Summary: Send a remote image or PDF to the Android system print dialog — Wi-Fi printers, cloud print, or Save-as-PDF, straight from your web app. The Printer API sends a remote file (image or PDF) to the Android system print dialog, so the user can print it to any configured printer — Wi-Fi, cloud print, or "Save as PDF". How to Use: ``` Print invoice ``` Query Parameters: Name Required Description `printItem` yes Full URL of the file to print (PDF, JPG, PNG, WebP…). `jobName` no Human-readable job name shown in the print dialog. Defaults to `Print Job`. How It Works: - The app downloads the file from `printItem` into a temporary cache. - If it is an image, the file is printed via `PrintHelper` (scaled to fit). - If it is a PDF (or any other document format), it is sent to the Android `PrintManager` with a proper document adapter. - The temporary file is deleted after the job is queued. Notes: The target file must be publicly reachable from the device (the URL must resolve). Users can pick Save as PDF in the print dialog to export a copy. ## Health Connect API (Android) URL: https://www.webviewgold.com/docs/android/health-connect/ Summary: Read and write Android Health Connect records from JavaScript — mirrors the WebViewGold HealthKit API on iOS so one web app covers both platforms. The Health Connect API reads and writes health records via Android Health Connect (https://health.google/health-connect-android/). It mirrors the iOS HealthKit functionality of WebViewGold, so you can ship one web app that talks to health data on both platforms. Reads always return today's totals for the requested record type. Reading a Record: ``` My steps today function show() { // Injected variable name matches the sanitized record name. alert(StepsRecord); // e.g. "8421.0 steps" } ``` Writing a Record: Format: `writehealthkit:////` ``` Log 1000 steps ``` On success the app injects ` = "WRITE_SUCCESS"`. On failure it injects the error text. Supported Records: Any Health Connect record type your app has requested permission for. Common ones: - `StepsRecord` - `HeartRateRecord` - `WeightRecord` - `SleepSessionRecord` - `HydrationRecord` - `ActiveCaloriesBurnedRecord` - `DistanceRecord` Setup: - Install Health Connect on the device (pre-installed on Android 14+). - On first use the app opens the Health Connect permission dialog; the user grants read and/or write for the requested record types. - If Health Connect is not supported, the injected value falls back to the string `"Health Connect not supported"`. Notes: Values are returned as `" "` (e.g. `"75.4 kg"`). Requires Android 8.0 (API 26) or higher. ## Firebase Crashlytics (Android) URL: https://www.webviewgold.com/docs/android/crashlytics/ Summary: Ship crash reports and non-fatal events to your Firebase project, with runtime opt-in / opt-out from your web app. Firebase Crashlytics integration sends anonymous crash reports and non-fatal events to your Firebase project, so you can spot stability issues in production. How to Enable: - Set up Firebase for your app and drop `google-services.json` into `AndroidStudioSourceCode/app/`. - In Config.java, turn tracking on: ``` public static final boolean TRACKING_EVENT = true; ``` `TRACKING_EVENT = false` disables all tracking-related features, including Crashlytics event logging and the `starttracking://` / `endtracking://` triggers. Runtime Opt-In / Opt-Out from Your Web App: WebViewGold respects a per-user tracking flag that is persisted on the device. Use the standard tracking triggers to change it at runtime: ``` Enable analytics & crash reports Disable analytics & crash reports ``` When the user is opted out, Crashlytics collection is turned off — nothing is uploaded. What Is Reported: - Unhandled crashes (stack traces, device model, OS version). - Non-fatal exceptions logged internally by the app shell. - No personal user data is attached by default. Where to View the Reports: Open your Firebase Console → Crashlytics dashboard. Reports usually appear within a few minutes of a crash. Notes: Crashlytics initialization is best-effort — if Firebase is misconfigured, the app still runs normally. Consider adding a consent screen (GDPR / CCPA) before calling `starttracking://` for the first time. ## Build & Publish Your App to Google Play (Android) URL: https://www.webviewgold.com/docs/android/publish/ Summary: Publish your WebView app to the Google Play Store: full publishing service, manual process, and changing the package name. Your app is ready, and now it's time to upload it to the Google Play Store and reach an audience of millions? Exciting! The following section will show you how to do it - whether you want to do it yourself or have some work done for you. Prefer a browser-based workflow? The WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=android_docs) (paid add-on) compiles and uploads your app straight from the browser without Android Studio. [Video: https://www.youtube-nocookie.com/embed/nzgCkydN9OM] ### Option A) Full App Publishing Service Bringing your app to the Google Play Store should be smooth and stress-free. Treat yourself to some support — with appsubmitter.io (https://www.appsubmitter.io), you can enjoy a convenient, expert-led publishing process — so you can focus on what matters most while we handle the details. Why Choose appsubmitter.io? - Save time – We take care of certificates, screenshots, and uploads. - Expert handling – Your app is submitted professionally, with no hassles. - Published under your account – You have full control, no restrictions. - Approval guarantee – If Google rejects your app, you get a full refund (see Terms and Conditions (https://www.onlineappcreator.com/terms.php)). Ready to launch? Book a video call (https://www.appsubmitter.io/order-wizard/?platform=android) and let’s get your app live! https://www.appsubmitter.io [Video: https://www.youtube-nocookie.com/embed/3o0xgQXagI8] ### Option B) Manual Publishing Process We updated the default package name to make it easier for you to use a standardized package name format. Now, WebViewGold for Android's default package name is com.webviewgold.myappname. You can easily customize this to your own personalized package name in your app. So, if You don't want to use our pleasant submission service, but you want to deal with it yourself? Sure, follow this guide: In the first step, please change the package name to any unique package name. Do a full backup of your source code folder before renaming the package name. [Video: https://www.youtube-nocookie.com/embed/CONgxLEA8g4] Tip: The WebViewGold Cloud Builder (https://www.webviewgold.com/cloud-builder?ref=android_docs) (paid add-on) automatically takes care of package naming and Play Store uploads, so you can skip the manual steps. Afterward, please consider a professional User Experience/UX Review on UXreviewer.io (https://www.uxreviewer.io) or similar services for best Play Store approval results. Such a UX review also helps you to achieve better customer retention in general for your product with suggestions for improvement. Great, now you are ready to follow the steps of this second video: [Video: https://www.youtube-nocookie.com/embed/ieWtCaWkzYQ] Make sure that the content does not contradict the legal requirements of the Google Play Store. If Google rejects your app, we offer you a full refund of the WebViewGold license (by claiming within 14 days after purchase; see Terms and Conditions (https://www.onlineappcreator.com/terms.php)). Just contact us by mail. Congrats on your own published Android app! 🎉 ### How to Shorten The Package Name The video explains in detail the process to make your package name shorter, and some recommendations to do it. So you can change your app's name from com.webviewgold.myappname to com.myappname [Video: https://www.youtube-nocookie.com/embed/oZa-mntyeNE] No time or don't you feel like signing and uploading manually? Consider the appsubmitter.io (https://www.appsubmitter.io) service: https://www.appsubmitter.io Of course, after the release should be celebrated first! But then perhaps the next project is already on the agenda? Our App Specialists are also happy to help you with individual development services (https://www.onlineappcreator.com/custom-development-services.php) for web apps, iOS apps, Android apps, chat bots, marketing ideas, and much more. Learn more (https://www.onlineappcreator.com/custom-development-services.php) ## Credits, Licenses & Extended License (Android) URL: https://www.webviewgold.com/docs/android/credits/ Summary: License terms for WebViewGold for Android, when you need an Envato Extended License, and open source credits. Please don't forget to add your Envato/CodeCanyon Purchase Code (https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-) in the PURCHASECODE field for each app published by you. One license per each customized and published end product is required. You will need an Envato/CodeCanyon Extended License if any of these cases apply: - You charge your users for the Play Store download - In-App Purchases API or In-App Subscription API will be used in your app - You sell your final app on any marketplace If you already bought the Regular License, you can upgrade the existing license here (https://help.market.envato.com/hc/en-us/articles/115005593503-If-I-choose-the-wrong-license-or-need-to-upgrade-my-license-how-easy-is-it-to-change-to-the-correct-license-). Alternatively, if you do not want to request a refund or upgrade the license, you can re-use your existing Regular License for another app covered by the Regular License. All rights (e.g. of images) belong to their respective owners. The provider of this source code is OnlineAppCreator by jocapps® GmbH - registered in Germany - and is not affiliated with Google. Please take a look for license info of your CodeCanyon purchase: https://codecanyon.net/licenses/standard (https://codecanyon.net/licenses/standard?ref=onlineappcreator) WebViewGold for Android uses android-inapp-billing-v3 (https://github.com/anjlab/android-inapp-billing-v3) (© 2014 AnjLab) which is licensed under the Apache License, version 2.0; you may not use this file except in compliance with the license. WebViewGold for Android uses QRCodeScanner (https://github.com/blikoon/QRCodeScanner) (© 2018 blikoon) which is licensed under the GPLv3; you may not use this file except in compliance with the license. WebViewGold for Android uses Google Mobile Ads SDK (https://developers.google.com/admob/android/sdk) (© 2020 Google) which is licensed under the Google Developers Site Terms of Service; you may not use this file except in compliance with the license. WebViewGold for Android uses OneSignal-Android-SDK (https://github.com/OneSignal/OneSignal-Android-SDK) (© 2016 OneSignal) which is licensed under a modified MIT License; you may not use this file except in compliance with the license. WebViewGold for Android uses Android-SpinKit (https://github.com/ybq/Android-SpinKit) (© 2019 ybq) which is licensed under the MIT License; you may not use this file except in compliance with the license. WebViewGold for Android uses FilePicker (https://github.com/jaiselrahman/FilePicker) (© 2018 jaiselrahman) which is licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the license. WebViewGold for Android uses glide (https://github.com/bumptech/glide) (© 2020 bumptech) which is licensed under the BSD License, part MIT and Apache 2.0; you may not use this file except in compliance with the license. WebViewGold for Android uses android-gif-drawable (https://github.com/koral--/android-gif-drawable) (© 2020 koral) which is licensed under the MIT License; you may not use this file except in compliance with the license. WebViewGold for Android uses firebase-android-sdk (https://github.com/firebase/firebase-android-sdk) (© 2020 Firebase) which is licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the license. ## Rate WebViewGold (Android) URL: https://www.webviewgold.com/docs/android/rate/ Summary: Enjoying WebViewGold? Rate it on CodeCanyon in seconds — it keeps updates coming. If you have 10 seconds, please rate WebViewGold (it's a great motivation for future updates ^^): 1. Go to CodeCanyon.net (https://www.codecanyon.net?ref=onlineappcreator) and sign in 2. Navigate to https://www.codecanyon.net/downloads (https://www.codecanyon.net/downloads?ref=onlineappcreator) 3. Click the stars, as shown in this picture: https://www.codecanyon.net/downloads?ref=onlineappcreator Thank you very much! ## Get WebViewGold for iOS & macOS (Android) URL: https://www.webviewgold.com/docs/android/more-platforms/ Summary: Ship your app on more platforms: get WebViewGold for iOS and macOS and reuse the same web app. ### Get WebViewGold for iOS https://www.webviewgold.com/download/iOS/?ref=android_doc_footer ### Get WebViewGold for macOS https://www.webviewgold.com/download/mac/ ## Support, Contact & Custom Development (Android) URL: https://www.webviewgold.com/docs/android/support/ Summary: Get help fast: browse the WebViewGold Support Center, contact our team directly, or request professional custom app development made in Germany. Please check our Support Center (https://www.webviewgold.com/support-center/) for quick answers or contact us using the form below: [Video: https://support.jocapps.com/OnlineAppCreator_support?ref=WebViewGold_Docs_Android] ### Custom App Development Services Need custom features, integrations, or a fully bespoke app? We've got you covered. Since 2014, our (now even ISO 9001-certified) agency has been delivering high-quality software solutions — Made in Germany. We offer professional custom development not only for WebViewGold-based apps, but also for standalone solutions, including: - Progressive Web Apps (PWAs) and classic web platforms - Native apps: Swift (iOS), Kotlin (Android) - Cross-platform apps: Flutter, React Native - Game and AR/VR development: Unity Whether you're looking to add specific features to your WebViewGold app or build something from the ground up, we can help you turn your idea into a reality with fast turnaround and German engineering quality. Get a custom quote: Reach out to us at custom-app-development@onlineappcreator.com — we’ll be happy to review your requirements and provide a tailored offer. # WebViewGold for macOS ## WebViewGold for macOS Documentation (macOS) URL: https://www.webviewgold.com/docs/mac/ Summary: Official WebViewGold for macOS documentation: convert your website into a native macOS desktop app and publish it in the Mac App Store. - Intro - Setting up your web app - Setting up WebViewGold - Further options - App Icon - App Name - Offline Screen Text - First Run Dialog - Splash Screen - In-App Purchases API - UUID API - Deeplinking API - Credits & Licenses - Rate WebViewGold - Continue with iOS & Android - FAQ / Errors / Support Center (https://www.webviewgold.com/support-center/) - Contact us -   https://www.webviewgold.com/mac/ ### Documentation – WebViewGold for Mac Switch to: [WebViewGold for iOS (https://www.webviewgold.com/docs/iOS)] [WebViewGold for Android (https://www.webviewgold.com/docs/android)]   ### Setting up your website/web app Create a desktop-optimized website or web app and upload it to your webspace. WebViewGold for macOS supports classic HTML, PHP, WordPress, Progressive Web Apps, HTML5 games, Wix, Bubble, jQuery Mobile, and modern AI/no-code builders such as Lovable, Base44, and Bolt. A professional implementation workflow is to build your core product in jQuery, Lovable, Base44, Bolt, React, Vue, Angular, or another web stack, then use WebViewGold as the native Mac app container that adds Xcode packaging, native macOS window behavior, URL handling, file integrations, and app distribution options. Optimize the experience like a real macOS desktop app: use responsive layouts for resizable windows, keyboard-friendly navigation, clear loading and error states, HTTPS endpoints, and concise fallback screens for offline or maintenance situations. For example, you may disallow user zooming if that matches your UI specification: ``` ``` ### SDK-style implementation example Keep your website as the canonical source of business logic and expose small, documented JavaScript helpers for native-only actions. This keeps the same web application usable in browsers while WebViewGold for macOS provides the desktop shell. For SEO, keep route titles, meta descriptions, headings, and structured content on your public website indexable; for app users, let WebViewGold load those same routes inside a native Mac app experience.   ### Setting up WebViewGold for macOS Desktop apps Xcode is required to set up apps using WebViewGold for macOS. Xcode is a powerful integrated development environment (IDE) that is used to create apps for Apple devices such as iPhones, iPads, and Macs. It's important to note that Xcode is a large program and can take up a significant amount of storage space on your Mac. Also, Xcode is only available for Macs and is not compatible with Windows or Linux. Here's a step-by-step guide on how to download and install Xcode on your Mac: - Click here: Download Xcode in Mac App Store (https://apps.apple.com/us/app/xcode/id497799835) - Click on the "Get" or "Download" button to begin the download process. - Once the download is complete, the Xcode installer will automatically launch. - Follow the instructions in the installer to complete the installation process. - Once the installation is complete, open Xcode from the Applications folder or from Spotlight search. - The first time you open Xcode, you may be prompted to install additional components or agree to the terms and conditions. Follow the prompts to complete the setup process. If you already use Xcode, deactivating "Open with Rosetta" for Xcode allows the WebViewGold for macOS app template to run efficiently without errors. Follow these steps to disable this feature: - Open Finder and go to the Applications folder. - Locate the Xcode app and right-click on it. - Select "Get Info" from the menu. - In the Info window, uncheck the "Open with Rosetta" option. - Close the Info window. - Open Xcode and it should now run natively on your Mac's processor. - Disabling "Open with Rosetta" may affect other Xcode projects (like WebViewGold for iOS) that rely on Rosetta, therefore, it's advisable to test your other projects (and undo the change) after making this change to ensure everything is functioning properly. In the next step, download WebViewGold for macOS (https://www.webviewgold.com/download/mac/) in order to create macOS desktop apps. Afterward, open the Xcode project file: Choose the public folder and configure the config.json file: Open index.html file to edit the URL: If you want to use local HTML content (instead of a remote URL), just replace the index.html file with your own content.   ### Change the app icon Just replace the included image files with your own resized image files. Alternatively, use this helpful tool: Asset Catalog Creator - App Icon, Image Set & Launch Screen Generator for iOS & OS X (https://itunes.apple.com/us/app/asset-catalog-creator-app/id809625456?mt=12&uo=4&at=1l3vvZe) by Bridge Technologies Limited (we are not affiliated with the developer company).   ### Change the application name   ### Optional) Change the Offline Screen text Open the OfflineOverlay.xib file in Interface Builder subfolder. Afterward, double click on the text to edit the text:   ### Optional) Change the First Run Dialog text Open the FirstRunWindow.xib file in Interface Builder subfolder. Afterward, double click on the text to edit the text:   ### Optional) Change the Splash Screen text/ duration Open the SplashScreen.xib file in Interface Builder subfolder. Afterward, double click on the text to edit the text: If you want to modify the maximum duration of the splash screen, open the Preferences.m file in Generic subfolder to change the timeout value (in seconds):   ### In-App Purchase & In-App Subscription API Within some macOS/Mac apps, you can buy additional content or services. These kinds of purchases are called "in-app purchases". They can be an attractive source of revenue for developers and are very convenient for customers as they use existing accounts and payment sources for settlement. WebViewGold allows triggering Mac App Store In-App Purchases. Just add your In-App Purchase Product ID (obtained from App Store Connect) in the Constants.h file: Afterward, just link to this kind of URL: ``` Buy In-App Purchase ``` Alternatively, use this kind of URL for subscription products: ``` Start In-App Subscription ``` In this URL example, https://www.google.com should be called after the successful subscription activation, and https://www.yahoo.com should be called as soon as the subscription is expired.   ### UUID API WebViewGold allows passing a non-personal, unique device ID (UUID / "Universally Unique Identifier") to JavaScript, which can be used to identify macOS devices uniquely. This API can be useful, for example, to save settings or values on the server-side and restore them on the client-side. Please respect local and international privacy regulations if you use this API. ``` Get UDID Show UDID ```   ### Deeplinking API Deeplinking ("Custom URL Scheme") is a powerful approach that allows users to navigate to a specific page or section of an app directly from an external source such as a website, email, or another app. In the context of the macOS app template from WebViewGold, deeplinking allows developers to create links that launch the app and take users to a specific page within the app. The process of implementing deeplinking in the WebViewGold for macOS app template is relatively simple. Here's how it works:     ### Credits / License All rights (e.g. of images) belong to their respective owners. The provider of this source code is OnlineAppCreator.com c/o jocapps GmbH - registered in Germany - and is not affiliated with Apple. iOS is a registered trademark of Cisco and used under license by Apple Inc. iPad, iPhone, iPod, Xcode, and Xcode logo are registered trademarks of Apple Inc. WebViewGold for Mac is based on MacGap (licensed under MIT license). Please take a look for license info of your CodeCanyon purchase: https://codecanyon.net/licenses/terms/tools (https://codecanyon.net/licenses/terms/tools?ref=onlineappcreator)   ### Rate WebViewGold If you have 10 seconds, please rate WebViewGold (it's a great motivation for future updates ^^): 1. Go to CodeCanyon.net (https://www.codecanyon.net?ref=onlineappcreator) and sign in 2. Navigate to https://www.codecanyon.net/downloads (https://www.codecanyon.net/downloads?ref=onlineappcreator) 3. Click the stars, as shown in this picture: https://www.codecanyon.net/downloads?ref=onlineappcreator Thank you very much!   ### WebViewGold for iOS & Android https://www.webviewgold.com   ### photos2webgallery for macOS https://www.photos2webgallery.com/?COUPON=WEBVIEWGOLD   ### Contact us Please check our Support Center (https://www.webviewgold.com/support-center/) for quick answers or contact us using the form below: [Video: https://support.jocapps.com/OnlineAppCreator_support?ref=WebViewGold_Mac]