Skip to content

Commit

Permalink
Add IOS and Linux support (#43)
Browse files Browse the repository at this point in the history
add(platforms): Add Linux and IOS support as target platforms.
Add necessary c-core static libs for those platforms.
  • Loading branch information
KGronek-Pubnub authored Feb 6, 2025
1 parent 759dff0 commit 82dd7c5
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ version: 0.2.4
schema: 1
scm: github.com/pubnub/unreal-engine
changelog:
- date: 2024-02-06
version: 0.2.5
changes:
- type: feature
text: "Add plugin support for Linux and IOS projects."
- date: 2024-01-21
version: 0.2.4
changes:
Expand Down Expand Up @@ -220,6 +225,8 @@ supported-platforms:
- version: PubNub Unreal Engine SDK
platforms:
- Windows
- Mac OS
- Mac OS
- IOS
- Unix
- Android

12 changes: 8 additions & 4 deletions PubnubLibrary.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 4,
"VersionName": "0.2.4",
"Version": 5,
"VersionName": "0.2.5",
"FriendlyName": "Pubnub Unreal SDK",
"Description": "Quickly add interactive features to your game that scale without building your backend infrastructure.",
"Category": "Code",
Expand All @@ -17,7 +17,9 @@
"SupportedTargetPlatforms": [
"Win64",
"Mac",
"Android"
"Android",
"IOS",
"Linux"
],
"Modules": [
{
Expand All @@ -27,7 +29,9 @@
"PlatformAllowList": [
"Win64",
"Mac",
"Android"
"Android",
"IOS",
"Linux"
]
}
]
Expand Down
4 changes: 4 additions & 0 deletions Source/PubnubLibrary/Private/Threads/PubnubFunctionThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include "Mac/MacPlatformProcess.h"
#elif PLATFORM_ANDROID
#include "Android/AndroidPlatformProcess.h"
#elif PLATFORM_IOS
#include "Ios/IosPlatformProcess.h"
#elif PLATFORM_LINUX
#include "Linux/LinuxPlatformProcess.h"
#else
#error "Platform not supported"
#endif
Expand Down
4 changes: 4 additions & 0 deletions Source/PubnubLibrary/Private/Threads/PubnubLoopingThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include "Mac/MacPlatformProcess.h"
#elif PLATFORM_ANDROID
#include "Android/AndroidPlatformProcess.h"
#elif PLATFORM_IOS
#include "Ios/IosPlatformProcess.h"
#elif PLATFORM_LINUX
#include "Linux/LinuxPlatformProcess.h"
#else
#error "Platform not supported"
#endif
Expand Down
14 changes: 14 additions & 0 deletions Source/ThirdParty/sdk/PubNubModule/PubNubModule.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ public PubNubModule(ReadOnlyTargetRules Target) : base(Target)
binary = $"libpubnub.{extention}";
BuildLocation = "lib/arm64";
}
else if(Target.Platform == UnrealTargetPlatform.IOS)
{
extention = StaticLink ? "a" : "dylib";
PlatformLib = OpenSsl ? "openssl" : "posix";
binary = $"libpubnub.{extention}";
BuildLocation = "lib/ios";
}
else if(Target.Platform == UnrealTargetPlatform.Linux)
{
extention = StaticLink ? "a" : "dylib";
PlatformLib = OpenSsl ? "openssl" : "posix";
binary = $"libpubnub.{extention}";
BuildLocation = "lib/linux";
}
else
{
System.Console.WriteLine("Error - this target platform is not supported");
Expand Down
Binary file added Source/ThirdParty/sdk/lib/IOS/libpubnub.a
Binary file not shown.
Binary file modified Source/ThirdParty/sdk/lib/MacOS/libpubnub.a
Binary file not shown.
Binary file modified Source/ThirdParty/sdk/lib/arm64/libpubnub.a
Binary file not shown.
Binary file added Source/ThirdParty/sdk/lib/linux/libpubnub.a
Binary file not shown.
Binary file modified Source/ThirdParty/sdk/lib/win64/pubnub.lib
Binary file not shown.

0 comments on commit 82dd7c5

Please sign in to comment.