Closed EddieLongStockings closed 5 years ago
These are windows only pragma wrappers (akin to pragma mark in xcode) I've added compile ifs, see here: https://github.com/getnamo/socketio-client-ue4/pull/20/commits/dbbd34b12de28c68397da76ba5697501d1b90ff9 which has been merged into master, let me know if that solves the issue.
If you're compiling for iOS do remember that you will need to update the underlying libraries for iOS as well. Make a pull request if you get it working!
It compiles but doesn't want to connect to the socket server. I'm not entirely sure if it's a library issue or a security one. (I'm not seeing it time out or fail.) I'm not seeing iOS in the link you sent over, where would I get the underlying libraries?
Either you modify https://github.com/getnamo/socketio-client-prebuild to build for iOS or you build the libraries directly for iOS from https://github.com/socketio/socket.io-client-cpp which links with the UE4 plugin.
Ok, I tried both options but went with this one (As I got it to work): https://github.com/socketio/socket.io-client-cpp
Is that it? Is there a place the library should be called in this plugin?
Great! The next steps are:
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
isLibrarySupported = true;
string PlatformString = "IOS";
string BoostLibPath = Path.Combine(BoostThirdParty, "Lib");
string SocketLibPath = Path.Combine(SocketIOThirdParty, "Lib");
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, PlatformString, "libboost_date_time-clang39-mt-1_60.a"));
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, PlatformString, "libboost_random-clang39-mt-1_60.a"));
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, PlatformString, "libboost_system-clang39-mt-1_60.a"));
PublicAdditionalLibraries.Add(Path.Combine(SocketLibPath, PlatformString, "libsioclient.a"));
}
We are now referencing the path you made earlier, and formatting it the same way as e.g. linux one and it will find the libs with a difference of your platform string should be "IOS" and your lib names should be the one you've built, either that or rename them to keep consistency.
That should be it, but I haven't built for iOS platform before so there may be some extra gotchas that I'm unaware of.
Long story short: Still not seeing any socket activity. No timeouts or anything etc..
Ok, I've modified SocketIOClient.Build.cs and added the following:
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
isLibrarySupported = true;
string PlatformString = "IOS";
string BoostLibPath = Path.Combine(BoostThirdParty, "Lib");
string SocketLibPath = Path.Combine(SocketIOThirdParty, "Lib");
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, PlatformString, "libboost_date_time.a"));
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, PlatformString, "libboost_random.a"));
PublicAdditionalLibraries.Add(Path.Combine(BoostLibPath, PlatformString, "libboost_system.a"));
PublicAdditionalLibraries.Add(Path.Combine(SocketLibPath, PlatformString, "libsioclient.a"));
}
Build boost 1.6 I'm not sure, but I think that was done when I ran bash ./boost.sh
More details: https://github.com/socketio/socket.io-client-cpp/tree/master/examples/iOS
As a result I received a number of libraries separated into different folders:
arm6 arm64 etc
Update: I was able to plug the device into Xcode and get the UE4 logs:
========= This app is in LANDSCAPE mode
LogModuleManager:Warning: ModuleManager: Module 'XMPP' not found - its StaticallyLinkedModuleInitializers function is null.
LogModuleManager:Warning: ModuleManager: Module 'OnlineSubsystemMCP' not found - its StaticallyLinkedModuleInitializers function is null.
LogOnline:Display: FOnlineSubsystemIOSModule::StartupModule()
LogOnline:Display: FOnlineSubsystemIOS::Init()
LogOnline:Display: FOnlineSessionIOS::FOnlineSessionIOS(FOnlineSubsystemIOS* InSubsystem)
LogOnline:Display: FOnlineLeaderboardsIOS::FOnlineLeaderboardsIOS()
LogOnline:Display: FOnlineSubsystemIOS::FOnlineAchievementsIOS()
LogMetal:Display: Adapter Name: Metal
LogMetal:Display: Driver Version: (internal:, unified:)
LogMetal:Display: Driver Date:
LogMetal:Display: Vendor:
LogIOS:Display: Got a bulk data texture, with 1 mips
LogMoviePlayer:Warning: FAVMoviePlayer init. Path count = 1...
LogMoviePlayer:Warning: Couldn't find movie: Default_Startup
LogInit:Display: Game Engine Initialized.
LogInit:Display: Starting Game.
LogMoviePlayer:Warning: FAVMoviePlayer init. Path count = 1...
LogMoviePlayer:Warning: Couldn't find movie: Default_Startup
LogGameMode:Display: Match State Changed from EnteringMap to WaitingToStart
LogGameMode:Display: Match State Changed from WaitingToStart to InProgress
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
LogScript:Warning: Accessed None trying to read property SocketIOClient
BPSocketIOClient_C /Game/SaraStuff/IntroductionPage.IntroductionPage:PersistentLevel.BPSocketIOClient_44
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect:0082
LogScript:Warning: Script call stack:
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:Request Complete
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:ExecuteUbergraph_DROGameInstance
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:On Request Login
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect
LogScript:Warning: Attempted to assign to None
BPSocketIOClient_C /Game/SaraStuff/IntroductionPage.IntroductionPage:PersistentLevel.BPSocketIOClient_44
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect:0097
LogScript:Warning: Script call stack:
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:Request Complete
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:ExecuteUbergraph_DROGameInstance
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:On Request Login
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect
LogScript:Warning: Accessed None trying to read property SocketIOClient
BPSocketIOClient_C /Game/SaraStuff/IntroductionPage.IntroductionPage:PersistentLevel.BPSocketIOClient_44
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect:012E
LogScript:Warning: Script call stack:
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:Request Complete
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:ExecuteUbergraph_DROGameInstance
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:On Request Login
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect
LogScript:Warning: Accessed None
BPSocketIOClient_C /Game/SaraStuff/IntroductionPage.IntroductionPage:PersistentLevel.BPSocketIOClient_44
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:fct Update Connection Status:00D3
LogScript:Warning: Script call stack:
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:Request Complete
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:ExecuteUbergraph_DROGameInstance
Function /Game/TreysStuff/DROGameInstance.DROGameInstance_C:On Request Login
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:Begin Connect
Function /Game/TreysStuff/BPSocketIOClient.BPSocketIOClient_C:fct Update Connection Status
Domino RollOut >
Looks like the problem is: LogScript:Warning: Accessed None trying to read property SocketIOClient
I'm not entirely sure if that is related to the libraries or not, however the socket does connect ok without issues when running on Windows.
There's no rush or anything, but if you have any ideas please send me a note when you're able.
Thanks!
Looks good, have you added iOS to the whitelist in the uplugin? https://github.com/getnamo/socketio-client-ue4/blob/master/SocketIOClient.uplugin
should be now
"WhitelistPlatforms": [
"Win64",
"Win32",
"Linux",
"IOS"
]
Got it. I didn't do that. Here's the output for reference:
LogPlayLevel: UnrealBuildTool: Upload took 00:00:00.3563408
LogPlayLevel: UnrealBuildTool: Execute took 00:00:17.3885738
LogPlayLevel: UnrealBuildTool: In file included from /Game/Plugins/socketio-client-ue4/Intermediate/Build/IOS/2/Development/SocketIOClient/Module.SocketIOClient.cpp:5:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:78: error: 'auto' not allowed in lambda parameter
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: EmitNative(EventName, JsonMessage, [&, Target, CallbackFunctionName, this](auto Response)
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^~~~
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Game/Plugins/socketio-client-ue4/Intermediate/Build/IOS/2/Development/SocketIOClient/Module.SocketIOClient.cpp:2:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SIOLambdaRunnable.cpp:3:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientPrivatePCH.h:3:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Public/SocketIOClient.h:5:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Engine/Source/Runtime/Core/Public/Modules/ModuleManager.h:5:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Engine/Source/Runtime/Core/Public/Modules/ModuleInterface.h:6:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: In file included from /Engine/Source/Runtime/Core/Public/Core.h:28:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Function.h:238:4: error: no matching function for call to 'Invoke'
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Invoke(*(Functor*)Obj, Forward<ParamTypes>(Params)...);
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^~~~~~
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Function.h:283:91: note: in instantiation of member function 'UE4Function_Private::TFunctionRefCaller<(lambda at /Users/emelvillemac/UE4/Builds/TREYBEAR/E/Unreal Harddrive/Master SVN Projects/ RO - Pe
rforce/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38), void (const TArray<TSharedPtr<FJsonValue, ESPMode::NotThreadSafe>, FDefaultAllocator> &)>::Call' requested here
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Callable = &UE4Function_Private::TFunctionRefCaller<FunctorType, Ret (ParamTypes...)>::Call;
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Function.h:570:10: note: in instantiation of function template specialization 'UE4Function_Private::TFunctionRefBase<TFunction<void (const TArray<TSharedPtr<FJsonValue, ESPMode::NotThreadSafe>, FDefaultAllo
cator> &)>, void (const TArray<TSharedPtr<FJsonValue, ESPMode::NotThreadSafe>, FDefaultAllocator> &)>::Set<(lambda at /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38)>' requested here
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Super::Set(&NewObj->Obj);
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38: note: in instantiation of function template specialization 'TFunction<void (const TArray<TSharedPtr<FJsonValue, ESPMode::NotThreadSafe>
, FDefaultAllocator> &)>::TFunction<(lambda at /Game/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38), void>' requested here
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: EmitNative(EventName, JsonMessage, [&, Target, CallbackFunctionName, this](auto Response)
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Invoke.h:48:18: note: candidate template ignored: could not match 'ReturnType ObjType::*' against '(lambda at /Users/emelvillemac/UE4/Builds/TREYBEAR/E/Unreal Harddrive/Master SVN Projects/ RO - Perfo
rce/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38)'
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: FORCEINLINE auto Invoke(ReturnType ObjType::*pdm, CallableType&& Callable)
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Invoke.h:55:18: note: candidate template ignored: could not match 'ReturnType (ObjType::*)(PMFArgTypes...)' against '(lambda at /Users/emelvillemac/UE4/Builds/TREYBEAR/E/Unreal Harddrive/Master SVN Projects
/ RO - Perforce/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38)'
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: FORCEINLINE auto Invoke(ReturnType (ObjType::*PtrMemFun)(PMFArgTypes...), CallableType&& Callable, ArgTypes&&... Args)
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Invoke.h:62:18: note: candidate template ignored: could not match 'ReturnType (ObjType::*)(PMFArgTypes...) const' against '(lambda at /Users/emelvillemac/UE4/Builds/TREYBEAR/E/Unreal Harddrive/Master SVN Pr
ojects/ RO - Perforce/Plugins/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38)'
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: FORCEINLINE auto Invoke(ReturnType (ObjType::*PtrMemFun)(PMFArgTypes...) const, CallableType&& Callable, ArgTypes&&... Args)
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Engine/Source/Runtime/Core/Public/Templates/Invoke.h:41:18: note: candidate template ignored: substitution failure [with FuncType = (lambda at /Game/Plugins
/socketio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38) &, ArgTypes = <const TArray<TSharedPtr<FJsonValue, ESPMode::NotThreadSafe>, FDefaultAllocator> &>]: no matching function for call to object of type '(lambda at /Game/Plugins/socke
tio-client-ue4/Source/SocketIOClient/Private/SocketIOClientComponent.cpp:195:38)'
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: FORCEINLINE auto Invoke(FuncType&& Func, ArgTypes&&... Args)
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: 2 errors generated.
LogPlayLevel: UnrealBuildTool: Doing bash -c 'if [ -e "/Game/Plugins/socketio-client-ue4/Binaries/IOS/2-SocketIOClient.a" ]; then eval $(stat -s "/Game/Plug
ins/socketio-client-ue4/Binaries/IOS/2-SocketIOClient.a") && echo $st_mtime,$st_size; fi'
LogPlayLevel: UnrealBuildTool: Execute took 00:00:00.1981887
LogPlayLevel: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: /Game/Plugins/socketio-client-ue4/Binaries/IOS/2-SocketIOClient.a
LogPlayLevel: UnrealBuildTool: Total build time: 66.32 seconds
LogPlayLevel: CommandUtils.Run: Run: Took 66.3422343s to run UnrealBuildTool.exe, ExitCode=5
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): D:\Engine\Binaries\DotNET\UnrealBuildTool.exe 2 IOS Development -Project="E:\game\
2.uproject" "E:\game\2.uproject" -remoteini="E:\game" -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.11.28-09.52.11.txt'
LogPlayLevel: at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 907
LogPlayLevel: at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtil
s.cs:line 860
LogPlayLevel: at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\UBTUtils.cs:line 51
LogPlayLevel: at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\UBTUtils.cs:line 89
LogPlayLevel: at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars) in D:\UnrealEngine - 414 - Su
bstance - Git\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:line 365
LogPlayLevel: at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionary`2 InTargetToManifest)
in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:line 1492
LogPlayLevel: at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) in d:\Engine\Source\Programs\AutomationTool\Scripts\BuildProjectCommand.Automation.cs:line 172
LogPlayLevel: at BuildCookRun.DoBuildCookRun(ProjectParams Params) in d:\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 211
LogPlayLevel: at AutomationTool.BuildCommand.Execute() in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 27
LogPlayLevel: at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 547
LogPlayLevel: at AutomationTool.Automation.Process(String[] Arguments) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 517
LogPlayLevel: at AutomationTool.Program.MainProc(Object Param) in D:\Engine\Source\Programs\AutomationTool\Program.cs:line 135
LogPlayLevel: at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param) in D:\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 704
LogPlayLevel: at AutomationTool.Program.Main() in D:\Engine\Source\Programs\AutomationTool\Program.cs:line 59
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=5 (5)
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 71.317989
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Deployment failed! Unknown Error
looks like the IOS compiler is using a stricter form of C++11, I will need to be explicit in some of my lambda use. Can you merge your changes (added libs/etc) to the platforms branch? I want to check out the bugs on a system to patch in the changes needed.
If you're having merge issues, just make a new branch off of dev and publish your fork for me to see
added https://github.com/getnamo/socketio-client-ue4/commit/4b2729428a6cca1e0bbaeb1854a7d66bfea99ad8 which should fix the error your logs came back with. Merge that change and try again, let me know if more compile bugs show up.
Ok, I think I've done it. Let me know if I dropped the ball on anything.
I know I've messed up on some commits. Give me a few to sort things out.
no worries, just remove the last commit and redo the pull request (if you're having problems with reverting, just delete and re-fork)
try to compile your platform fork btw, it contains a fix that might make it work
Latest build output:
LogPlayLevel: UnrealBuildTool: Execute took 00:00:17.0712709
LogPlayLevel: UnrealBuildTool: In file included from /Users//UE4/Builds//E/Unreal Harddrive/Master SVN Projects/ RO - Perforce/Plugins/socketio-client-ue4/Intermediate/Build/IOS/SemiFutureDuplex2/Development/SIOJson/Module.SIOJson.cpp:2:
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Users//UE4/Builds//E/Unreal Harddrive/Master SVN Projects/ RO - Perforce/Plugins/socketio-client-ue4/Source/SIOJson/Private/SIOJConvert.cpp:75:9: error: unknown pragma ignored [-Werror,-Wunknown-pragmas]
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: #pragma endregion ToJsonValue
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: /Users//UE4/Builds//E/Unreal Harddrive/Master SVN Projects/ RO - Perforce/Plugins/socketio-client-ue4/Source/SIOJson/Private/SIOJConvert.cpp:159:9: error: unknown pragma ignored [-Werror,-Wunknown-pragmas]
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: #pragma endregion ToJsonValue
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: 2 errors generated.
I was trying to resolve this with the last commit... hence the delay. Sorry!
weird I had that fixed, how did it get reverted! Gimmy a sec.
Edit: nope missed these pragmas, fixing...
Ok resync to latest platforms branch, I've added the conditional compile around windows platform here https://github.com/getnamo/socketio-client-ue4/commit/65e9ffb3b0edcf388527df0be3ae0b1a01a4d549
Ok, it built successfully. Tested on an iPad -- Now says "Disconnected". Let me grab the logs to see if there's anything new there.
Ok, it's saying "Invalid URI" when testing with Xcode.
I've tried:
Also set it as the default Address and Port on the component just to be safe. Fail events are firing (Yay)
Great progress, are those ports open on your router/firewall?
Oh yeah. I suppose it wouldn't work in the UE4 viewport if that was the case. It could be some kind of security related issue on the iPad.
However, we are using VaRest. At first that didn't work until I added the following to the "Additional Plist Data" field in the iOS packaging settings:
<key>NSAppTransportSecurity</key>
<dict><key>NSExceptionDomains</key>
<dict><key>mydomainname.net</key>
<dict><!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key><true/>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string></dict> </dict></dict>
<key>NSAppTransportSecurity</key> <dict>
<key>NSAllowsArbitraryLoads</key><true/> </dict>
Since I added that, all the security related issues went away for VaRest so I'm assuming the same for Socket IO.
I was thinking more along the lines of making sure you could access your server IP. Otherwise I'd need to whip out my old macbook and try and build ue4 for ios to see what mismatch there could still be.
It's most likely not that. I went ahead and ran the Xcode project here on my phone(The one mentioned above that I used for building the libs). Connected to 162.243.199.67:7789.
Here is a screenshot of the logs:
Sounds like your server is correctly configured.
So the url that you connect definitely needs the http:// before so it should be http://162.243.199.67:7789 in your case. Got a log in your saved folder from when you try connect/fail? Contrast the logs from the windows run vs the ios run.
The other avenue of problem I can think of is that libraries mismatch. I do think they should work regardless in theory, but perhaps try building boost/socket io libs from these sources: https://github.com/getnamo/socketio-client-prebuild/tree/master/src would work
I've confirmed that the http:// is before the ip. I've also gone ahead and tried ws:// just to be safe.
It connects fine in the viewport (UE4 PC), just not on mobile devices. As far as I know, the logs you're seeing are basically it in that case.
I'll look into trying to rebuild from the link above (I wasn't able to get it to work the first time).
I'm thinking the mac build will be similar to the ios build, but it might be easier to debug (and I'm assuming you're using a mac to build for the ios). Want to fill the libraries for mac os and see that works as intended?
Hello - with regards to this (I know it's almost 6 months old) is it just that IOS requires a secure connection? Could it be just that you need to connect to a HTTPS server?
Anyone with Mac/iOS builds who can compile from a project, please try the latest master build and let me know if any bugs crop up
@getnamo I have just compiled my test project for iOS and it worked fine. I launched it to my iPhone from UE editor) with 4.22 and plugin version 1.0.0. There were some issues that I had to tackle, but all of them unrelated to the plugin, other than that I had to whitelist IOS for all but the editor component. So again: green lights!
Oh .... it's important to check the option "Allow web connections to non-HTTPS sites" in Platforms -> iOS -> Online settings.
Excellent news, thanks for confirming! I'll white list it for the next release and add a note about the non https setting in the readme. SSL support is the next high priority target.
Ok so iOS and Lumin platforms have been whitelisted, and a note about non-ssl connections added in the readme https://github.com/getnamo/socketio-client-ue4#ios
Oh .... it's important to check the option "Allow web connections to non-HTTPS sites" in Platforms -> iOS -> Online settings.
@iambeeblebrox @getnamo Though I check this option, the connection still fails on iOS platform,but works fine in the editor and Windows platform.
Ok I think I got this work. First,using http no need to enter ipv4 adress.But its different in socket. So you need to convert your ipv4 ip into ipv6 : https://www.ultratools.com/tools/ipv4toipv6Result?address=0.0.0.0&as_sfid=AAAAAAUnIHcpu90_nFakFLCnZuBx8krdMzYg1kEEhyzCy3f64w66hTMk-TcPj8Pcgk2Z9_apCnp4l0XxyYDzU_HO_QG1PaEGuQf1_D3bCGCx8JcDWwmwKhzC6uEzpJ7G3dy83dI%3D&as_fid=eab255bd5ee79d5bc01c6be282857df96697e89a
And in ue4 you should write like this: http://[0:0:0:0:0:ffff:0:0]:8888 8888 is your port. And this works,no need additional plist.
I'm currently building for iOS and I get the following error: