Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.07k stars 1.15k forks source link

Does not show any Frameworks in Xcode #550

Closed eswarborra closed 4 years ago

eswarborra commented 4 years ago

Unity 2019.4.2LTS AR foundation. After doing iOS build in Xcode, it does not show any frameworks. can you please tell me what is problem Screenshot 2020-07-14 at 3 26 48 PM Capture1

tdmowrer commented 4 years ago

After doing iOS build in Xcode, it does not show any frameworks. can you please tell me what is problem

I see two frameworks in your screenshot, one of which is UnityFramework.framework. That looks like what I would expect for the "Unity-iPhone" target. Can you explain what you were expecting?

eswarborra commented 4 years ago

Thank you tdmowrer for your reply.

My Ar application working fine in Unity 2019.2.16f and also I can see all the related frameworks in Xcode. Recently I get to know Unity 2019.4.2LTS was released, so I tried one sample project before converting my project. I have tried the AR sample project with Unity latest version 2019.4.2 & 3, after making build I am unable to see all frameworks in Xcode related to AR Foundation, AR Kit, etc... When deployed this build into my iPad I am unable to see the AR camera. I have given all permission related AR you can see in the attached screenshot. In the screenshot framework, I have added the MessageUI framework manually. Please let me know why I am unable to see all frameworks on 2019.4.2/3 is there any problem with this version..?

iPad version : - 5th gen Xcode version : - 11.5 Unity3d version :- 2019.4.2 & 3

tdmowrer commented 4 years ago

In 2019.3+, the Unity Xcode project is a bit different. Instead of a single application, it is split into an application and a UnityFramework.framework. All your previous frameworks were probably added to the UnityFramework target, e.g.:

Screen Shot 2020-07-14 at 10 03 53 AM
eswarborra commented 4 years ago

Ok..So Can you please tel me what is the problem it's not showing anything on my sample app.

I have tried to open my project on this version it showing this error.

Assets\Editor\BuildPostProcessor.cs(20,33): error CS0619: 'PBXProject.GetUnityTargetName()' is obsolete: 'This function is deprecated. There are two targets now, call GetUnityMainTargetGuid() - for app or GetUnityFrameworkTargetGuid() - for source/plugins to get Guid instead of calling to TargetGuidByName(GetUnityTargetName()). Screenshot 2020-07-10 at 2 39 07 PM (1)

I changed the script with

if UNITY_2019_3_OR_NEWER

        string targetId = project.GetUnityFrameworkTargetGuid();

else

string targetId = project.TargetGuidByName(PBXProject.GetUnityTargetName());

endif#if UNITY_2019_3_OR_NEWER

        string targetId = project.GetUnityFrameworkTargetGuid();

else

string targetId = project.TargetGuidByName(PBXProject.GetUnityTargetName());

endif

Still no result.. :(

tdmowrer commented 4 years ago

A UnityEngine API did change in 2019.3 and the packages were updated appropriately.

What version of the ARFoundation packages (ARFoundation, ARKit, ARSubsystems) are you using?

eswarborra commented 4 years ago

ARFoundation, ARKit, ARSubsystems,AR Core packages version: 4.0.1

tdmowrer commented 4 years ago

Ok, great; those are verified (i.e., "stable") and they work in 2019.4 (the samples in this repo were built with 2019.4 and use 4.x packages, for instance).

You have posted both an error encountered while building within Unity and a linker error while building within Xcode. Neither appear related to ARFoundation. Let's take them one at a time:

Assets\Editor\BuildPostProcessor.cs(20,33): error CS0619: 'PBXProject.GetUnityTargetName()' is obsolete: 'This function is deprecated. There are two targets now, call GetUnityMainTargetGuid() - for app or GetUnityFrameworkTargetGuid() - for source/plugins to get Guid instead of calling to TargetGuidByName(GetUnityTargetName()).

Your suggested code change should fix this particular error. Did it?

You also posted a screenshot of a linker error from Xcode: Screenshot 2020-07-10 at 2 39 07 PM (1)

This is not related to ARFoundation, either, and I'm not familiar with the MFMailComposeViewer.

Typically, when you upgrade from an older version of Unity, you need to "Replace" rather than "Append" to an existing Xcode project. (That is, click Build & Run and then "Replace").

However, as far as I can tell, the errors are unrelated to ARFoundation and are coming from scripts or other dependencies in your project.