Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build fails unless UDM4U is manually installed #222

Open
bdg-raini opened this issue Sep 19, 2024 · 1 comment
Open

iOS build fails unless UDM4U is manually installed #222

bdg-raini opened this issue Sep 19, 2024 · 1 comment

Comments

@bdg-raini
Copy link

Describe the bug

When making an iOS build after adding the Branch Unity SDK, there is no .xcworkspace generated, only .xcodeproj. This means that the dependency to the Branch iOS SDK is not resolved, and the build fails due to missing headers.

After investigating I can see this particular problem was reported for 1.0.0. It sounds like an issue with EDM4U.

After some more digging I can see that EDM4U is no longer bundled with the .unitypackage. The release notes mention that it was removed in favour of using UPM (via OpenUPM) however their is no package manifest in the .unitypackage and so EDM4U is not installed automatically. Is the user meant to install EDM4U manually, or is the .unitypackage supposed to have a package manifest?

I can see the docs haven't been updated for over a year, and don't seem up-to-date with release 2.0.0. There's a section at the very bottom about installing EDM4U, but it's for a different issue.

Also EDM4U seems to use Cocoapods for iOS builds, which is not installed on MacOS by default. I'm not sure if EDM4U will install Cocoapods for the user, if not then it's probably important to mention in the docs. The Branch Unity page doesn't currently have any info concerning the build process and dependencies resolution, it has to be pieced together from the platform-specific pages.

Steps to reproduce

  1. Install BranchUnityPackage.unitypackage 2.0.0 into an existing project (that doesn't already have EDM4U installed) and follow the rest of the [instructions for the Unity SDK]
  2. Notice that EDM4U is not available (eg. no Assets/External Dependency Manager menu item)
  3. Build for iOS from Unity
  4. Notice that the output directory has a .xcodeproj but no .xcworkspace
  5. Open the .xcodeproj and attempt to build/archive
  6. Notice build errors from missing headers (eg. Branch.h)

Expected behavior

EDM4U should be installed automatically after importing BranchUnityPackage.unitypackage.
After building for iOS from Unity Editor the output directory should contain a .xcworkspace with details of the Branch iOS SDK dependency.
Building in XCode should succeed and not fail on missing header errors.

SDK Version

2.0.0

Unity Version

2021.3.38

Make and Model

Macbook Pro (M3 Pro)

OS

MacOS 14.6.1

Additional Information/Context

No response

@bdg-raini
Copy link
Author

I manually installed EDM4U via UPM and it will indeed install Cocoapods for the user if it's not installed, I tested by uninstalling Cocoapods and reopening the editor.

After:

  • installing EDM4U
  • clearing out the build output directory
  • building for iOS from the editor

I can successfully observe a generated .xcworkspace which successfully builds.

@bdg-raini bdg-raini changed the title Unable to resolve dependencies for iOS build iOS build fails unless UDM4U is manually installed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant