Skip to content

Commit fe1de07

Browse files
authored
Merge pull request #263 from adjust/v4330
Version 4.33.0
2 parents fb74fa0 + 591fcfd commit fe1de07

36 files changed

+719
-68
lines changed

Assets/Adjust/Android/AdjustAndroid.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace com.adjust.sdk
88
#if UNITY_ANDROID
99
public class AdjustAndroid
1010
{
11-
private const string sdkPrefix = "unity4.32.2";
11+
private const string sdkPrefix = "unity4.33.0";
1212
private static bool launchDeferredDeeplink = true;
1313
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
1414
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
@@ -153,6 +153,11 @@ public static void Start(AdjustConfig adjustConfig)
153153
AndroidJavaObject ajoUrlStrategyIndia = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("URL_STRATEGY_INDIA");
154154
ajoAdjustConfig.Call("setUrlStrategy", ajoUrlStrategyIndia);
155155
}
156+
else if (adjustConfig.urlStrategy == AdjustConfig.AdjustUrlStrategyCn)
157+
{
158+
AndroidJavaObject ajoUrlStrategyCn = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("URL_STRATEGY_CN");
159+
ajoAdjustConfig.Call("setUrlStrategy", ajoUrlStrategyCn);
160+
}
156161
else if (adjustConfig.urlStrategy == AdjustConfig.AdjustDataResidencyEU)
157162
{
158163
AndroidJavaObject ajoDataResidencyEU = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("DATA_RESIDENCY_EU");
3.17 KB
Binary file not shown.

Assets/Adjust/Editor/AdjustEditor.cs

+12-7
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,13 @@ private static void RunPostBuildScript(BuildTarget target, string projectPath =
179179
Debug.Log("[Adjust]: Skipping AppTrackingTransparency.framework linking.");
180180
}
181181

182-
// The Adjust SDK needs to have Obj-C exceptions enabled.
183-
// GCC_ENABLE_OBJC_EXCEPTIONS=YES
184-
Debug.Log("[Adjust]: Enabling Obj-C exceptions by setting GCC_ENABLE_OBJC_EXCEPTIONS value to YES.");
185-
xcodeProject.AddBuildProperty(xcodeTarget, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
186-
Debug.Log("[Adjust]: Obj-C exceptions enabled successfully.");
187-
188182
// The Adjust SDK needs to have -ObjC flag set in other linker flags section because of it's categories.
189183
// OTHER_LDFLAGS -ObjC
190184
//
191185
// Seems that in newer Unity IDE versions adding -ObjC flag to Unity-iPhone target doesn't do the trick.
192186
// Adding -ObjC to UnityFramework target however does make things work nicely again.
193187
// This happens because Unity is linking SDK's static library into UnityFramework target.
194188
// Check for presence of UnityFramework target and if there, include -ObjC flag inside of it.
195-
196189
Debug.Log("[Adjust]: Adding -ObjC flag to other linker flags (OTHER_LDFLAGS) of Unity-iPhone target.");
197190
xcodeProject.AddBuildProperty(xcodeTarget, "OTHER_LDFLAGS", "-ObjC");
198191
Debug.Log("[Adjust]: -ObjC successfully added to other linker flags.");
@@ -204,6 +197,18 @@ private static void RunPostBuildScript(BuildTarget target, string projectPath =
204197
Debug.Log("[Adjust]: -ObjC successfully added to other linker flags.");
205198
}
206199

200+
// The Adjust SDK needs to have Obj-C exceptions enabled.
201+
// GCC_ENABLE_OBJC_EXCEPTIONS=YES
202+
Debug.Log("[Adjust]: Enabling Obj-C exceptions by setting GCC_ENABLE_OBJC_EXCEPTIONS value to YES.");
203+
xcodeProject.AddBuildProperty(xcodeTarget, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
204+
Debug.Log("[Adjust]: Obj-C exceptions enabled successfully.");
205+
if (!string.IsNullOrEmpty(xcodeTargetUnityFramework))
206+
{
207+
Debug.Log("[Adjust]: Enabling Obj-C exceptions by setting GCC_ENABLE_OBJC_EXCEPTIONS value to YES.");
208+
xcodeProject.AddBuildProperty(xcodeTargetUnityFramework, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
209+
Debug.Log("[Adjust]: Obj-C exceptions enabled successfully.");
210+
}
211+
207212
if (xcodeProject.ContainsFileByProjectPath("Libraries/Adjust/iOS/AdjustSigSdk.a"))
208213
{
209214
if (!string.IsNullOrEmpty(xcodeTargetUnityFramework))

0 commit comments

Comments
 (0)