pub struct XcodeProject {
pub project_path: PathBuf,
pub workspace_path: Option<PathBuf>,
pub scheme: String,
pub pbxproj_path: PathBuf,
}Expand description
Represents an Xcode project on disk with its key paths and scheme
Fields§
§project_path: PathBufPath to .xcodeproj directory
workspace_path: Option<PathBuf>Path to .xcworkspace directory (if exists)
scheme: StringXcode scheme name
pbxproj_path: PathBufPath to project.pbxproj inside the .xcodeproj
Implementations§
Source§impl XcodeProject
impl XcodeProject
Sourcepub fn discover(base_path: &str) -> Result<Self>
pub fn discover(base_path: &str) -> Result<Self>
Discover an Xcode project by searching a base directory.
Searches for .xcodeproj in common locations:
{base_path}/App/App.xcodeproj(Capacitor convention){base_path}/*.xcodeproj(standard layout){base_path}/ios/App/App.xcodeproj(nested Capacitor){base_path}/ios/*.xcodeproj
Sourcepub fn get_version(&self) -> Result<String>
pub fn get_version(&self) -> Result<String>
Get the MARKETING_VERSION from project.pbxproj
Sourcepub fn get_build_number(&self) -> Result<String>
pub fn get_build_number(&self) -> Result<String>
Get the CURRENT_PROJECT_VERSION (build number) from project.pbxproj
Sourcepub fn set_build_number(&self, num: &str) -> Result<()>
pub fn set_build_number(&self, num: &str) -> Result<()>
Set the CURRENT_PROJECT_VERSION (build number) in project.pbxproj
Sourcepub fn bump_build_number(&self) -> Result<String>
pub fn bump_build_number(&self) -> Result<String>
Increment the CURRENT_PROJECT_VERSION by 1 and return the new value
Sourcepub fn set_version(&self, version: &str) -> Result<()>
pub fn set_version(&self, version: &str) -> Result<()>
Set the MARKETING_VERSION in project.pbxproj
Sourcepub fn bump_version(&self, part: &str) -> Result<String>
pub fn bump_version(&self, part: &str) -> Result<String>
Bump the MARKETING_VERSION by the specified part (major, minor, patch)
Sourcepub fn build_target_args(&self) -> Vec<String>
pub fn build_target_args(&self) -> Vec<String>
Returns the best path to use for xcodebuild commands. Prefers workspace over project path.
Auto Trait Implementations§
impl Freeze for XcodeProject
impl RefUnwindSafe for XcodeProject
impl Send for XcodeProject
impl Sync for XcodeProject
impl Unpin for XcodeProject
impl UnsafeUnpin for XcodeProject
impl UnwindSafe for XcodeProject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more