google-ar / arcore-unity-extensions

Google ARCore Extensions and Geospatial Creator for Unity's AR Foundation
Other
351 stars 98 forks source link

iOS App not starting after first launch #15

Open lukasrandom opened 4 years ago

lukasrandom commented 4 years ago

Problem:

I can run the iOS app only once with the new ARCore Extensions 1.17.0 in Unity a clean project. After the first run, the app does not start up any more. Only black screen not even unity splash screen showing. (Error Log at the bottom)

The same General setup works on Unity 2019.2.15f1 with ARCore Extensions 1.13.0 and its dependency and ARKit XR Plugin 2.1.1 without any issues

Generel Setup:

I am on windows 10 with unity to generate XCode Project and on macbook with xcode 11.3.1 to install cocoa pods and for building final app from the generated xcworkspace.

Step by step:

On Windows:

  1. New empty unity project.
  2. Install new ARCore Extensions and its dependencies.
  3. (and External Dependency Manager for unity, to generate pod files from windows, see packages below.)
  4. Create a simple scene with the necessary objects for AR to work. (See image "Scene Hierarchy" )
  5. I follow all steps from the docs to configure ARCore Extensions to work.
  6. Set player settings (See image "Player Settings")
  7. I build xcode project from unity for iOS.

Continue on Mac

  1. Install cocoa pods in xcode project directory.
  2. I run the .workspace project and build it to the device.
  3. App starts automatically and everything works!
  4. Close the app and restart the app. Nothing happens. Only black screen. Not even unity splash screen loading. Also when I rebuild using the .xcworkspace nothing happens. I have to delete the app from the device and then rebuild the app to have it run again.

Environment

Windows 10 Unity editor - 2019.3.11f1 (Also tried 20.19.3.0f6)

MacOS Catalania 10.15.1 XCode 11.3.1

iPad iOS 13.2.2

Packages

ARCore Extensions - 1.17.0 -> AR Foundation -´3.1.0-preview.6 -> ARCore XR Plugin - 3.1.0-preview.6 ARKit XR Plugin - 3.1.0-preview.6 External Dependency Manager for Unity - 1.2.155

ARCore Extensions specific Setting files:

ARCoreExtensionsConfig: ios Support Enabled: true Added the api keys to both, android and ios

ARCoreSettings: Required

ARKitSettings Required

Scene Hierarchy:

scene

Player Settings:

PlayerSettings-

PlayerSettings-2

Packages

packages

The outputlog from XCode when running the app for the first time.

(The next time there is no log at all)

2020-06-02 19:10:52.787792+0200 CloudAR[928:39413] Built from '2019.3/staging' branch, Version '2019.3.11f1 (ceef2d848e70)', Build type 'Release', Scripting Backend 'il2cpp' -> applicationDidFinishLaunching() -> applicationDidBecomeActive() [Subsystems] Discovering subsystems at path /private/var/containers/Bundle/Application/5CCEA41B-7781-4E9A-8B11-CDB10C0DC3F2/CloudAR.app/Data/UnitySubsystems [Subsystems] No descriptors matched for examples in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. [Subsystems] 1 'inputs' descriptors matched in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json [Subsystems] No descriptors matched for displays in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. [Subsystems] No descriptors matched for meshings in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. GfxDevice: creating device client; threaded=1 Initializing Metal device caps: Apple A10X GPU Initialize engine version: 2019.3.11f1 (ceef2d848e70) The referenced script (Unknown) on this Behaviour is missing! (Filename: Line: 199)

The referenced script on this Behaviour (Game Object '') is missing! (Filename: Line: 334)

The referenced script (Unknown) on this Behaviour is missing! (Filename: Line: 199)

The referenced script on this Behaviour (Game Object '') is missing! (Filename: Line: 334)

A scripted object (probably UnityEngine.XR.ARCore.ARCoreLoaderSettings?) has a different serialization layout when loading. (Read 56 bytes but expected 60 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts? (Filename: Line: 2269)

XRGeneral Settings awakening... UnityEngine.XR.Management.XRGeneralSettings:Awake()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-06-02 19:10:53.021815+0200 CloudAR[928:39413] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x13df3d5d0>. UnloadTime: 3.097208 ms [Subsystems] Loading plugin UnityARKit for subsystem ARKit-Input... [Subsystems] UnityARKit successfully registered Provider for ARKit-Input Creating a cross platform ARCore session with IOS Cloud Services API Key:AIzaSyDtXjZHdR4ubAlO0EVhf6UUZGRV8fCFzlU Google.XR.ARCoreExtensions.Internal.IOSSupportManager:_CreateARCoreSession() Google.XR.ARCoreExtensions.Internal.IOSSupportManager:get_Instance() Google.XR.ARCoreExtensions.ARCoreExtensions:OnEnable()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

-> applicationWillResignActive() -> applicationDidEnterBackground() 2020-06-02 19:14:26.232744+0200 CloudAR[928:39413] Can't end BackgroundTask: no background task exists with identifier 24 (0x18), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug. -> applicationWillTerminate() Setting up 1 worker threads for Enlighten. Thread -> id: 16d1b7000 -> priority: 1 Reset cross platform ARCoreSession. Google.XR.ARCoreExtensions.Internal.IOSSupportManager:ResetARCoreSession() Google.XR.ARCoreExtensions.Internal.IOSSupportManager:ResetInstanceAndSession() Google.XR.ARCoreExtensions.ARCoreExtensions:OnDestroy()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

ArgumentNullException: Value cannot be null. Parameter name: _unity_self

(Filename: currently not available on il2cpp Line: -1)

lukasrandom commented 4 years ago

Also tested it with Unity 2019.3.0f6 but the same issue occures.

Karol-G commented 4 years ago

Hey,

I had the same problem just today. Could a developer have a look into it?

Best Karol