How to make svn on mac stop ignoring .a files on commit? - ios

I would like to add .a files on an iOS project to SVN using Xcode, but SVN is apparently ignoring them.
Is there any configuration file where I can set SVN to not ignore these files?
I've tried changing the file in ~/.subversion/config but this file is completely commented and does not seem to be the one affecting the commit.
I've seen solutions for committing these files through terminal but I would like something a bit more hands free.

Related

Save packages downloaded by SPM into project GIT using Xcode 11

I started using new Xcode 11 which integrates SPM.
I added first dependency to my project:
but detected that files are not fetched into my project folder but into Xcode's cache:
I would like to commit all my dependencies files into my main project repository so my question is:
Is it possible to change location of fetched packages via SPM using Xcode 11?
It's somewhat possible, although the solution isn't necessarily a good or great practice, so I can't recommend.
Set the DerivedData in workspace settings to be relative to the workspace.
Add gitignore rules such that the workspace/WORKSPACE_NAME_DIR/SourcePackages/checkouts and related files are includes. Maybe best to ensure repositories directory is not included.
Add a Run Script phase to remove .git and .gitignore files in the checkouts directory.
Obviously, this is fragile largely through fighting the way SPM works. The workspace settings are per person so it's not great in teams.
SwiftPM integration has been setup to prevent this. It clones the files into a DerivedData/ProjectName-[RandomStuff]. You should commit your Package.resolved into the repo to ensure that you get the same version of each dependency across clones of the project.

Back to Default Git or gitignore settings on XCode project

Because me and my team started playing with the files that were included and ignored on the XCode Commit panel, our project has become very hard to manage on git. Since we added some libraries that we installed through cocoapods into git and uploaded them with the project, we have consistently gotten errors with files that don't show up on the user that pushed it, or other that show as missing for the user that made the pull.
To solve this, I want to take the most up-to-date branch, and reset git or the gitignore file in order to reupload to another origin from scratch, and hopefully have an easier time with our collaboration.
I haven't found a way to do so easily and safely. Is there a way to do so?
Thanks in advance.
If you want to go back to a standard gitignore file for your Xcode project, go to gitignore.io and enter Xcode in the search field. That will generate a standard gitignore file for Xcode projects.
Open up your existing gitignore file in a text editor. Replace the contents with the contents of the file gitignore.io created for you. Commit the gitignore file and push it to your remote repository. Now your team will be working with a standard gitignore file.

Why is xCode asking for Android Studio Gradle files?

I had to delete Android Studio off my MacBook Air to free up space for an xCode update. Now xCode is complaining its missing Android Studio files that have nothing to do with it but are somehow titled
file:///Users/administrator/Documents/Retrographic/Sprocket/Android/Gradle%20Binaries/gradle-2.2.1/lib/plugins/xbean-reflect-3.4.jar: warning: Missing file: /Users/administrator/Documents/Retrographic/Sprocket/Android/Gradle Binaries/gradle-2.2.1/lib/plugins/xbean-reflect-3.4.jar is missing from working copy
What the heck is this and how do I fix it? I tried re-downloading the branch in SourceTree and pointing xCode at it but its still having the same problem. Do I need to just nuke and re-install xCode?
:(
This seems very unusual...
My best guess would be to go through your various build settings in your project targets and ensure that this file isn't listed under anything for linking, building, etc.
If it is, delete it, provided you don't need it for your XCode project.
This error occurs as that file was under your version control system such as git and now it is removed. xcode checks the status of git and complains if a file was removed. You can go to your version control system and commit this change so that xcode doesn't complain. If you are using git, you can do the following:
git status
--> This should tell the file was removed
git commit ...
Some possible solutions.
Solution 1
Open your xcodeproj/project.pbxproj in a text editor
Search for "xbean".
Remove that line.
Solution 2
If you are using an xcworkspace, there may be some other project that is including that file. In that case, I'd do that for all project files. If that is infeasible, do a grep grep -r xbean . and then edit the named files. This command will recursively search for all files mentioning this particular file.
I'm not sure why is this happening, but i think there might be some file references in your project which are no more existing.
You can try this:
Search and delete missing files.

Using agvtool with multiple .xcodeproject files in one directory

I have tried using agvtool for ios build versionining. It works great when there is a single .xcodeproj file in the directory. In my case, our project structure is such that it has 4 .xcodeproj files in a single directory. When firing agvtool command in this directory it throws error message, 'agvtool does not work with multiple projects in the same directory'. Anyone has any idea how can I make agvtool work with this folder structure?
For people finding this post and using Fastlane, I just wanted to tell about the plugin https://github.com/SiarheiFedartsou/fastlane-plugin-versioning which have a increment_version_number_in_plist command which does not use agvtool (and support multiple .xcodeproj files in a single folder.
You just need to install the plugin above and replace your increment_version_number action with increment_version_number_in_plist .. they have a very similar contract.
For me, there were actually 2 xcode project files. i.e. projectName.xcodeproj and projectNameModule.xcodeproj. That happened as I removed some commits where we updated the project name from projectName to projectNameModule. For some reason even after reverting those name changes, the project *Module.xcodeproj and *Module.xcworkspace files were still existing.
I just deleted those unused files and it fixed the issue for me.

Issues Using GIT with Xcode projects

I know git and use it to manage a lot of my Repos on other projects. However I run into issues when it comes to xcode projects.
I start a project on Machine 'A' - when I push up to a repo and pull to let say machine 'B' I always receive compiling errors. Normally the errors have to do with files not being found. Literally "no such file or directory" followed by a path.
I'm working with the same version of Xcode on both mac's A and B. I also use the threetwenty framework.
When I zip the project up and send via email - the same results occur.
Many times these files that xcode can't find and that fail the build, are media files, like a image or video. Sometimes I see the three20 framework too.
My question is - how in xcode should I set a project up to play nice with git and or code sharing in general. Let me know if you need more information, I know the above is a little vague.
The first thing I always do is set up the .gitignore file before adding any other files from the project. Problems can occur when loading project settings for two different machines that may have the same User account name. You have to make sure some settings aren't added to the repo whilst others are.
I set up my .gitignore by adding the following:
.DS_Store
*/.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
*.mode1v3
*.mode2v3
Documentation/Generated
doxygenWarnings.txt
*.xcodeproj/xcuserdata/*.xcuserdatad
*.xcodeproj/project.xcworkspace/xcuserdata/*.xcuserdatad
*/*.xcodeproj/xcuserdata/*.xcuserdatad
*/*.xcodeproj/project.xcworkspace/xcuserdata/*.xcuserdatad
If you create the repos from scratch or run git rm --cached <filethatshouldbeignore> to each file that should be ignored and then commit, see if the problem still occurs.
Problems will occur in the .pbxproj file, so make sure all conflicts are corrected too.
Regarding files that cannot be found, remember to import the libraries etc. into the project folders and reference them from there. Apple's own iOS libraries should be fine, but others won't be. For example, in your project folder, copy your images from there and reference them only within the project folder.

Resources