Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Core-SDK/Assets/MoEngage/Scripts/Internal/Utils/MoEConstants.cs
#	changelogs/cards.md
#	changelogs/geofence.md
#	changelogs/moengage.md
  • Loading branch information
RakshithaAcharya committed Aug 7, 2024
2 parents 3bff30b + f60679f commit bd9bbb8
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cards/Assets/Cards/Editor/CardsDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</androidPackages>

<iosPods>
<iosPod name="MoEngageCards" version="~> 4.16.0" minTargetSdk="11.0">
<iosPod name="MoEngage-iOS-SDK/Cards" version="9.18.1" minTargetSdk="11.0">
</iosPod>
</iosPods>
</dependencies>
2 changes: 1 addition & 1 deletion Core-SDK/Assets/MoEngage/Editor/MoEngageDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- iOS Cocoapod dependencies can be specified by each iosPod element. -->
<iosPods>
<iosPod name="MoEngagePluginBase" version="~> 4.8.2" minTargetSdk="11.0">
<iosPod name="MoEngagePluginBase" version="5.0.0" minTargetSdk="11.0">
</iosPod>
</iosPods>
</dependencies>
4 changes: 2 additions & 2 deletions Core-SDK/Assets/MoEngage/Editor/PostProcessBuild_iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ public static void PostProcessBuild_iOS(BuildTarget target, string buildPath)
{
using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
{
sw.WriteLine("\ntarget '" + NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME + "' do\n pod 'MoEngageRichNotification', '~> 7.16.0' \nend");
sw.WriteLine("\ntarget '" + PUSH_TEMPLATES_EXTENSION_TARGET_NAME + "' do\n pod 'MoEngageRichNotification', '~> 7.16.0' \nend");
sw.WriteLine("\ntarget '" + NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME + "' do\n pod 'MoEngage-iOS-SDK/RichNotification','9.18.1' \nend");
sw.WriteLine("\ntarget '" + PUSH_TEMPLATES_EXTENSION_TARGET_NAME + "' do\n pod 'MoEngage-iOS-SDK/RichNotification','9.18.1' \nend");
}
}

Expand Down
2 changes: 2 additions & 0 deletions Core-SDK/Assets/MoEngage/Plugins/iOS/MoEngageUnityUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ + (MoEngageDataCenter)fetchDataCenter {
return MoEngageDataCenterData_center_04;
} else if ([dataCenter isEqualToString:@"DATA_CENTER_05"]){
return MoEngageDataCenterData_center_05;
} else if ([dataCenter isEqualToString:@"DATA_CENTER_06"]){
return MoEngageDataCenterData_center_06;
}
#endif
return MoEngageDataCenterData_center_01;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ static class MoEConstants
/* ****************************** Init Config Keys ***************************************** */
public const string KEY_INIT_CONFIG = "initConfig";
public const string KEY_PUSH_CONFIG = "pushConfig";
public const string KEY_ANALYTICS_CONFIG = "analyticsConfig";


/* ****************************** Analytics Config Keys ***************************************** */
public const string KEY_SHOULD_TRACK_BOOLEAN_AS_NUMBER = "shouldTrackUserAttributeBooleanAsNumber";

/* ****************************** User Delete Keys ***************************************** */
public const string PARAM_IS_SUCCESS = "isSuccess";
Expand All @@ -149,6 +151,6 @@ static class MoEConstants

public static class MoEUnityConstants {
/* ****************************** Plugin Version ***************************************** */
public const string PLUGIN_VERSION = "3.2.0";
public const string PLUGIN_VERSION = "4.0.0";
}
}
25 changes: 23 additions & 2 deletions Core-SDK/Assets/MoEngage/Scripts/Internal/Utils/MoEUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,20 @@ public class MoEUtils {

return payloadDict;
}

