{"id":18656578,"url":"https://github.com/zendesk/react-native-sunshine-conversations","last_synced_at":"2025-04-11T18:30:54.654Z","repository":{"id":57340231,"uuid":"47736539","full_name":"zendesk/react-native-sunshine-conversations","owner":"zendesk","description":"React Native wrapper for Smooch.io","archived":true,"fork":false,"pushed_at":"2023-04-09T20:22:08.000Z","size":57,"stargazers_count":36,"open_issues_count":8,"forks_count":26,"subscribers_count":210,"default_branch":"master","last_synced_at":"2025-03-11T20:09:41.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/zendesk.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":"2015-12-10T03:55:01.000Z","updated_at":"2024-11-23T22:58:56.000Z","dependencies_parsed_at":"2022-08-26T04:31:13.075Z","dependency_job_id":null,"html_url":"https://github.com/zendesk/react-native-sunshine-conversations","commit_stats":null,"previous_names":["smooch/react-native-smooch"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Freact-native-sunshine-conversations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Freact-native-sunshine-conversations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Freact-native-sunshine-conversations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Freact-native-sunshine-conversations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zendesk","download_url":"https://codeload.github.com/zendesk/react-native-sunshine-conversations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458362,"owners_count":21107063,"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-11-07T07:24:07.652Z","updated_at":"2025-04-11T18:30:54.314Z","avatar_url":"https://github.com/zendesk.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚠️ NOTICE: The repo is no longer maintained. \n\n# react-native-smooch\nReact Native wrapper for Smooch.io. Based off of [smooch-cordova](https://github.com/smooch/smooch-cordova)\n\nThis React Native module was built and tested with version 0.57.7 of React Native. Since React Native is not mature yet, there might be some breaking changes which will break our module. Therefore, if you find a problem, please open an issue.\n\nAt the moment, this wrapper only covers the most commonly used features of the Smooch SDK. We encourage you to add to this wrapper or make any feature requests you need. Pull requests most definitely welcome!\n\nPlease [contact Smooch](mailto:help@smooch.io) for any questions.\n\nInstalling Smooch on React Native\n=================================\n\nFirst, make sure you've [signed up for Smooch](https://app.smooch.io/signup)\n\nIf you don't already have a React Native application setup, follow the instructions [here](https://facebook.github.io/react-native/docs/getting-started.html) to create one.\n\nNext, grab this React Native module with `npm install react-native-smooch`\n\nLink it! `react-native link react-native-smooch`\n\n## iOS\n * With CococaPods, you can add the react-native-smooch Pod in your `Podfile` like so:\n\n ```\n pod 'react-native-smooch',\n     :path =\u003e '../node_modules/react-native-smooch'\n ```\n\n * You must also have your React dependencies defined in your Podfile as described [here](http://facebook.github.io/react-native/releases/0.31/docs/troubleshooting.html#missing-libraries-for-react), for example:\n\n ```\ntarget 'myapp' do\n\n    pod 'react-native-smooch',\n        :path =\u003e '../node_modules/react-native-smooch'\n\n\tpod 'React',\n        :subspecs =\u003e [\n            'Core',\n            'RCTImage',\n            'RCTNetwork',\n            'RCTPushNotification',\n            'RCTText',\n        ], :path =\u003e '../node_modules/react-native'\n\n    pod 'yoga',\n        path: '../node_modules/react-native/ReactCommon/yoga/yoga.podspec'\n\nend\n ```\n\n * Install pods by running `pod install`.\n\n * Without CocoaPods, you can add Smooch by navigating to your React Native project's `ios` directory and following [the manual steps here](http://docs.smooch.io/ios/#adding-smooch-to-your-app).\n\n * Open your project's .xcworkspace file in XCode and initialize Smooch with your app id inside of applicationDidFinishLaunchingWithOptions.\n\n```\n#import \u003cSmooch/Smooch.h\u003e\n\n...\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n    // Initialize Smooch - these instructions are also available on [app.smooch.io](https://app.smooch.io)\n    [Smooch initWithSettings:[SKTSettings settingsWithAppId:@\"YOUR_APP_ID\"] completionHandler:^(NSError * _Nullable error, NSDictionary * _Nullable userInfo) {\n        // Your code after init is complete\n    }];\n}\n```\n\nYou're now ready to start interacting with Smooch in your React Native app.\n\n## Android\n\nYou can easily add a binding to the [Smooch Android SDK](https://github.com/smooch/smooch-android) in your React Native application by following the instructions below.\n\n* Add the `ReactNativeSmoochPackage` to the list of packages in your `ReactApplication`\n```java\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n    return Arrays.\u003cReactPackage\u003easList(\n            new MainReactPackage(),\n            new ReactNativeSmoochPackage()\n    );\n}\n```\n\n* Add `Smooch.init` to the `onCreate` method of your `Application` class.\n\n```java\nimport io.smooch.core.Settings;\nimport io.smooch.core.Smooch;\nimport io.smooch.core.SmoochCallback;\nimport com.facebook.soloader.SoLoader;\n\npublic class MainApplication extends Application implements ReactApplication {\n    ...\n    @Override\n    public void onCreate() {\n        super.onCreate();\n        SoLoader.init(this, /* native exopackage */ false);\n        Smooch.init(this, new Settings(\"YOUR_APP_ID\"), new SmoochCallback() {\n            @Override\n            public void run(Response response) {\n                // Your code after init is complete\n            }\n        });\n    }\n    ...\n}\n```\n\nYou're now ready to start interacting with Smooch in your React Native app.\n\nUsing Smooch in your React Native App\n=====================================\n\n### Require the module\n```javascript\nconst Smooch = require('react-native-smooch');\n```\n\n### Show the conversation screen\n```javascript\nSmooch.show();\n```\n\n### Set the user's first name\n```javascript\nSmooch.setFirstName(\"Kurt\");\n```\n\n### Set the user's last name\n```javascript\nSmooch.setLastName(\"Osiander\");\n```\n\n### Set the user's email address\n```javascript\nSmooch.setEmail(\"kurt@ralphgraciesf.com\");\n```\n\n### Set the user's sign up date\n```javascript\nSmooch.setSignedUpAt((new Date).getTime());\n```\n\n### Associate key/value pairs with the user\n```javascript\nSmooch.setUserProperties({\"whenDidYouFsckUp\": \"aLongTimeAgo\"});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Freact-native-sunshine-conversations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzendesk%2Freact-native-sunshine-conversations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Freact-native-sunshine-conversations/lists"}