{"id":30026447,"url":"https://github.com/mgks/ios-smartwebview","last_synced_at":"2025-08-06T10:59:58.490Z","repository":{"id":306496468,"uuid":"1026394258","full_name":"mgks/iOS-SmartWebView","owner":"mgks","description":"A simple use iOS webview integrated w/ native features \u0026 plugin support for building hybrid apps.","archived":false,"fork":false,"pushed_at":"2025-07-25T20:16:13.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-26T03:33:55.226Z","etag":null,"topics":["firebase","gps","ios","location-tracker","push-notifications","smartwebview","swift","webview"],"latest_commit_sha":null,"homepage":"https://docs.mgks.dev/smart-webview","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-25T20:09:56.000Z","updated_at":"2025-07-25T20:23:49.000Z","dependencies_parsed_at":"2025-07-26T03:37:25.125Z","dependency_job_id":"9eaac441-2036-4706-a0e7-140564c7b25e","html_url":"https://github.com/mgks/iOS-SmartWebView","commit_stats":null,"previous_names":["mgks/ios-smartwebview"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mgks/iOS-SmartWebView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgks%2FiOS-SmartWebView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgks%2FiOS-SmartWebView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgks%2FiOS-SmartWebView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgks%2FiOS-SmartWebView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgks","download_url":"https://codeload.github.com/mgks/iOS-SmartWebView/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgks%2FiOS-SmartWebView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269067379,"owners_count":24354265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","gps","ios","location-tracker","push-notifications","smartwebview","swift","webview"],"created_at":"2025-08-06T10:59:55.066Z","updated_at":"2025-08-06T10:59:58.461Z","avatar_url":"https://github.com/mgks.png","language":"Swift","funding_links":["https://github.com/sponsors/mgks/sponsorships?sponsor=mgks\u0026tier_id=468838","https://github.com/sponsors/mgks"],"categories":[],"sub_categories":[],"readme":"# iOS Smart WebView\n\n\u003cp\u003e\n  \u003ca href=\"#features\"\u003e\u003cimg alt=\"Variant\" src=\"https://img.shields.io/badge/language-Swift-orange.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/mgks/iOS-SmartWebView/releases\"\u003e\u003cimg alt=\"Releases\" src=\"https://img.shields.io/github/v/release/mgks/iOS-SmartWebView\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/mgks/iOS-SmartWebView/blob/master/LICENSE\"\u003e\u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/mgks/iOS-SmartWebView\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**iOS Smart WebView** is a modern, open-source solution for building advanced hybrid iOS apps, designed as a direct parallel to the already established [Android Smart WebView](https://github.com/mgks/Android-SmartWebView) project. It allows you to effortlessly extend your app with plugins, native features, and a customizable UI, all configured from a single properties file.\n\n**[DOCUMENTATION](https://docs.mgks.dev/smart-webview/)** | **[GET PREMIUM PLUGINS](https://github.com/sponsors/mgks/sponsorships?sponsor=mgks\u0026tier_id=468838)** | **[ISSUES](https://github.com/mgks/iOS-SmartWebView/issues)**\n\n## Core Features\n\n*   **Plugin Architecture:** Extend app functionality with self-registering plugins written in Swift. See `PluginInterface.swift`, `PluginManager.swift`, and existing plugins in `/Plugins/` for details.\n*   **File Uploads \u0026 Camera Access:** Modern photo, video, and file selection using native iOS pickers.\n*   **Push Notifications:** Integrated Firebase Cloud Messaging. **(Requires a paid Apple Developer account)**.\n*   **Configuration Driven:** All major features are controlled via `swv.properties`, mirroring the Android version for easy management.\n*   **Location \u0026 Permissions:** Access device GPS/location and manage permissions with a centralized manager.\n*   **Content Sharing \u0026 URL Handling:** Intercept custom URL schemes (`tel:`, `share:`, `print:`) and intelligently open external links in the browser.\n*   **Downloads \u0026 Printing:** Handle file downloads and print web content using native iOS services.\n*   **Modern WebView:** Built on `WKWebView` for maximum performance, security, and compatibility.\n*   **SwiftUI Lifecycle:** Built using the modern SwiftUI app lifecycle for future-proofing and easier cross-platform (iPadOS, macOS) support.\n\n---\n\n## Important Note on Apple Developer Accounts\n\nSome advanced iOS features require a paid Apple Developer account ($99/year). This project is structured to work for both free and paid accounts, but certain plugins will only be fully functional with a paid account.\n\n| Feature / Plugin | Free Account | Paid Account |\n| :--- | :--- | :--- |\n| Core WebView, File Uploads, Location, Dialogs, Toast | ✅ Yes | ✅ Yes |\n| **[Push Notifications](https://developer.apple.com/help/account/identifiers/enable-app-capabilities) (FirebasePlugin)** | ❌ No | ✅ **Yes** |\n| Other capabilities (iCloud, HealthKit, etc.) | ❌ No | ✅ **Yes** |\n\n**If you are using a free account, the app will build and run, but Push Notifications will be disabled.**\n\n---\n\n## Quick Start\n\n1.  **Clone the repository:**\n    ```sh\n    git clone https://github.com/mgks/iOS-SmartWebView.git\n    ```\n2.  **Open in Xcode:**\n    *   Open the `.xcodeproj` file.\n    *   In Xcode, go to **Settings \u003e Accounts** and ensure you are logged in with your Apple ID.\n3.  **Configure `swv.properties`:**\n    *   Open `Resources/swv.properties`.\n    *   Change `app.url` to your website's URL.\n4.  **Add `GoogleService-Info.plist` (Optional):**\n    *   If using Firebase services, obtain your `GoogleService-Info.plist` file from the Firebase console and place it in the `Resources/` group in Xcode.\n5.  **Configure Project Capabilities (Based on Account Type):**\n    *   In your Project Target settings, go to the **\"Signing \u0026 Capabilities\"** tab.\n    *   **Free Account:** No action needed. The project is pre-configured to build without paid capabilities.\n    *   **Paid Account:** Click **`+ Capability`** and add **`Push Notifications`**. This is required for the `FirebasePlugin` to receive remote notifications.\n6.  **Add Privacy Permissions:**\n    *   In the **Info** tab of your project target, add the following keys with descriptions of why you need them. The app will crash without these.\n        *   `Privacy - Camera Usage Description`\n        *   `Privacy - Photo Library Usage Description`\n        *   `Privacy - Location When In Use Usage Description`\n        *   `Privacy - Microphone Usage Description` (for video recording)\n7.  **Build \u0026 Run:**\n    *   Select a simulator or connected device and press the Run `▶` button.\n\n## Understanding the Code\n\n*   **`Resources/swv.properties`**: Contains all global configurations.\n*   **`Managers/SWVContext.swift`**: The central class that loads the configuration and holds app state.\n*   **`Core/ContentView.swift` \u0026 `Views/WebView.swift`**: The main entry point and WebView setup.\n*   **`Managers/URLHandler.swift`**: Utility for handling custom URL schemes and external links.\n*   **`Plugins/PluginInterface.swift` \u0026 `Managers/PluginManager.swift`**: Key components of the plugin architecture.\n*   **`Plugins/` directory**: Contains example and premium plugin implementations.\n*   **`Core/AppDelegate.swift`**: Handles application-level events, primarily for configuring Firebase and receiving push notifications.\n\n## Contributing \u0026 Support\n*   Found a bug or want to contribute? Open an issue or create a pull request.\n*   Support the project via [GitHub Sponsors](https://github.com/sponsors/mgks).\n\n## License\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgks%2Fios-smartwebview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgks%2Fios-smartwebview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgks%2Fios-smartwebview/lists"}