XcodeProjectUtility Class
Convenience utilities for working with an exported Xcode project. More...
Public Member Functions | |
XcodeProjectUtility (string projectPath) | |
Instantiates a new instance of the XcodeProjectUtility class. More... | |
void | WriteToDisk () |
Writes any modifications to disk. | |
void | AddFile (string filePath, string projectPath) |
Adds a file to the project. More... | |
void | AddDirectory (string directoryPath, string projectPath) |
Adds a directory reference to the project. More... | |
void | AddFramework (string framework, bool weak) |
Adds a framework (by name) to the project. More... | |
void | AddCustomFramework (DirectoryInfo framework, bool embed=true) |
Adds a custom framework (like an .xcframework) to the project. More... | |
void | AddBuildProperty (string name, string value) |
Appends a value to a property's list of values. More... | |
void | SetBuildProperty (string name, string value) |
Sets the value of a property. Any existing value(s) will be replaced. More... | |
void | AddShellScriptBuildPhase (string shellPath, string shellScript, List< string > inputPaths=null, string name="Run Script") |
Adds a build phase that executes a shell script. More... | |
void | SetEntitlementsFile (string entitlementsPath) |
Sets the entitlements file for this project. More... | |
Public Attributes | |
readonly PBXProject | pbxProject |
readonly PlistDocument | plist |
readonly string | pbxProjectPath |
readonly string | resourcesPath |
readonly string | plistPath |
readonly string | projectRoot |
string | targetGuid |
readonly string | frameworkGuid |
readonly string | BFGEnviron = IosBuildConstants.DefaultBfgEnvironment |
readonly string | FacebookDisplayName = "${PRODUCT_NAME}" |
readonly string | FacebookAppID = "1564213973726672" |
readonly string | crashlyticsShellScript |
readonly string | crashlyticsShellPath = "/bin/bash -e" |
readonly string | crashlyticsScriptName = "Run Script" |
readonly Dictionary< string, string > | urlSettings |
readonly string[] | bfgExceptionDomains = IosBuildConstants.BFGExceptionDomains |
readonly string[] | lsApplicationQueries = IosBuildConstants.LSApplicationQueries |
readonly string[] | frameworks |
readonly string | bfgSDKFramework = "bfg_iOS_sdk.framework" |
readonly string[] | dynamicFrameworks |
readonly string[] | facebookFrameworks |
readonly string[] | zendeskFrameworks |
Properties | |
static string | UnityTargetName [get] |
Main target generated by Unity. | |
Detailed Description
Convenience utilities for working with an exported Xcode project. This is oddly named, but is kept for compatibility. To use, construct an instance by providing the path to an exported Xcode project, manipulate as needed by using the mutator instance methods, then flush to disk using the WriteToDisk method.
Constructor & Destructor Documentation
◆ XcodeProjectUtility()
| inline |
Instantiates a new instance of the XcodeProjectUtility class.
- Parameters
projectPath Path to which Unity has exported an Xcode project.
Member Function Documentation
◆ AddBuildProperty()
| inline |
Appends a value to a property's list of values.
- Parameters
name Property name. value Property value to add.
◆ AddCustomFramework()
| inline |
Adds a custom framework (like an .xcframework) to the project.
- Parameters
framework Directory that represents the framework. embed Whether the framework needs to be embedded.
- Exceptions
ArgumentNullException framework is null. IOException Specified framework directory was not found.
◆ AddDirectory()
| inline |
Adds a directory reference to the project.
- Parameters
directoryPath Path to the real directory. projectPath How the directory will appear in the workspace.
- Exceptions
ArgumentException directoryPath could not be found.
◆ AddFile()
| inline |
Adds a file to the project.
- Parameters
filePath Path to the real file. projectPath How the file will appear in the workspace.
- Exceptions
ArgumentException filePath could not be found.
◆ AddFramework()
| inline |
Adds a framework (by name) to the project.
- Parameters
framework Name of the framework to add. weak Whether the framework will be added as a weak link.
◆ AddShellScriptBuildPhase()
| inline |
Adds a build phase that executes a shell script.
- Parameters
shellPath Path to the shell to use, along with any shell arguments (like '-e'). shellScript Script contents. inputPaths The shell script input dependencies. name Optional name to give the build phase.
◆ SetBuildProperty()
| inline |
Sets the value of a property. Any existing value(s) will be replaced.
- Parameters
name Property name. value Property value to use.
◆ SetEntitlementsFile()
| inline |
Sets the entitlements file for this project.
- Parameters
entitlementsPath Path to the real entitlements file.
- Exceptions
ArgumentException entitlementsPath could not be found.
Member Data Documentation
◆ BFGEnviron
readonly string XcodeProjectUtility.BFGEnviron = IosBuildConstants.DefaultBfgEnvironment |
- Deprecated:\n Use instead.
◆ bfgExceptionDomains
readonly string [] XcodeProjectUtility.bfgExceptionDomains = IosBuildConstants.BFGExceptionDomains |
- Deprecated:\n Use instead.
◆ bfgSDKFramework
readonly string XcodeProjectUtility.bfgSDKFramework = "bfg_iOS_sdk.framework" |
- Deprecated:\n Unused - Will be removed in a future version.
◆ crashlyticsScriptName
readonly string XcodeProjectUtility.crashlyticsScriptName = "Run Script" |
- Deprecated:\n The Firebase SDK now attaches the run script automatically.
◆ crashlyticsShellPath
readonly string XcodeProjectUtility.crashlyticsShellPath = "/bin/bash -e" |
- Deprecated:\n The Firebase SDK now attaches the run script automatically.
◆ crashlyticsShellScript
readonly string XcodeProjectUtility.crashlyticsShellScript |
Initial value:
=
"GOOGLE_SERVICE_PLIST="${SRCROOT}/GoogleService-Info.plist"\n" +
""${PROJECT_DIR}/Resources/Scripts/upload-symbols" -gsp "${GOOGLE_SERVICE_PLIST}" --build-phase"
- Deprecated:\n The Firebase SDK now attaches the run script automatically.
◆ dynamicFrameworks
readonly string [] XcodeProjectUtility.dynamicFrameworks |
Initial value:
= {
"AppsFlyerLib.framework",
"openssl.framework",
"RaveSocial.framework",
"WebP.framework"
}
- Deprecated:\n Unused - Will be removed in a future version.
◆ FacebookAppID
readonly string XcodeProjectUtility.FacebookAppID = "1564213973726672" |
- Deprecated:\n Use what's defined in your project's instead.
◆ FacebookDisplayName
readonly string XcodeProjectUtility.FacebookDisplayName = "${PRODUCT_NAME}" |
- Deprecated:\n Use what's defined in your project's instead.
◆ facebookFrameworks
readonly string [] XcodeProjectUtility.facebookFrameworks |
Initial value:
= {
"FBSDKCoreKit.framework",
"FBSDKLoginKit.framework",
"FBSDKPlacesKit.framework",
"FBSDKShareKit.framework"
}
- Deprecated:\n Unused - Will be removed in a future version.
◆ frameworks
readonly string [] XcodeProjectUtility.frameworks |
Initial value:
=
IosBuildConstants.Frameworks.Concat(IosBuildConstants.WeakFrameworks).ToArray()
- Deprecated:\n Use and
- BFGSDK.BuildProcessing.IosBuildConstants.WeakFrameworks instead.
◆ lsApplicationQueries
readonly string [] XcodeProjectUtility.lsApplicationQueries = IosBuildConstants.LSApplicationQueries |
- Deprecated:\n Use instead.
◆ urlSettings
readonly Dictionary<string, string> XcodeProjectUtility.urlSettings |
- Deprecated:\n No longer maintained; formerly a combination of
- BFGSDK.BuildProcessing.IosBuildConstants.BaselinePlistValues and project-specific environment/Facebook settings.
◆ zendeskFrameworks
readonly string [] XcodeProjectUtility.zendeskFrameworks |
Initial value:
= {
"CommonUISDK.framework",
"MessagingAPI.framework",
"MessagingSDK.framework",
"SDKConfigurations.framework",
"SupportProvidersSDK.framework",
"SupportSDK.framework",
"ZendeskCoreSDK.framework"
}
- Deprecated:\n Unused - Will be removed in a future version.