{"id":13990714,"url":"https://github.com/mono0926/NativePopup","last_synced_at":"2025-07-22T13:31:07.289Z","repository":{"id":50283370,"uuid":"89121051","full_name":"mono0926/NativePopup","owner":"mono0926","description":"Clone of Apple iOS App's feedback popup, and easily customizable.","archived":false,"fork":false,"pushed_at":"2020-05-29T11:23:23.000Z","size":12269,"stargazers_count":266,"open_issues_count":4,"forks_count":17,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-07-18T23:35:14.449Z","etag":null,"topics":["alert","apple","appstore","blur-backgrounds","dialog","feedback","ios","ios-animation","ios-ui","modal","popup","popup-dialog","response","swift","visual-effects"],"latest_commit_sha":null,"homepage":"https://medium.com/swift-column/native-popup-56b168deb322","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/mono0926.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["mono0926"]}},"created_at":"2017-04-23T06:04:35.000Z","updated_at":"2024-07-11T15:56:32.000Z","dependencies_parsed_at":"2022-08-25T19:12:24.404Z","dependency_job_id":null,"html_url":"https://github.com/mono0926/NativePopup","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2FNativePopup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2FNativePopup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2FNativePopup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono0926%2FNativePopup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mono0926","download_url":"https://codeload.github.com/mono0926/NativePopup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214668598,"owners_count":15767199,"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","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":["alert","apple","appstore","blur-backgrounds","dialog","feedback","ios","ios-animation","ios-ui","modal","popup","popup-dialog","response","swift","visual-effects"],"created_at":"2024-08-09T13:03:08.581Z","updated_at":"2024-08-09T13:11:13.700Z","avatar_url":"https://github.com/mono0926.png","language":"Swift","funding_links":["https://github.com/sponsors/mono0926"],"categories":["Swift"],"sub_categories":[],"readme":"# NativePopup\n\n![platforms](https://img.shields.io/badge/platforms-iOS-333333.svg)\n[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/mono0926/NativePopup/master/LICENSE)\n[![Support Carthage and CocoaPods](https://img.shields.io/badge/supports-CocoaPods%2C%20Carthage-green.svg)](https://github.com/Carthage/Carthage)\n[![Language: Swift](https://img.shields.io/badge/swift-5.0-4BC51D.svg?style=flat)](https://developer.apple.com/swift)\n\n`NativePopup` is clone of Apple iOS AppStore review feedback popup.\n\nNativePopup clones native popup's design and behavior(animation and user interaction).\nAnd you can use custom image and emoji in addition to bad/good icons.\n\n# Compared with Apple original popups.\n\nNativePopup | Original\n--- | ---\n![NativePopup Done](https://github.com/mono0926/Resource/raw/master/NativePopup/GIF/done_np.gif) | ![Original Done](https://github.com/mono0926/Resource/raw/master/NativePopup/GIF/done.gif)\n![NativePopup Good](https://github.com/mono0926/Resource/raw/master/NativePopup/GIF/good_np.gif) | ![Original Good](https://github.com/mono0926/Resource/raw/master/NativePopup/GIF/good.gif)\n\n\n\n# Examples\n\n## Good/Bad\n\nGood | Bad \n--- | --- \n![good](https://raw.githubusercontent.com/mono0926/NativePopup/master/Screenshots/NativePopup/good.png) | ![bad](https://raw.githubusercontent.com/mono0926/NativePopup/master/Screenshots/NativePopup/bad.png)\n\n## Custom Image/Emoji\n\nCustom Image | Emoji\n--- | ---\n![custome image](https://raw.githubusercontent.com/mono0926/NativePopup/master/Screenshots/NativePopup/custom_image.png) | ![bad](https://raw.githubusercontent.com/mono0926/NativePopup/master/Screenshots/NativePopup/emoji.png)\n\n# Usage\n\nVery simple to use NativePopup🐶\n\n\n```swift\n// Good\nNativePopup.show(image: Preset.Feedback.good,\n                 title: \"Helpful\",\n                 message: \"Thanks for your feedback.\")\n// Bad\nNativePopup.show(image: Preset.Feedback.bad,\n                 title: \"Not Helpful\",\n                 message: \"Thanks for your feedback.\")\n// Custom Image\nNativePopup.show(image: UIImage(named: \"love\")!,\n                 title: \"参考になった\",\n                 message: \"フィードバックをありがとう\\nございました。\")\n// Emoji\nNativePopup.show(image: Character(\"🐶\"),\n                 title: \"イッヌ\",\n                 message: \"絵文字対応したワン\")\n// Title only\nNativePopup.show(image: Preset.Feedback.good,\n                 title: \"Empty Message 🗑\",\n                 message: nil)\n// Custom duration (default duration is 1.5 seconds)\nNativePopup.show(image: Character(\"🔟\"),\n                    title: \"10 seconds\",\n                    message: \"Long duration🙇\",\n                    duration: 10)\n// Like Apple Music\nNativePopup.show(image: Preset.Feedback.done,\n                 title: \"Added to Library\",\n                 message: nil,\n                 initialEffectType: .fadeIn)\n```\n\n\n`image` accepts `ImageConvertible` protocol.\n\n```swift\npublic enum Image {\n    case image(UIImage)\n    case emoji(Character)\n\n    func validate() {\n        switch self {\n        case .image(let image):\n            assert(image.size.width == image.size.height, \"Aspect ratio should be 1:1.\")\n        case .emoji:\n            // MEMO: should check?\n            break\n        }\n    }\n}\n\npublic protocol ImageConvertible {\n    var npImage: Image { get }\n}\n```\n\n`UIImage` and `Character` conforms to `ImageConvertible` by default.\n\n```swift\nextension UIImage: ImageConvertible {\n    public var npImage: Image { return .image(self) }\n}\n\nextension Character: ImageConvertible {\n    public var npImage: Image { return .emoji(self) }\n}\n```\n\nYou can define custom preset image as below.\n\n```swift\nextension NativePopup {\n    public struct Preset {\n        private init() {}\n        public enum Feedback: String, ImageConvertible {\n            case\n            good,\n            bad\n\n            public var npImage: Image {\n                return .image(UIImage.init(nativePopupNamed: \"feedback_\\(rawValue)\"))\n            }\n        }\n    }\n}\n```\n\n**Image size should be 112 x 112.**\n\n# Installation\n\nYou can install by [Carthage](https://github.com/Carthage/Carthage) or add [NativePopup sources](https://github.com/mono0926/NativePopup/tree/master/NativePopup) manually.\n\n## [Carthage](https://github.com/Carthage/Carthage)\n\nAdd this to Cartfile\n\n```\ngithub \"mono0926/NativePopup\"\n```\n\n```sh\n$ carthage update\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono0926%2FNativePopup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmono0926%2FNativePopup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono0926%2FNativePopup/lists"}