You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Unreal Engine 4.18中配置iOS Universal Links与关联域名

Alright, let's tackle this Universal Links and cross-app deep linking setup between your iOS native app and UE4.18 blueprint-only marketing app. I’ve worked through similar UE4 iOS linking headaches before, so here’s a step-by-step breakdown to get this working smoothly:

Since you mentioned you can handle this via Xcode, just double-check these critical boxes to ensure it’s set up correctly (it’ll make troubleshooting the UE side easier):

  • You’ve enabled Associated Domains for your native app in the Apple Developer Portal, adding applinks:<your-domain>
  • Your domain hosts a valid apple-app-site-association file (no .json suffix) in either the root directory or .well-known folder, with entries for both your native and UE app’s Team ID + Bundle ID
  • Xcode’s project settings for the native app include the same applinks:<your-domain> in Associated Domains
  • Test that the native app responds to Universal Links by opening your domain link in Safari—it should jump straight to the app without prompting to open in Safari

This is where most folks hit snags with UE4.18. Here’s how to get it sorted without writing any C++:

a. Project Settings Tweaks

  • Open your UE4 project, go to Edit > Project Settings > Platforms > iOS
  • In the Associated Domains field, paste your applinks:<your-domain> (match exactly what you used for the native app)
  • Double-check that your Bundle Identifier and Team ID match what’s in the Apple Developer Portal—typos here kill Universal Links every time

b. Force Info.plist Changes via IOSEngine.ini

UE4.18 sometimes fails to push project settings to the final Info.plist, so we’ll hardcode these values:

  • Navigate to your UE project’s Config/IOS/IOSEngine.ini file
  • Add these entries (replace placeholders with your actual values):
[IOSApplicationSettings]
# Add custom scheme for fallback deep linking
+CFBundleURLTypes = (
    CFBundleURLName = "<your-ue-bundle-id>",
    CFBundleURLSchemes = ( "<your-ue-custom-scheme>" ) // e.g., "my-marketing-app"
)
# Ensure Associated Domains are set
+AssociatedDomains = "applinks:<your-domain>"
# Allow querying native app's scheme
+LSApplicationQueriesSchemes = "<native-app-custom-scheme>" // e.g., "my-native-app"
# Temporary for testing—tighten this up for production
+NSAppTransportSecurity = (
    NSAllowsArbitraryLoads = true
)

Since you’re using only blueprints, use UE’s built-in URL handling:

  • Open your main Game Mode or Player Controller blueprint
  • Add an Event OnOpenURL node—this triggers whenever the UE app is opened via a Universal Link or custom scheme
  • Use nodes like Split String or Parse URL to break down the incoming URL, then branch logic to navigate to the correct marketing scene or content based on the link’s path

3. Cross-App Deep Linking Workflow

a. Native App → UE App

  • Primary (Universal Links): Have the native app open your domain link (e.g., https://yourdomain.com/marketing/feature1)—if UE’s Universal Links are set up right, it’ll jump directly to the app
  • Fallback (Custom Scheme): If Universal Links fail (rare, but possible during testing), use the native app’s code to open the UE scheme:
    if let url = URL(string: "my-marketing-app://feature1") {
        UIApplication.shared.open(url)
    }
    

b. UE App → Native App

  • In your UE blueprint, use the Open URL node with either the native app’s Universal Link (e.g., https://yourdomain.com/native/home) or its custom scheme (e.g., my-native-app://home)
  • Remember: We added the native scheme to LSApplicationQueriesSchemes earlier, so this should work without permission errors

4. Troubleshooting Common UE4.18 Issues

  • Associated Domains Not Sticking: If your UE app doesn’t recognize Universal Links, recheck the IOSEngine.ini entries—UE4.18 often ignores project settings here. Rebuild the project after editing the ini file.
  • Invalid apple-app-site-association: Use Apple’s official validation tool (found in the Apple Developer Portal) to confirm your file is formatted correctly and accessible.
  • Blueprint Not Triggering: Test the OnOpenURL event using Xcode’s Debug > Open URL option—input your Universal Link and see if the blueprint fires. If not, double-check that the node is attached to your active Game Mode/Player Controller.
  • Scheme Query Failures: If the UE app can’t open the native app, verify that LSApplicationQueriesSchemes in IOSEngine.ini has the exact native scheme (case-sensitive!).

内容的提问来源于stack exchange,提问作者Chuck Gaffney

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:51:46