xcodebuild -workspace /Users/User/Workspace.xcworkspace -scheme NameOfScheme clean
2) Note that clicking the Clean Before Build flag in the Jenkins XCode plugin will *not* achieve the same affect. Look at the console output from the above command and look at the console output from Jenkins with this flag set - it is not the same, nor is the result, therefore if you need to properly clean things add a call to XCodeBuild clean explicitly.
3) Even if you add the two lines explicitly to the Jenkins script, then changes to the library are still not included. I found the only way to get the change included in the build output was to first delete XCodes build directory for your workspace, thus you need to add this line to the Jenkins script before the build starts:
rm -r /Users/User/Library/Developer/XCode/DerivedData/*
(If you have more than one workspace then adapt this command accordingly to only delete folders for the particular workspace you are dealing with - directories with the name NameOfWorkspace-randomstring get generated in DerivedData folder).
If you do that then finally your changes will be applied to your build. This last step is not necessary if not using Jenkins, therefore my conclusion is it is *yet another* bug with the XCode plugin.
Not the first problem I've found with it - use it at your peril if your project isn't striaghtforward.