From eb619d5d31972e82850eaa04118a3b8d00e4c235 Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Thu, 2 Nov 2017 11:50:01 -0500 Subject: [PATCH] Resolve broken iOS bridging header path --- Sources/UBKit/Files/Xcode/SpecFile.swift | 2 +- Sources/UBKit/Files/Xcode/ViewControllerFile.swift | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/UBKit/Files/Xcode/SpecFile.swift b/Sources/UBKit/Files/Xcode/SpecFile.swift index fafd879..c8abbc0 100644 --- a/Sources/UBKit/Files/Xcode/SpecFile.swift +++ b/Sources/UBKit/Files/Xcode/SpecFile.swift @@ -61,7 +61,7 @@ extension File { OTHER_CFLAGS: $(inherited) -DINIT_SCRIPTING_BACKEND=1 -fno-strict-overflow -DRUNTIME_IL2CPP=1 CLANG_CXX_LANGUAGE_STANDARD: c++11 CLANG_CXX_LIBRARY: libc++ - SWIFT_OBJC_BRIDGING_HEADER: UnityBuildKit/UnityBridge/UnityBridge.h + SWIFT_OBJC_BRIDGING_HEADER: \(projectName)/UnityBridge/UnityBridge.h CLANG_ENABLE_MODULES: NO CLANG_WARN_BOOL_CONVERSION: NO CLANG_WARN_CONSTANT_CONVERSION: NO diff --git a/Sources/UBKit/Files/Xcode/ViewControllerFile.swift b/Sources/UBKit/Files/Xcode/ViewControllerFile.swift index 47d18c2..1d8353f 100644 --- a/Sources/UBKit/Files/Xcode/ViewControllerFile.swift +++ b/Sources/UBKit/Files/Xcode/ViewControllerFile.swift @@ -36,10 +36,9 @@ extension File { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+2) { - let appDelegate = UIApplication.shared.delegate as! AppDelegate - appDelegate.startUnity() - + let appDelegate = UIApplication.shared.delegate as! AppDelegate + appDelegate.startUnity() + DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+5) { if let newUnityView = UnityGetGLView() { newUnityView.translatesAutoresizingMaskIntoConstraints = false self.view.addSubview(newUnityView)