1

I made some changes to some source code today, and noticed that when I replaced "inDirectory" in a Bundle.mainBundle.pathForResource call with "subdirectory" and subsequently put it back in, Xcode replaced letters other unrelated areas of code with the letter "i". For example, if my code is:

let path = Bundle.mainBundle.pathForResource(...inDirectory:)
let deluge = something

and I replaced line 1 with

let path = Bundle.mainBundle.pathForResource(...subdirectory:)

and then corrected the method call, now line 2 looks like:

let diluie = somithing

If I then try to replace the i's in line 2 with what's supposed to be there, Xcode "corrects" my "mistake" and puts the i's back in.

Edit: Under System Preferences->Keyboard, I unchecked "Correct spelling automatically", but that did not help.

Edit #2: I'm using Xcode 8.2.1

Update:: After playing around with my project some more, I discovered Xcode is just replacing characters I select with the undesired character. For example, in line 2 the above code, if I select "u" by placing my cursor immediately before it, then move the cursor elsewhere, Xcode will replace the "u" with an "i". Will someone please tell me how to stop this from happening?

  • Will the user who downvoted this question please explain why? Is this question off-topic here? – moonman239 Feb 1 '17 at 21:46
  • I didn't downvote, but yes this question is off-topic here. Ask Different is for end users and software development is off-topic. See the tour and help center – grg Feb 1 '17 at 22:21
  • @grgarside: After reading both links, I still think my question belongs here, as it appears to pertain specifically to the Xcode IDE. From the help center: "We do encourage...how to use tools like Xcode for non-language specific tasks." – moonman239 Feb 2 '17 at 0:45
  • We should take the topicaliy discussion to Ask Different Meta. It looks fine to me since it's not about coding but about using an app called Xcode. Same as asking how to use word to edit a document covering Spanish history. The question is about the editor, not Spain. – bmike Feb 2 '17 at 11:52

You must log in to answer this question.

Browse other questions tagged .