using StansAssets.Foundation;
namespace StansAssets.IOS.XCode
{
///
/// XCode project library.
///
[System.Serializable]
public class XCodeFramework
{
bool m_IsOptional;
bool m_IsEmbeded;
public XCodeFrameworkName FrameworkName;
///
/// Library Name.
///
public XCodeFrameworkName Name
{
get => FrameworkName;
internal set => FrameworkName = value;
}
///
/// Defines if dependency is optional or not.
///
public bool IsOptional
{
get => m_IsOptional;
internal set => m_IsOptional = value;
}
///
/// Defines if framework is embeded or not.
///
public bool IsEmbeded
{
get => m_IsEmbeded;
internal set => m_IsEmbeded = value;
}
///
/// Gets the full framework name.
///
public string FullName => FrameworkName + ".framework";
///
/// Initializes a new instance of the class.
///
/// Type.
/// If set to true optional.
public XCodeFramework(XCodeFrameworkName frameworkName, bool optional = false)
{
FrameworkName = frameworkName;
m_IsOptional = optional;
}
///
/// Initializes a new instance of the class.
///
/// Framework name.
/// If set to true optional.
public XCodeFramework(string frameworkName, bool optional = false)
{
frameworkName = frameworkName.Replace(".framework", string.Empty);
FrameworkName = EnumUtility.ParseOrDefault(frameworkName);
m_IsOptional = optional;
}
}
}