{"id":25936793,"url":"https://github.com/chartboost/chartboost-mediation-unity-adapter-bidmachine","last_synced_at":"2025-03-04T02:54:44.086Z","repository":{"id":252307550,"uuid":"790348669","full_name":"ChartBoost/chartboost-mediation-unity-adapter-bidmachine","owner":"ChartBoost","description":"The Chartboost Mediation Unity SDK Adapter for BidMachine.","archived":false,"fork":false,"pushed_at":"2025-02-28T23:01:10.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T00:47:53.984Z","etag":null,"topics":["ads","android","bidmachine","chartboost","chartboost-mediation","csharp","ios","mediation","unity"],"latest_commit_sha":null,"homepage":"https://www.chartboost.com/mediate","language":"C#","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/ChartBoost.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-04-22T18:05:06.000Z","updated_at":"2025-02-28T23:01:13.000Z","dependencies_parsed_at":"2024-08-08T23:32:03.955Z","dependency_job_id":"02821729-4ea1-4094-9c99-1f1237a5015c","html_url":"https://github.com/ChartBoost/chartboost-mediation-unity-adapter-bidmachine","commit_stats":null,"previous_names":["chartboost/chartboost-mediation-unity-adapter-bidmachine"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-unity-adapter-bidmachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-unity-adapter-bidmachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-unity-adapter-bidmachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChartBoost%2Fchartboost-mediation-unity-adapter-bidmachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChartBoost","download_url":"https://codeload.github.com/ChartBoost/chartboost-mediation-unity-adapter-bidmachine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241773261,"owners_count":20018065,"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":["ads","android","bidmachine","chartboost","chartboost-mediation","csharp","ios","mediation","unity"],"created_at":"2025-03-04T02:54:43.428Z","updated_at":"2025-03-04T02:54:44.076Z","avatar_url":"https://github.com/ChartBoost.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chartboost Mediation Unity SDK - BidMachine Adapter\r\n\r\nProvides a list of externally configurable properties pertaining to the partner SDK that can be retrieved and set by publishers. \r\n\r\nDependencies for the adapter are now embedded in the package, and can be found at `com.chartboost.mediation.unity.adapter.bidmachine/Editor/BidMachineAdapterDependencies.xml`.\r\n\r\n# Installation\r\n\r\n## Using the public [npm registry](https://www.npmjs.com/search?q=com.chartboost.mediation.unity.adapter.bidmachine)\r\n\r\nIn order to add the Chartboost Mediation Unity SDK - BidMachine Adapter to your project using the npm package, add the following to your Unity Project's ***manifest.json*** file. The scoped registry section is required in order to fetch packages from the NpmJS registry.\r\n\r\n```json\r\n\"dependencies\": {\r\n    \"com.chartboost.mediation.unity.adapter.bidmachine\": \"5.1.3\",\r\n    ...\r\n},\r\n\"scopedRegistries\": [\r\n{\r\n    \"name\": \"NpmJS\",\r\n    \"url\": \"https://registry.npmjs.org\",\r\n    \"scopes\": [\r\n    \"com.chartboost\"\r\n    ]\r\n}\r\n]\r\n```\r\n\r\n## Using the public [NuGet package](https://www.nuget.org/packages/Chartboost.CSharp.Mediation.Unity.Adapter.BidMachine)\r\n\r\nTo add the Chartboost Mediation Unity SDK - BidMachine Adapter to your project using the NuGet package, you will first need to add the [NugetForUnity](https://github.com/GlitchEnzo/NuGetForUnity) package into your Unity Project.\r\n\r\nThis can be done by adding the following to your Unity Project's ***manifest.json***\r\n\r\n```json\r\n  \"dependencies\": {\r\n    \"com.github-glitchenzo.nugetforunity\": \"https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity\",\r\n    ...\r\n  },\r\n```\r\n\r\nOnce \u003ccode\u003eNugetForUnity\u003c/code\u003e is installed, search for `Chartboost.CSharp.Mediation.Unity.Adapter.BidMachine` in the search bar of Nuget Explorer window(Nuget -\u003e Manage Nuget Packages).\r\nYou should be able to see the `Chartboost.CSharp.Mediation.Unity.Adapter.BidMachine` package. Choose the appropriate version and install.\r\n\r\n# Network Cecurity Configuration\r\n\r\n## Android\r\n[Android 9.0 (API 28) blocks cleartext (non-HTTPS) traffic by default](https://developer.android.com/privacy-and-security/security-config), which can prevent ads from being served correctly.\r\n\r\n\u003e **Warning** \\\r\n\u003e Failure to comply with this configuration may result in lower display rate, fill rate, rendering errors, and as a result - lower revenue.\r\n\r\nAdd a Network Security Configuration file to your AndroidManifest.xml:\r\n\r\n```xml\r\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\r\n\u003cmanifest\u003e\r\n    \u003capplication android:networkSecurityConfig=\"@xml/network_security_config\" /\u003e\r\n\u003c/manifest\u003e\r\n```\r\n\r\nIn your `network_security_config.xml` file, add base-config that sets `cleartextTrafficPermitted` to true:\r\n\r\n```xml\r\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\r\n\u003cnetwork-security-config\u003e\r\n    \u003cbase-config cleartextTrafficPermitted=\"true\"\u003e\r\n        \u003ctrust-anchors\u003e\r\n            \u003ccertificates src=\"system\" /\u003e\r\n        \u003c/trust-anchors\u003e\r\n    \u003c/base-config\u003e\r\n    \u003cdebug-overrides\u003e\r\n        \u003ctrust-anchors\u003e\r\n            \u003ccertificates src=\"user\" /\u003e\r\n        \u003c/trust-anchors\u003e\r\n    \u003c/debug-overrides\u003e\r\n\u003c/network-security-config\u003e\r\n```\r\n\r\n## iOS\r\n\r\nAdd this code to the `Info.plist` file:\r\n\r\n```plist\r\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\r\n  \u003cdict\u003e  \r\n      \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\u003ctrue/\u003e  \r\n  \u003c/dict\u003e\r\n\u003c/dict\u003e\r\n```\r\n\r\n# Usage\r\nThe following code block exemplifies usage of the `BidMachineAdapter.cs` configuration class.\r\n\r\n## IPartnerAdapterConfiguration Properties\r\n\r\n```csharp\r\n\r\n// AdapterUnityVersion - The partner adapter Unity version, e.g: 5.0.0\r\nDebug.Log($\"Adapter Unity Version: {BidMachineAdapter.AdapterUnityVersion}\");\r\n\r\n// AdapterNativeVersion - The partner adapter version, e.g: 5.2.6.0.0\r\nDebug.Log($\"Adapter Native Version: {BidMachineAdapter.AdapterNativeVersion}\");\r\n\r\n// PartnerSDKVersion - The partner SDK version, e.g: 2.6.0\r\nDebug.Log($\"Partner SDK Version: {BidMachineAdapter.PartnerSDKVersion}\");\r\n\r\n// PartnerIdentifier - The partner ID for internal uses, e.g: bidmachine\r\nDebug.Log($\"Partner Identifier: {BidMachineAdapter.PartnerIdentifier}\");\r\n\r\n// PartnerDisplayName - The partner name for external uses, e.g: BidMachine\r\nDebug.Log($\"Partner Display Name: {BidMachineAdapter.PartnerDisplayName}\");\r\n```\r\n\r\n## Test Mode\r\nTo enable test mode for the BidMachine adapter, the following property has been made available:\r\n\r\n```csharp\r\nBidMachineAdapter.TestMode = true;\r\n```\r\n\r\n## Verbose Logging\r\nTo enable verbose logging for the BidMachine adapter, the following property has been made available:\r\n\r\n```csharp\r\nBidMachineAdapter.VerboseLogging = true;\r\n```\r\n\r\n## Setting Targeting Parameters\r\n\r\nTo allow setting setting targeting parameters, the following method has been made available:\r\n\r\n```csharp\r\n// This example sets BidMachine's targeting params utilizing sample values.\r\nvar targetingInfo = new TargetingParams();\r\n\r\ntargetingInfo.UserId = \"TEST_USER_ID\";\r\ntargetingInfo.Gender = Gender.MALE;\r\ntargetingInfo.YearOfBirth = 1990;\r\n// Austin, TX\r\ntargetingInfo.Location = new Location(30.2672, 97.7431);\r\ntargetingInfo.Country = \"United States\";\r\ntargetingInfo.City = \"Austin\";\r\ntargetingInfo.Zip = \"73301\";\r\ntargetingInfo.Keywords = new[] { \"whale\", \"mobile\", \"gaming\" };\r\ntargetingInfo.BlockedApps = new[] { \"com.test.id\", \"com.test.id2\" };\r\n// https://support.aerserv.com/hc/en-us/articles/207148516-List-of-IAB-Categories\r\ntargetingInfo.BlockedCategories = new[] { \"IAB2\", \"IAB2-3\" };\r\ntargetingInfo.BlockedAdvertisers = new[] { \"tes.id.2\", \"test.id.1\" };\r\ntargetingInfo.StoreUrl = \"https://play.google.com/store/apps/details?id=com.android.chrome\";\r\ntargetingInfo.StoreId = \"com.android.chrome\";\r\ntargetingInfo.StoreCategory = \"Utilities\";\r\ntargetingInfo.StoreSubCategories = new []{ \"Internet\", \"Browser\"};\r\ntargetingInfo.Paid = false;\r\ntargetingInfo.ExternalUserIds = new Dictionary\u003cstring, string\u003e{ {\"Meta\", \"META_USER_ID\"}, {\"PLAYFAB\", \"PLAYFAB_USER_ID\"} };\r\n\r\nBidMachineAdapter.SetTargetingParams(targetingInfo);\r\n```\r\n\r\nMore information can be founds in BidMachine's [Android](https://docs.bidmachine.io/docs/in-house-mediation-android#targeting-parameters) and [iOS](https://docs.bidmachine.io/docs/in-house-mediation-ios#targeting-info) documentation.\r\n\r\n## Setting Publisher Information\r\n\r\nTo allow setting publisher information, the following method has been made available:\r\n\r\n```csharp\r\n// This example sets BidMachine's publisher info utilizing sample values.\r\nconst string publisherId = \"chartboost\";\r\nconst string publisherName = \"Chartboost\";\r\nconst string publisherDomain = \"chartboost.com\";\r\nvar categories = new[] { \"ads\", \"games\", \"mobile\" };\r\n\r\nvar publisherInfo = new PublisherInfo(publisherId, publisherName, publisherDomain, categories);\r\n\r\nBidMachineAdapter.SetPublisherInfo(publisherInfo);\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartboost%2Fchartboost-mediation-unity-adapter-bidmachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchartboost%2Fchartboost-mediation-unity-adapter-bidmachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartboost%2Fchartboost-mediation-unity-adapter-bidmachine/lists"}