Skip to content

Commit ad38509

Browse files
authored
feat: android/ios attributes (#106)
1 parent f64413f commit ad38509

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3699
-356
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ To enable crash reporting, ensure the `Enable iOS Crash Reporting` and `Enable A
8282

8383
Note that sometimes iOS applications won't crash while the USB cable is connected. If this happens, disconnect the USB cable and re-run the application to trigger a crash.
8484

85+
> [!NOTE]
86+
> The Unreal iOS project's build process includes a `Build Phase called Generate dSYM for archive, and strip`, which executes after the Unreal PostBuildSteps. However, this Build Phase must complete before the `dSYM` file (debug symbols) is generated. Due to this timing, BugSplat cannot upload the `dSYM` immediately during the initial build. Instead, BugSplat will upload the `dSYM` during the next incremental build in Xcode. Alternatively, you can follow the [example](https://github.com/BugSplat-Git/bugsplat-apple/blob/main/Symbol_Upload_Examples/Build-Phase-symbol-upload.sh) in our bugsplat-apple repo to configure your a custom Build Phase for symbol uploads.
87+
88+
8589
### Xbox and PlayStation
8690

8791
BugSplat can provide instructions for implementing Unreal crash reporting on Xbox and PlayStation. Please email us at [[email protected]](mailto:[email protected]) for more info.

Source/BugSplatRuntime/BugSplatRuntime.Build.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,29 @@ public BugSplatRuntime(ReadOnlyTargetRules Target) : base(Target)
6363

6464
if (Target.Platform == UnrealTargetPlatform.IOS)
6565
{
66-
PublicAdditionalFrameworks.Add(new Framework("Bugsplat", "../ThirdParty/IOS/Bugsplat.embeddedframework.zip", ""));
66+
// Path to the framework directory
67+
string FrameworkPath = Path.Combine(ModuleDirectory, "../ThirdParty/IOS");
6768

69+
// Add the framework (unzipped from .embeddedframework.zip by UPL)
70+
PublicAdditionalFrameworks.Add(new Framework("BugSplat", Path.Combine(FrameworkPath, "BugSplat.embeddedframework.zip"), ""));
71+
72+
// Add the framework's Headers directory to the include path
73+
PublicIncludePaths.Add(Path.Combine(FrameworkPath, "BugSplat.framework/Headers"));
74+
75+
// Dependencies
6876
PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });
69-
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
7077

71-
AdditionalPropertiesForReceipt.Add("IOSPlugin", Path.Combine(PluginPath, "Bugsplat_IOS_UPL.xml"));
78+
// UPL path
79+
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
80+
AdditionalPropertiesForReceipt.Add("IOSPlugin", Path.Combine(PluginPath, "BugSplat_IOS_UPL.xml"));
7281
}
7382

7483
if (Target.Platform == UnrealTargetPlatform.Android)
7584
{
7685
PublicDependencyModuleNames.AddRange(new string[] { "Launch" });
7786
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
7887

79-
AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "Bugsplat_Android_UPL.xml"));
88+
AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "BugSplat_Android_UPL.xml"));
8089

8190
PublicDefinitions.Add("DOXYGEN=0");
8291
}

Source/BugSplatRuntime/Bugsplat_Android_UPL.xml renamed to Source/BugSplatRuntime/BugSplat_Android_UPL.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127

128128
<proguardAdditions>
129129
<insert>
130-
-keep class com.bugsplat.android.BugSplatBridge { *; }
131-
-keepclassmembers class com.bugsplat.android.BugSplatBridge { *; }
130+
-keep class com.bugsplat.android.BugSplat { *; }
131+
-keepclassmembers class com.bugsplat.android.BugSplat { *; }
132132
</insert>
133133
</proguardAdditions>
134134
</root>

Source/BugSplatRuntime/Bugsplat_IOS_UPL.xml renamed to Source/BugSplatRuntime/BugSplat_IOS_UPL.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<init>
4-
<log text="Bugsplat SDK iOS UPL initialization"/>
5-
<copyDir src="$S(PluginDir)/../ThirdParty/IOS/Bugsplat.framework" dst="$S(BuildDir)/Frameworks/Bugsplat.framework" />
4+
<log text="BugSplat SDK iOS UPL initialization"/>
5+
<copyDir src="$S(PluginDir)/../ThirdParty/IOS/BugSplat.framework" dst="$S(BuildDir)/Frameworks/BugSplat.framework" />
66

77
<setBoolFromProperty result="bEnableCrashReporting" ini="Engine" section="/Script/BugSplatRuntime.BugSplatEditorSettings" property="bEnableCrashReportingIos" default="true" />
88
<setBoolFromProperty result="bUploadSymbols" ini="Engine" section="/Script/BugSplatRuntime.BugSplatEditorSettings" property="bUploadDebugSymbols" default="true" />
@@ -14,10 +14,10 @@
1414
<iosPListUpdates>
1515
<if condition="bEnableCrashReporting">
1616
<true>
17-
<setElement result="BugsplatServerURLKey" xml="&lt;key&gt;BugsplatServerURL&lt;/key&gt;"/>
18-
<addElement tag="dict" name="BugsplatServerURLKey" />
19-
<setElement result="BugsplatServerURLValue" xml="&lt;string&gt;https://$S(DatabaseName).bugsplat.com/&lt;/string&gt;"/>
20-
<addElement tag="dict" name="BugsplatServerURLValue" />
17+
<setElement result="BugSplatDatabaseKey" xml="&lt;key&gt;BugSplatDatabase&lt;/key&gt;"/>
18+
<addElement tag="dict" name="BugSplatDatabaseKey" />
19+
<setElement result="BugSplatDatabaseValue" xml="&lt;string&gt;$S(DatabaseName)&lt;/string&gt;"/>
20+
<addElement tag="dict" name="BugSplatDatabaseValue" />
2121
<setElement result="CFBundleVersionKey" xml="&lt;key&gt;CFBundleVersion&lt;/key&gt;"/>
2222
<addElement tag="dict" name="CFBundleVersionKey" />
2323
<setElement result="CFBundleVersionValue" xml="&lt;string&gt;$S(VersionNumber)-ios&lt;/string&gt;"/>

0 commit comments

Comments
 (0)