-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changed c# code to send the adUnit InstanceID, and the iOS code to receive it. * Changed the iOS plugin to properly send callbacks for correct AdUnit * Removed events that are not being expected by the unity code * Updated the iOS app to be in portrait * Added the function to remove the NimbusManager from the dictionary (dealloc it) when the ad is destroyed or when an error occurs * Changed delegate visibility to internal * Removed unnecessary method * Updated the sample app to use Nimbus SDK v1.10.2
- Loading branch information
Showing
10 changed files
with
299 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// UnityBinding.swift | ||
// Unity-iPhone | ||
// | ||
// Created by Bruno Bruggemann on 6/16/21. | ||
// | ||
|
||
import Foundation | ||
|
||
class UnityBinding { | ||
|
||
private static let kCallbackTarget = "NimbusIOSAdManager" | ||
|
||
class func sendMessage(methodName: String, params: [String: Any]) { | ||
do { | ||
let jsonData = try JSONSerialization.data(withJSONObject: params, options: JSONSerialization.WritingOptions()) | ||
let jsonString = String(data: jsonData, encoding: .utf8) | ||
|
||
UnitySendMessage(kCallbackTarget, methodName, jsonString); | ||
} catch { | ||
print("Error creating json object: \(error)") | ||
return | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.