Closed cepages closed 8 years ago
I do not think put it in Build Phases
is a good idea, because the project is being built and you are trying to modify the project file. There could be some conflicts.
Try to put it in post build action
like it described in README.
@truebit I tried in the post build action
too and it broke the project too.
To be honest I just need to be pointed where I can find out what's breaking the project and why.
Because the project file is different for every project (especially after various merges in the repo, that would contain incorrect structure in the file).
You could execute xunique -d project.pbxproj
in command line and paste your output here firstly.
mmmm weird I don't have such option:
Usage: xunique [-v][-u][-s][-c][-p] path/to/Project.xcodeproj
xunique: error: no such option: -d
But it seems upgraded:
pip install xUnique
Requirement already satisfied (use --upgrade to upgrade): xUnique in /Library/Python/2.7/site-packages
Cleaning up...
pip install --upgrade xUnique
Requirement already up-to-date: xUnique in /Library/Python/2.7/site-packages
Cleaning @up...
Sorry, It should be -v
instead of -d
Unfortunately the log seems ok
(xUniqueAvoidingMergeConflicts *+%)$: xunique -v ios/myProject.xcodeproj/project.pbxproj
Uniquify and Sort
uniquify PBXProject
uniquify PBX*Group and PBX*Reference*
uniquify XCConfigurationList
uniquify XCConfiguration
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify PBXTargetDependency
uniquify PBXContainerItemProxy
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify PBX*Target
uniquify XCConfiguration
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
uniquify all kinds of PBX*BuildPhase
uniquify PBXBuildFile
Debug result json file has been written to '/Users/myUser/Documents/Projects/myProject/myProject-lib/ios/myProject.xcodeproj/debug_result.json
replace UUIDs and remove unused UUIDs
Ignore uniquify, no changes made to "/Users/myUser/Documents/Projects/myProject/myProject-lib/ios/myProject.xcodeproj/project.pbxproj
sort project.xpbproj file
Ignore sort, no changes made to "/Users/myUser/Documents/Projects/myProject/myProject-lib/ios/myProject.xcodeproj/project.pbxproj
Uniquify and Sort done
It's weird, it's really random, I run the command and sometimes it breaks the main project, sometimes the Pods project (even without the command pointing to the Pod project ) and sometimes (around 70% of the cases) nothing is broken.
Do you mean running the command xunique -v project.pbxproj
in terminal would sometimes fail?
If so, please post the error log when it fails, either in main project or cocoapods project. post the fail logs here
If it would fail only in xcode build process, you may need to change to use the commit hook method mentioned in README. maybe related to #24
It seems is working with the hook, but I will test it more, because it was random :)
Btw because I'm testing this in a different branch and I want just to be run in that branch I created this script ( in case someone want to do the same :) )
#!/bin/sh
NAME=$(git branch | grep '*' | sed 's/* //')
BRANCH_USE_XUNIQU="banch_to_use_XUNIQUE"
if [ $NAME == $BRANCH_USE_XUNIQU ]
then
echo "Branch name $NAME : Warning xUnique is run"
xunique -v ../ios/myProject.xcodeproj/project.pbxproj
xunique -v ../ios/Pods/Pods.xcodeproj
else
echo "Branch name $NAME : xUnique is not run"
fi
Thanks
Hi,
I added an script in the
Build Phases
in my target withAnd sometimes when I build my project the script breaks the
project.pbxproj
file and aproject.pbxproj.ubak
file is createdI had the same problem adding the script in the schema.
I'm using XCode 7.2. and I have multiple targets but I apply this to just one target
This is how the file ends
Any idea where is the problem? or if there is a log where I can find why is breaking the project file?
Thanks