Hello, I have some native iOS libraries. it’s required to perform the following in XCoode project:
- Enable Always Embed Swift Standard Libraries
- Add $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) to Library Search Path
- Add @executable_path/Frameworks to Runpath Search Paths
Is it possible to perform these actions in UE4 plugin?
For “Library Search Path”, you can do that in *.build.cs :
PublicSystemLibraryPaths.Add(“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos”);
PublicSystemLibraryPaths.Add(“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphoneos”);
For “Always Embed…” and Runpath, you need to modify Unreal Build Tool (UBT) as far as I know:
- Modify “/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/Xcode/XcodeProject.cs” function AppendPlatformConfiguration
- Modify “/Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSToolChain.cs” function GetLinkArguments_Global
1 Like
Hi,
Is it possible to create an Unreal plugin which loads a native iOS library, that runs SwiftUI code?
Hi made changes as you described above, but got an error after uploading to appstore connect:
ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Could you help to resolve this issue?