static Dictionary < string, object > GetAnalyticsConfigPayload(Boolean shouldTrackBooleanAsNumber) {
var payloadDict = new Dictionary < string,
object > () {
{
MoEConstants.KEY_SHOULD_TRACK_BOOLEAN_AS_NUMBER, shouldTrackBooleanAsNumber
}
};

public static string GetInitializePayload(string gameObjectName, string appId, string shouldDeliverCallbackOnForegroundClick) {
var dataPayload = new Dictionary < string,
return payloadDict;
}

public static string GetInitializePayload(string gameObjectName, string appId, string shouldDeliverCallbackOnForegroundClick, Boolean shouldTrackBooleanAsNumber) {
var dataPayload = new Dictionary < string,
object > () {
{
MoEConstants.PAYLOAD_GAME_OBJECT,
Expand All @@ -52,6 +63,12 @@ public static string GetInitializePayload(string gameObjectName, string appId, s
}
};

var initConfigPayload = new Dictionary<string, object> {
{
MoEConstants.KEY_ANALYTICS_CONFIG, GetAnalyticsConfigPayload(shouldTrackBooleanAsNumber)
}
};

var payloadDict = new Dictionary < string,
object > {
{
Expand All @@ -64,6 +81,10 @@ public static string GetInitializePayload(string gameObjectName, string appId, s
{
MoEConstants.KEY_INTEGRATION_META,
integrationMetaPayload
},
{
MoEConstants.KEY_INIT_CONFIG,
initConfigPayload
}
};

Expand Down
6 changes: 5 additions & 1 deletion Core-SDK/Assets/MoEngage/Scripts/MoEGameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public class MoEGameObject: MonoBehaviour {
[SerializeField]
private string shouldDeliverCallbackOnForegroundClick;

[SerializeField]
private Boolean shouldTrackBooleanAsNumber = false;

private
const string TAG = "MoEGameObject";

Expand All @@ -42,7 +45,8 @@ void Start() {
MoEngageClient.Initialize(
gameObject,
appId,
shouldDeliverCallbackOnForegroundClick);
shouldDeliverCallbackOnForegroundClick,
shouldTrackBooleanAsNumber);
}

public void PushToken(string payload) {
Expand Down
4 changes: 2 additions & 2 deletions Core-SDK/Assets/MoEngage/Scripts/MoEngageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ void Awake() {
/// </summary>
/// <param name="gameObject">Instance of Game Object</param>
/// <param name="appId">Account Identifier</param>
public static void Initialize(GameObject gameObject, string appId, string shouldDeliverCallbackOnForegroundClick = null) {
public static void Initialize(GameObject gameObject, string appId, string shouldDeliverCallbackOnForegroundClick = null, Boolean shouldTrackBooleanAsNumber = false) {
MoEngageClient.appId = appId;
string gameObjPayload = MoEUtils.GetInitializePayload(gameObject ? gameObject.name : null, appId, shouldDeliverCallbackOnForegroundClick);
string gameObjPayload = MoEUtils.GetInitializePayload(gameObject ? gameObject.name : null, appId, shouldDeliverCallbackOnForegroundClick, shouldTrackBooleanAsNumber);
Debug.Log(TAG + " : Initialize:: payload: " + gameObjPayload);

#if(UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
Expand Down
2 changes: 1 addition & 1 deletion Geofence/Assets/Geofence/Editor/GeofenceDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</androidPackages>
<!-- iOS Cocoapod dependencies can be specified by each iosPod element. -->
<iosPods>
<iosPod name="MoEngagePluginGeofence" version="~> 2.8.0" minTargetSdk="11.0">
<iosPod name="MoEngagePluginGeofence" version="3.0.0" minTargetSdk="11.0">
</iosPod>
</iosPods>
</dependencies>
5 changes: 5 additions & 0 deletions changelogs/cards.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 07-08-2024

- iOS
- Updated the MoEngageCards dependency to `4.17.1`

# 26-04-2024

- iOS
Expand Down
6 changes: 6 additions & 0 deletions changelogs/geofence.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 07-08-2024
## 2.0.0

- iOS
- Updated the MoEngageGeofence dependency to `5.17.1` and above.

# 26-04-2024

## 1.2.0
Expand Down
9 changes: 9 additions & 0 deletions changelogs/moengage.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# MoEngage

# 07-08-2024

## 4.0.0
- Added boolean user attribute tracking customization in initialization API
- iOS
- Updated the MoEngage-iOS-SDK dependency to `9.18.1` and above.
- Added DC-06 support.


# 26-04-2024

## 3.2.0
Expand Down
2 changes: 1 addition & 1 deletion iOS/MoEngageConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define kMoEngageAppID @"YOUR APPID"

/// Set DataCenter
#define kMoEngageRegion NULL// DATA_CENTER_01/DATA_CENTER_02/DATA_CENTER_03/DATA_CENTER_04/DATA_CENTER_05
#define kMoEngageRegion NULL// DATA_CENTER_01/DATA_CENTER_02/DATA_CENTER_03/DATA_CENTER_04/DATA_CENTER_05/DATA_CENTER_06

/// Set Xcode console logs
#define kMoEngageLogsEnabled YES // YES/NO
Expand Down

0 comments on commit bd9bbb8

Please sign in to comment.