In my case, I need login with GooglePlay and iOS both of Android and iOS.
OnlineSubsystem is working GooglePlay in Android, and working iOS in iOS.
How can I run OnlineSubsystemGooglePlay in iOS and run OnlineSubsystemIOS in Android?
I tried make some fumction as below…
void AAA::OnSelectOnlineSubSystem(FName _name)
{
FOnlineSubsystemModule& OSS = FModuleManager::GetModuleChecked<FOnlineSubsystemModule>("OnlineSubsystem");
if (OSS.IsOnlineSubsystemLoaded(_name) == false)
{
GConfig->SetText(TEXT("OnlineSubsystem"), TEXT("DefaultPlatformService"), FText::FromName(_name), GEngineIni);
OSS.ReloadDefaultSubsystem();
}
}
I tried to replace the one registered with DefaultPlatformService and call ReloadDefaultSubSystem().
It compiles and builds well, but if you call ReloadDefaultSubsystem() after replacing DefaultPlatformService with iOS in Android, the following error occurs.
LogModuleManager: Warning: ModuleManager: Module 'OnlineSubsystemINVTEXT("IOS")' not found - its StaticallyLinkedModuleInitializers function is null.
LogOnline: Warning: OSS: TryLoadSubsystemAndSetDefault: LoadSubsystemModule([INVTEXT("IOS")]) failed
LogOnline: OSS: Creating online subsystem instance for: NULL
LogOnline: OSS: TryLoadSubsystemAndSetDefault: Loaded subsystem for module [NULL]
Judging from the error message StaticallyLinkedModuleInitializers, the Subsystem to be loaded must be statically linked in the build, but I don’t know how to statically link it.
what i want to ask is…
- is enable use OnlineSubsystemIOS in android and OnlineSubsystemGooglePlay in iOS ?
- What if possible?