Refactoring Images in Xcode 7? - xcode

It is possible to refactor images in Xcode 7? I have a lot of images and I want to change their names. But I do not want to change every reference to this image manually.
I cannot find anything at Google.

Xcode can only refactor C and Objective-C code for now. You will have to do the refactoring manually, or simply using Find > Find and Replace in Workspace...
To avoid potential crashes that might be caused if you make a mistake, use R.swift, which makes it similar to how it works on Android.

Related

Opening StoryBoard in XCode automatically adds ~100 auto layout warnings when I open a project and they won't go away when I click "Update Frames"

This might be hard to diagnose without seeing the project, but Xcode keeps adding tons of warnings to my storyboard. It is a source controlled project, and if a team member cleans up all the warnings, pushes, and I pull, the warnings go away but as soon as I open storyboard, they reappear and they do not go away when I do the standard Update Frames option.
A lot of them seem to have to do with Stackviews, but I'm just confused why my coworkers can get the warnings to disappear and I cannot.
Has anyone experienced anything like this, or have any tips on how to approach solving this?
I was using Xcode 7.3 but after updating to 7.3.1 the problem still persists. Running OS X 10.11.6
Edit: Just to add some specifics, when I look at the source code versus my local code, it basically adds a ton of "Misplaced" tags, and a lot of values are changed by 0.5 or 1 pixel.
I do have the exact same issue when working with others on the same storyboard. It will happen every time you open (or another colleague) the storyboard. Here are some advises to avoid this :
When I open the storyboard, I know it will provoke this warnings. So if I don't add anything, before pushing a new commit, I reset any changes on the storyboard
I've come up with another good solution : using storyboard references as much as I can. So what I do is basically creating a storyboard for every flows (sometimes you can even have one storyboard for one controller). That way, when I work on a part of a project, it won't generate warnings on the totality of the storyboard. It avoids epic merge with many conflicts, it is easier to maintain, and it's faster to work on a small storyboard than on a huge one (Xcode is powerful, but when you have big storyboard, at a certain point it will lag).
But to answer to your question, I think everyone have that same issue when working on big projects, hopefuly apple will solve that one day, but for the moment you have to set good practices with your team. This is the only way to avoid wasting time at every pull ;) (at least for me, maybe someone has a better solution).

Xcode autocomplete showing results that don't exist on object

When using App Code, autocomplete will only show results directly related to my struct. This is a great feature as it keeps everything very clean and I know that accessing these properties isn't going to give me an error.
Except I don't like App Code and it's non native looking UI.
In Xcode it's quite different. Why am I getting flatMap, map, description, debugDescription?
Obviously if its my own code, I know which properties/functions are okay to use, because I wrote them. I can just ignore the noise. But if I'm using someone else's library this can slow things down. Especially when I'm just guessing or trying to remember a function.
Is there a way to fix this — to have Xcode not show me functions/properties that I can't use?
It always shows default system objects properties if the object/class is not found.
It's the behavior of Xcode

Xcode 5.1 compiler errors after adding a framework

So I am new to Xcode and Macs and I seem to be getting a lot of errors after trying to add a new framework. I needed the NSMatrix class and it was not included in the default frameworks (Foundation, CoreGraphics, UIKit, XCTest were. So I added the AppKit framework using Project Navigator>General>Linked Frameworks and Libraries. After I added that and #imported Appkit/AppKit.h in the .h that needed the NSMatrix class the errors for NSMatrix went away and it turned blue. Indicating that it found it I assume.
After that I tried compiling the project and got these errors:
http://i1346.photobucket.com/albums/p694/parkertmorris/ScreenShot2014-04-07at42152PM_zps3a1fdfdd.png
I tried removing the AppKit framework and the reference to it and compiling but I still get these errors. I also tried cleaning the project and deleting the DerivedData folder but nothing is changing.
Any ideas how I can fix this? Tried to research this problem for at least an hour.
Thanks
You and I are both new users (although I am a long time reader) to SO, and as such I'll try my best to help :)
I noticed you tagged this under "iOS". AppKit and NSMatrix are OS X specific, not for iOS, and you may want to remove the iOS tag as such and tag the question appropriately.
When problems like this happen to me in XCode, which occur less frequently with experience but still at annoying intervals, I tend to step backwards using Git (or whatever SCM you like) to a point where things are the least messed up. Based on the fact that your compiler errors are still occurring without AppKit/NSMatrix references, your problem likely exists independent of the framework, or at least alongside the framework.
Try opening your project.pbxproj file inside your project package and looking for duplicate entries of .h files under the same groupings. These types of problems sometimes bite me when rebasing/merging in Git and 90% of the time I can fix them with a very simple change to my project.pbxproj file. Even better, try diffing your previously working .pbxproj with it's current state and see what's going on.

Xcode not verifying code or suggesting classes in certain classes

I have a folder I imported into Xcode using the folder reference method. I'm having no trouble importing all the classes inside of it to other files and using them on the Storyboard however there is a quite annoying Xcode bug that makes it hard to do anything.
That Xcode suggestion system that has made me so fond of using Xcode and Objective C doesn't show up. So if I start to type "NS...." it doesn't recommend all the NS Classes! or Anything else for that matter.
How do I fix this?

How do I translate monotouch code to xcode

I have an app written in MONOTOUCH. It works- I tested it with TESTFLIGHT. It is being added to a larger app, and that developer needs the full xcode project. Do I need to have it rewritten or is there a way to convert it easily.
There is no way to convert Mono code to Objective-C code.
There is an --xcode option that may or may not work. It has not been maintained and we do not officially support it, so I would not depend on it working.
My suggestion is to keep the two applications separate, and transfer control from one to the other by using urls. You register two url handlers "firstApp:" and "secondApp:" and when you need to go from the first to the second, you issue a Url open to "SecondApp:statevariables" and the same process is repeated to go back.
If you have a MonoTouch license, you can use mtouch --xcode yourapp.exe to generate Objective-C code. It doesn't work in the evaluation version.
Much more detail is available in this Stack Overflow answer.

Resources