Questions tagged [xcodeproj]

Xcodeproj is a Ruby gem from the makers of CocoaPods that allows scripted access to Xcode's project file.

The Xcodeproj project is a Ruby gem from the makers of CocoaPods that allows scripted access to Xcode's project file.

Installation is as simple as:

gem install xcodeproj

Docs: http://www.rubydoc.info/gems/xcodeproj/

64 questions
3
votes
2 answers

How to get the target(s) for a PBXFileReference in Xcodeproj

I'm attempting to write a Ruby script that will delete certain files from the Xcode project. I can find the files based on the absolute path and remove them from the project using the remove_from_project method of PBXFileReference. However this…
Steve Wilford
  • 8,894
  • 5
  • 42
  • 66
2
votes
1 answer

Add file to native target programmatically via tuist/XcodeProj

I am using https://github.com/tuist/XcodeProj in an attempt to add a file to a specific target. Basically I'd like to do the following thing done via ruby mirror using Swift: require 'xcodeproj' source_root = '/path/to/xcodeproj' project =…
Ozgur Vatansever
  • 49,246
  • 17
  • 84
  • 119
2
votes
2 answers

Xcodeproj add custom property to object

I want to add onlyGenerateCoverageForSpecifiedTargets property to TestAction object programmatically. According to the documentation this property is not yet supported. So I need to add a custom property to an object. Also I need to add…
ChikabuZ
  • 10,031
  • 5
  • 63
  • 86
2
votes
0 answers

How to add framework reference to a framework from a different project

I using Cocoapods/xcodeproj gem to generate my Xcode projects, for a framework in the same project I can do common = project.targets.find { |t| t.name == "TestCommon" } …
José
  • 3,041
  • 8
  • 37
  • 58
2
votes
0 answers

I deleted my .xcodeproj file, what can I do?

I accidentally deleted my xcodeproj file (also from trash) I really don't know how it could happen. What should I do now? I have my app on my iPhone, can I do something with that? Hope someone can help!
Ontop14
  • 33
  • 2
2
votes
1 answer

Ruby gem Xcodeproj throws exception on project save

As I was experimenting with Xcodeproj I found an error that might come from misusing the API. Could you please point out what I am doing wrong? require 'xcodeproj' project = Xcodeproj::Project.new("test.xcodeproj") new_target_name =…
farkasseb
  • 580
  • 4
  • 15
2
votes
1 answer

Updating iOS Target Properties from Command Line

In a quest to automate the iOS app generation process, I am trying to set change the settings of a build target in an automated fashion outside of XCode. Specifically, I would like to set the Info.plist file for a target using a command or some…
Adam Jakiela
  • 2,188
  • 7
  • 30
  • 48
2
votes
2 answers

Creating New iOS Build Target with Xcodeproj

I am trying to create a new iPhone build target pragmatically with the Ruby gem Xcodeproj. Between my lack of Ruby knowlege and the poor documentation with Xcodeproj, am facing some issues. Here is my code: require 'rubygems' require…
Adam Jakiela
  • 2,188
  • 7
  • 30
  • 48
2
votes
0 answers

how to write a program or a shell script to remove an existing xxx.framework(not imported from apple's libraries) from my project

system:mac osx 10.11.2 , xcode 7.2 i want to write a program or a shell script to remove/add an existing xxx.framework(not imported from apple's libraries) from my project. i tried to use XCodeEditor like this: XCProject *asProject = [[XCProject…
jiangjiefs
  • 149
  • 11
1
vote
0 answers

Two .xcodeproj files in one project. Unable to determine which one to remove and how

Iam having two .xcodeproj files in one project, While running via VSCode, i am getting this error/message Launching lib/main.dart on iPhone 13 Pro in debug mode... lib/main.dart:1 ProcessException: Process exited abnormally: Command line…
Ujjawal Maurya
  • 462
  • 5
  • 17
1
vote
1 answer

What is the source of Xcode build settings defaults?

I have two Xcode projects. Neither of them have custom ENABLE_BITCODE setting .pbxproj file. But in one of them it's set by default to YES and in another one it's set to NO. If I enable Customized filter - it's empty in both project. Where the…
1
vote
2 answers

.xcodeproj opening as code issue on xcode 13.2.1

I'm encountering this weird issue where my .xcodeproj is opening on code. Anyone knows where to check or undo? Currently checking the diff using FileMerge on Sourcetree and so far it's not helping. I'm using Xcode 13.2.1. I want it to open normally…
jaytrixz
  • 4,059
  • 7
  • 38
  • 57
1
vote
0 answers

How to remove file reference from Runner.xcodeproj

I have a ruby code that uses xcodeproject that adds my Google-Info.plist to Runner.xcodeproj as a reference. However I want to remove the older reference because I get following error: Xcode's output: ↳ error: Multiple commands produce…
Figen Güngör
  • 12,169
  • 14
  • 66
  • 108
1
vote
2 answers

Get xcodeproj and ruby 2.7.0 into the PATH

I would like to use ruby 2.7.0 and xcodeproj to get Nativescript work on macOS (version Big Sur 11.2.3). I did a clear install on my MacBook Air 13" 2014, following this links'…
inZuLiN
  • 11
  • 3
1
vote
1 answer

Command PhaseScriptExecution failed with a nonzero exit code, Xcode 12.4

I am able to run my app on simulator. On real device however, I am asked to give my keychain password, whereafter the build fails with Command PhaseScriptExecution failed with a nonzero exit code From the log: path/to/AppAuth.framework:…
Dan Abnormal
  • 1,188
  • 11
  • 21