{"id":2461,"url":"https://github.com/lucabecchetti/InAppNotify","last_synced_at":"2025-08-02T23:33:41.178Z","repository":{"id":22978573,"uuid":"97737835","full_name":"lucabecchetti/InAppNotify","owner":"lucabecchetti","description":"Swift library to manage in app notification in swift language, like WhatsApp, Telegram, Frind, ecc.","archived":false,"fork":false,"pushed_at":"2022-09-07T15:03:38.000Z","size":308,"stargazers_count":434,"open_issues_count":2,"forks_count":36,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-12-06T17:20:18.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/lucabecchetti.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}},"created_at":"2017-07-19T16:21:31.000Z","updated_at":"2024-10-29T07:01:43.000Z","dependencies_parsed_at":"2022-07-27T03:47:12.475Z","dependency_job_id":null,"html_url":"https://github.com/lucabecchetti/InAppNotify","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucabecchetti%2FInAppNotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucabecchetti%2FInAppNotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucabecchetti%2FInAppNotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucabecchetti%2FInAppNotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucabecchetti","download_url":"https://codeload.github.com/lucabecchetti/InAppNotify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500220,"owners_count":17930019,"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":[],"created_at":"2024-01-05T20:16:14.312Z","updated_at":"2024-12-06T17:31:07.011Z","avatar_url":"https://github.com/lucabecchetti.png","language":"Swift","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=BZD2RPBADPA6G"],"categories":["UI"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses"],"readme":"# InAppNotify - Manage in App notifications\n\u003cp align=\"center\" \u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/16253548/28424204-4c36af46-6d6d-11e7-95df-0cb4582093d7.png\" width=400px alt=\"InAppNotify\" title=\"InAppNotify\"\u003e\n\u003c/p\u003e\n\n[![Version](https://img.shields.io/badge/pod-0.1.4-blue.svg)](https://cocoapods.org/pods/InAppNotify) [![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://cocoapods.org/pods/InAppNotify) [![Platform](https://img.shields.io/badge/platform-ios-lightgrey.svg)](https://cocoapods.org/pods/InAppNotify) [![Swift3](https://img.shields.io/badge/swift4-compatible-brightgreen.svg)](https://cocoapods.org/pods/InAppNotify)\n\nDuring develop of my app [Frind](http://www.frind.it), I needed to manage in app notifications like whatsapp or telegram, but i didn't find nothing that liked me, so, i created this library. Choose InAppNotify for your next project, I'll be happy to give you a little help!\n\n\u003cp align=\"center\" \u003e★★ \u003cb\u003eStar our github repository to help us!, or \u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=BZD2RPBADPA6G\" target=\"_blank\"\u003e ☕ pay me a coffee\u003c/a\u003e\u003c/b\u003e ★★\u003c/p\u003e\n\u003cp align=\"center\" \u003eCreated by \u003ca href=\"http://www.lucabecchetti.com\"\u003eLuca Becchetti\u003c/a\u003e\u003c/p\u003e\n\n\n## Screenshots\n\n\u003cp align=\"center\" \u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/16253548/28425722-74d8b1e8-6d71-11e7-9183-c5a7a8d519fe.png\" width=\"33%\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/16253548/28425724-75042ea4-6d71-11e7-86fe-99651fa85a8a.png\" width=\"33%\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/16253548/28425723-7500587e-6d71-11e7-8447-80c5302e44b6.png\" width=\"33%\"\u003e\n\u003c/p\u003e\n\n\n## Requirements\n\n  - iOS 8+\n  - swift 4.0\n  \n## Main features\nHere's a highlight of the main features you can find in InAppNotify:\n* **Multiple orientation** We support `portrait` and `landscape` orientation\n* **Fully customizable**. You can customize all programmatically  \n* **Swipe gesture** Up to dismiss, or down to show reply text field\n\n## You also may like\n\nDo you like `InAppNotify`? I'm also working on several other opensource libraries.\n\nTake a look here:\n\n* **[CountriesViewController](https://github.com/lucabecchetti/CountriesViewController)** - Countries selection view\n* **[SwiftMultiSelect](https://github.com/lucabecchetti/SwiftMultiSelect)** - Generic multi selection tableview\n* **[SwiftMulticastProtocol](https://github.com/lucabecchetti/SwiftMulticastProtocol)** - send message to multiple classes\n\n## Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like InAppNotify in your projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n#### Podfile\n\nTo integrate InAppNotify into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\n\ntarget 'TargetName' do\n  use_frameworks!\n  pod 'InAppNotify'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n## How to use\n\nFirst of all import library in your project\n\n```swift\nimport InAppNotify\n```\n\nThe basic code to show a simple notification is:\n\n```swift\n//If you are in a UIViewController\nInAppNotify.Show(Announcement(title: \"Hello world! my first example!\"), to: self)\n```\n\n### InAppNotify.Show method\n\nThis is a static method used to present a notitication, it takes two parameters, first is an instance of Announcement object, the second is a subclass of UIViewController\n\n### Create announcement object\n\nThis library can show only an instance of \"Announcement\" object, you can pass many parameters to his initializer:\n\n```swift\nlet announce = Announcement(\n      //Title, the first line\n      title           : \"I am titile\",\n      //Subtitle, the second line\n      subtitle        : \"I am subititle\",\n      //Image local, show if no urlImage is set\n      image           : UIImage(named: \"test\"),\n      //URL of remote image\n      urlImage        : \"https://.....\",\n      //Seconds before disappear\n      duration        : 3,\n      //Interaction type. none or text\n      interactionType : InteractionType.none,\n      //Pass data to annoucement\n      userInfo        : [\"id\" : 10],\n      //Action callback\n      action: { (type, string, announcement) in\n                \n            //You can detect the action by test \"type\" var     \n            if type == CallbackType.tap{\n                  print(\"User has been tapped\")\n            }else if type == CallbackType.text{\n                  print(\"Reply from notification: \\(string!)\")\n            }else{\n                  print(\"Notification has been closed!\")\n            }\n      }\n            \n)\n```\n\n### Present announcement object\nWhen object is created you can present it with this code:\n\n```swift\n//If you are in a UIViewController\nInAppNotify.Show(announce, to: self)\n```\n\n### Interact with notification\n\nWhen you create an announcement, you can interact with it passed an action callback:\n\n```swift\n//Inside initialization of announcement\naction: { (type, string, announcement) in\n                \n  //You can detect the action by test \"type\" var     \n  if type == CallbackType.tap{\n    print(\"User has been tapped\")\n  }else if type == CallbackType.text{\n    print(\"Reply from notification: \\(string!)\")\n  }else{\n    print(\"Notification has been closed!\")\n  }\n  \n}\n```\n\nFrom the callbacak you can access the announcement object that has been triggered this method, announcement has a particolar attribute called \"userInfo\" (it's of type \"Any\") that you can set when create object, and read here.\n\nIf you want to enable a textField interaction when pull down notification, pass this parameter to announcement object:\n\n```swift\n//Inside initialization of announcement\ninteractionType : InteractionType.text,\n```\n\nThis will present a textArea where user can write! to modify the text button (\"send\" by default) use this code:\n\n```swift\nInAppNotify.sendString = \"Send\"\n```\n\nTo read user input, if you have set an action callback, test if the type is \"text\" and access string variable:\n\n```swift\n//Inside callback\nif type == CallbackType.text{\n    print(\"Reply from notification: \\(string!)\")\n}\n```\n\n### Customization\n\nInAppNotify supports themes, by default we have two themes, accessibile from \"Themes\" class:\n\n- Themes.dark\n- Themes.light\n\nTo use a theme you have to set a global variable of the library, example:\n\n```swift\n//Set dark theme\nInAppNotify.theme = Themes.dark\n```\n\nOf course, you can create your custom theme programmatically, here an example:\n\n```swift\n//Create and use a custom theme\nInAppNotify.theme = Theme(\n      titleFont                   : UIFont.boldSystemFont(ofSize: 18),\n      subtitleFont                : UIFont.systemFont(ofSize: 13),\n      backgroundColor             : UIColor(red:0.90, green:0.58, blue:0.15, alpha:1.00),\n      dragIndicatorColor          : UIColor(red:0.95, green:0.80, blue:0.19, alpha:1.00),\n      titleColor                  : UIColor.white,\n      subtitleColor               : UIColor.white,\n      shadowColor                 : UIColor.darkGray.cgColor,\n      inputTextBackgroundColor    : UIColor(red:0.95, green:0.80, blue:0.19, alpha:1.00),\n      inputTextColor              : UIColor.white,\n      sendButtonHighlightedColor  : UIColor.darkGray,\n      sendButtonNormalColor       : UIColor.black,\n      separatorLineColor          : UIColor.black\n)\n```\n## Projects using InAppNotify\n\n- Frind - [www.frind.it](https://www.frind.it) \n- BirthReminder - [https://captainyukinoshitahachiman.github.io/BirthReminder](https://captainyukinoshitahachiman.github.io/BirthReminder/)\n\n### Your App and InAppNotify\nI'm interested in making a list of all projects which use this library. Feel free to open an Issue on GitHub with the name and links of your project; we'll add it to this site.\n\n## Credits \u0026 License\nInAppNotify is owned and maintained by [Luca Becchetti](http://www.lucabecchetti.com) \n\nAs open source creation any help is welcome!\n\nThe code of this library is licensed under MIT License; you can use it in commercial products without any limitation.\n\nThe only requirement is to add a line in your Credits/About section with the text below:\n\n```\nIn app notification by InAppNotify - http://www.lucabecchetti.com\nCreated by Becchetti Luca and licensed under MIT License.\n```\n## About me\n\nI am a professional programmer with a background in software design and development, currently developing my qualitative skills on a startup company named \"[Frind](https://www.frind.it) \" as Project Manager and ios senior software engineer.\n\nI'm high skilled in Software Design (10+ years of experience), i have been worked since i was young as webmaster, and i'm a senior Php developer. In the last years i have been worked hard with mobile application programming, Swift for ios world, and Java for Android world.\n\nI'm an expert mobile developer and architect with several years of experience of team managing, design and development on all the major mobile platforms: iOS, Android (3+ years of experience).\n\nI'm also has broad experience on Web design and development both on client and server side and API /Networking design. \n\nAll my last works are hosted on AWS Amazon cloud, i'm able to configure a netowrk, with Unix servers. For my last works i configured apache2, ssl, ejabberd in cluster mode, Api servers with load balancer, and more.\n\nI live in Assisi (Perugia), a small town in Italy, for any question, [contact me](mailto:luca.becchetti@brokenice.it)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucabecchetti%2FInAppNotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucabecchetti%2FInAppNotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucabecchetti%2FInAppNotify/lists"}