Skip to content

3.0.1 Can't build for iOS on Windows (Could not find Entitlements.entitlements) #491

@SergeiEfimik

Description

@SergeiEfimik

What happened?

The build is successful, but in the Unity console the error "Could not find a part of the path... Entitlements.entitlements" (see "Relevant log output" for full details).
File "Entitlements.entitlements" is created, but its content is smaller than in file created in SDK version 2.14.6.

When opening a built project (.xworkspace) in xCode on Mac, it writes an error:
The file "/Users/work/MyProject/iOS/C:/Unity3d/MyProject/Builds/iOS/Entitlements.entitlements" could not be opened.
Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "Unity-iPhone" is correct and that the file exists on disk.

Оn version 2.14.6 everything works correctly on iOS and Android. On version 3.0.1 and 3.0.0 work only on Android.
Copying the contents of the Entitlements.entitlements file from 2.14.6 to the new one does not solve the problem, the error in xCode remains the same.

Steps to reproduce?

1. Install OneSignal SDK 3.0.1
2. Build for iOS on Windows

What did you expect to happen?

Build with correctrly Entitlements.entitlements file for iOS on Windows

Unity version

2021.3.0f1

OneSignal Unity SDK version

3.0.1, 3.0.0

Platform

Windows

Relevant log output

DirectoryNotFoundException: Could not find a part of the path "C:\Unity3d\MyProject\Builds\iOS\C:\Unity3d\MyProject\Builds\iOS\Entitlements.entitlements".
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <6073cf49ed704e958b8a66d540dea948>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <6073cf49ed704e958b8a66d540dea948>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) (at <6073cf49ed704e958b8a66d540dea948>:0)
System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) (at <6073cf49ed704e958b8a66d540dea948>:0)
(wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool,System.Text.Encoding)
System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) (at <6073cf49ed704e958b8a66d540dea948>:0)
UnityEditor.iOS.Xcode.PlistDocument.WriteToFile (System.String path) (at C:/buildslave/unity/build/External/XcodeAPI/Xcode/PlistParser.cs:404)
UnityEditor.iOS.Xcode.ProjectCapabilityManager.WriteToFile () (at C:/buildslave/unity/build/External/XcodeAPI/Xcode/ProjectCapabilityManager.cs:76)
OneSignalSDK.BuildPostProcessor.AddProjectCapabilities () (at Library/PackageCache/[email protected]/Editor/BuildPostProcessor.cs:158)
OneSignalSDK.BuildPostProcessor.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/[email protected]/Editor/BuildPostProcessor.cs:105)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass18_0.<OnBuildPostProcess>b__1 (UnityEditor.Build.IPostprocessBuildWithReport bpp) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions