Distance lines are not showing in interface editor - xcode

after installing latest Mac OS X (El Capitan) I found that distance lines inside Xcode interface editor does not appear anymore after pressing alt key. I do not know if system update has something to do with it ... maybe I just pressed some kind of key configuration which disabled distance guides. Did someone ever had similar situation? Below I attached link to image which exactly shows lines I am talking about.
https://www.dropbox.com/s/qoy8wvvddxxaupy/2015-10-06_1341.png?dl=0

Ok so It turned out that the problem was in having two Xcode versions installed on one machine. I mean that currently I have Xcode 6.4 and 7.1 on my mac and version 6.4 behaves sometimes quite strange (for example I am not able to add new source file directly to project because I am not able to choose any group option). 7.1 is ok. So if you have some problems in similar configuration then get rid of Xcode 6.

Related

Magic Mouse behaves erratically in PhpStorm 2016 under macOS Sierra

Since upgrading to Sierra, clicking any text within PhpStorm 2016.2.1 results in a random block of text being selected and clicking within that moves the text around randomly instead of deselecting the text block.
Worked without a problem in El Capitan.
This has made PhpStorm into an extremely frustrating and productivity killing experience.
Any idea how to fix this?
Please see the latest EAP build here (I haven't yet tried it myself): https://blog.jetbrains.com/phpstorm/2016/10/phpstorm-2016-3-eap-163-5644/
Issue is tracked as https://youtrack.jetbrains.com/issue/IDEA-161617. Please check if the problem persists in the custom JDK build: https://youtrack.jetbrains.com/issue/IDEA-161617#comment=27-1642308
I found that turning off the "three finger drag" feature dramatically reduced this issue.
Follow the instructions in Apple's support docs for this.
It seems that under Sierra the Magic Mouse has become so sensitive that even touching the edge of the mouse with my other fingers can be misinterpreted as a three finger drag attempt.
Still happens intermittently, so I'm hoping some update to the driver by Apple or the PHPStorm JDK will get rid of any lingering occurrences. For now, this is the best solution I've found thus far.

Keeping 2 x Versions of Xcode on Mac

I was rooting around for the answer on StackOverflow to the question above, as I had recently updated to Mac Sierra and by doing so Xcode 7 updated to 8 automatically. I couldn't find the answer to what I wanted, so I decided to share my findings.
Of course I'm not quite ready to invest the time just yet in Swift 3.0 so I wanted to know how to keep two instances of Xcode on my machine for the time being.
Therefore below is how I went about doing this...
Login to Apple Developer Downloads and find Xcode 7.3.1 or equivalent version of what you want to maintain on your machine.
Download the file and double click on it to open the installer
DON'T drag it across to Applications just yet
Instead, open a Finder Window and drag it to Desktop/Downloads, to install it there
Control-click on the Xcode file to "Get Info"
Under Name & Extension, in the text field, change this from Xcode.app to Xcode7.app (or equivalent naming convention)
Drag this renamed file into Applications
Restart Mac
Open Xcode7 (or new & renamed application)
Voila! 2 x instances of Xcode on your Mac (Xcode proper & Xcode7)
I gather you should never open both apps at the same time. However here is a solution that really does help you if you are still currently developing in two apps or environments on different versions of Swift. Hope this helps.

Destination toolbar disappeared on XCode 6.4

Today in the morning I tried to compile my project to run in my device and I found the destination toolbar disappeared and I cannot choose my IOS device or IOS Simulator device as target. (I can do it in the Product/Destination Menu)
After some research I found the >> at the right on the screen and when I pushed a Scheme option appeared but it is disabled and I can't enable again.
This is what I tried with no success:
Open an old project to see if the problem was in my project
Create a new project (with Swift and Objective C but I don't think this make any difference)
Restart my computer
Hide and show the toolbar (View menu/Hide Toolbar and the View menu/Show Toolbar)
I tried all the previous options with the device connected and disconnected
I have installed the IOS Simulator 8.4 (when I run my project it runs in the last selected simulator) and XCode 6.4.
Looks like Xcode hides that menu when the window is a certain size. I have to make my window quite large before it comes back.
Not a fix as such but you can work around it using the menus: Product > Scheme and Product > Destination
You're probably running into the same issue I am. Like #BrandonWilliams said in his answer, it appears again if the Xcode window is wide enough. The underlying cause, for me at least, seems to be that in this build of Xcode (6.4) running on El Capitan beta 2 (with Xcode 7 beta installed), I am seeing duplicate simulators for iOS 8.4. And since there are two of the same version, the Schemes dropdown shows some sort of long GUID next to each one, causing the Scheme dropdown to be quite large:
I came to SO looking for an answer but realized that I had seen this issue before.
So the problem is basically that auto layout sucks (I mean it is not working properly in Xcode 6) and on El Capitan, the destination toolbar is for some reason hiding instead of collapsing properly. So when your Xcode window is narrow, the destination toolbar disappears.
But, if you expand the window far enough, it shows back up again.
In case you can't tell, in the first screenshot, the window is about 1241 pixels wide and in the second screenshot the window is 1541 pixels wide.
Go to Product then Destination and choose at which simulator or device you want to test your build.
I'm running with same problem. You can select device or change scheme using below steps:
Select Product from menu
Select Scheme or Destination
Select required Scheme option or Destination option
Alternative Solution:
The only solution is to use Xcode 7 or above. I've installed Xcode 7.1 and found Scheme/Simulator list available. Refer screenshot.
It seems that Xcode 6 or below doesn't support OS X El Capitan.
I am still seeing this problem in Xcode 7.2 on iMac with resolution 1920x1080. Resizing the XCode windows dens't help. I can have the menu bar back if I push the green button and go to full screen mode. But that's pretty annoying. This is how I finally figure out a solution that works for me. I notice that only if I open the project file that I have been working daily that the menu bar is missing. If I create a new project, the menu bar is there. And here is my solution:
Remove your project file on disc (or move it to a different folder)
Open the Welcome to Xcode window by shift+command+1
Make sure your project is no longer under this list. If it is still there, click on it and Xcode will tell you the project is not found and it will be removed.
Add the project file back and open it and I have my menu bar back (if you have moved it, simply opening it from a different file location may work I guess)
I guess the problem is that some cache value in Xcode about the project file is messed up somehow. Hope this helps.
I make my XCode screen little big and now find both options.
On XCode 9.0 beta, this worked for me: select View -> Show Toolbar from menu
right click on title bar -> select show toolbar
Fixed it by deleting the following file ~/Library/Preferences/com.apple.dt.Xcode.plist and restarting Xcode.
The downside is that Xcode preferences dropped to defaults obviously.

Accessibility broken with Preview.app in OS X 10.8.4?

We have an application that integrates with different programs (among which is the Preview.app) using accessibility. We use the AXUIElementSetAttributeValue function to programmatically select some text in a PDF document using the kAXSelectedTextRangeAttribute. This used to work fine but suddenly stopped on my Mac (nothing seems to happend). My co-worker doesn't have the issue so after trying to figure out the difference I remembered that I had just updated to OS X 10.8.4 while he hasn't. I then read about this update and among the features and fixes was the following:
Improves VoiceOver compatibility with text in PDF documents
This indicates to me that they have fiddled with the area where I am having the issue. My question is now weather this is simply a bug or if it is by design. In the case of the latter, what am I supposed to use in stead?
PS. We tried also setting the selection range using the Accessibility Inspector found under Developer tools in Xcode and it works fine in 10.8.2 but not in 10.8.4, which further indicates that this might be a bug.
This is indeed a bug. I just installed the developer preview of OS X 10.8.5 and the issue has been resolved here. In the change-log it also says that some of the changes in this version regard "PDF viewing and Accessibility".

Unable to build using Xcode 4 - The selected run destination is not valid for this action

So I'm horribly confused by this error, other threads on Stack Overflow mention I should set the SDK, but I see no option to do this. I'm trying to build:http://wafflesoftware.net/shortcut/
And I get no options, and I can only choose My Mac 64-bit, and I want it in 32-bit. Really beginning to hate Xcode 4.
Here is the screenshot when I try to edit my scheme: http://groovyape.com/scheme.png
Thoughts?
Firstly, I have observed that when Xcode 4 decides my Mac is 64 bit and all my other schemes have vanished, a restart of Xcode fixes that.
If you still have the issue after a restart, go to Manage Schemes... (under the Product Menu) and click on Autocreate Schemes now button. Try to delete the other schemes and see if you can run the project now.
However, if the issue is that you need to set the SDK, that's different:
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7".
FWIW I'm seriously considering reverting to Xcode 3.2.5 at the moment, 4 seems horrendously buggy.
In xCode 4.4.1, use Validate Settings to solve the problem!
I can select either 32bit or 64bit now.
Ran into the same error message ("The selected run destination is not valid for this action") when attempting to use XCode 4 to build/run a tiny Objective-C "Hello, World" project I created in XCode 3.x. Fixed it by choosing to "Manage Schemes..." from the drop-down menu to the right of the Stop button, deleting the one scheme on the list (click checkbox beside the scheme, then click the "-" button at the bottom left), and then clicking "Autocreate Schemes Now".
I also needed to change the "Base SDK" from 10.5 to 10.6, by clicking on 'folder' icon (beneath the Run button), clicking the root/top of the tree view below it, clicking on the blue icon below "PROJECT" in the pane just to the right, and then finally, choosing "Latest Mac OS X (Mac OS X 10.6)" to the right of that.
I had this issue today. I found switching Base SDK from Latest iOS (4.3) to iOS 4.3 fixed everything.
This will happen if XCode believes your mac is a 64-bit machine, when really it's a 32-bit. If this is the case for you, simply click on your project icon from the far-left pane - it's the menu item that displays your project name next to a little blue icon. This should bring up a center pane that says "PROJECT" at the top. Highlight your project name, and the third pane should now show your build settings. The first item is "Architectures" which will allow you to specify if you are building a 32-bit or 64-bit application.
Kind of amazing that none of the answers here solved the issue for me, but I figured it out. Forget restarting Xcode, or using Autocreate Schemes, still only 64-bit will show up as a valid destination in the scheme.
The correct solution is to change the Architecture for your project. Go to Build Settings (in the root node of your project), and change Architecture to 32-bit Intel, it's right above the Base SDK setting. Destination will instantly switch to "My Mac 32-bit". HTH somebody.
It sounds as if you're trying to run (Cmd-R or run button) the framework (which you can't do - it's not an executable, just a library) rather than simply build it (Cmd-B).
I had this issue and maybe it was a coincidence but when I restarted XC4 but this time didn't choose to load my project from the popup window that appears on launch - instead choosing it explicitly from the File menu - the issue didn't occur and the build started ok.
On the 3 or 4 occasions I had this error, I had chosen to load the project from the popup window that appears when XC4 first loads.
As I say, I might have just got lucky, but I certainly didn't make any other changes to the projects to 'fix' the issue.
I found a good practice for moving from Xcode 3.2.X to Xcode 4 is, to remove any references to older SDKs (in the case of Mac OS to remove any Base SDK Ref, etc., for Mac OS <= 10.5, in the case of iOS I think you need to remove everything <= 4.3) PRIOR to upgrading to Xcode 4.
I never experienced any problems for new Projects, created in Xcode 4, only for such that where created with Xcode 3.X or 2.X
Xcode 4.5. I was trying to compile for 10.6. It seemed to be stuck on 64 bit just because it couldn't find the sdk. I didn't get any message about it not finding the sdk.
I first tried to put in the correct path to /Developer-3.2.6/SDKs/MacOSX10.6.sdk but xcode didn't want to find it there. Then I copied that folder into 4.5 next to the other OSX Platform sdk (new location I think just look in the bundle).
And magically my 32 bit came back.
So my conclusion is that the 32/64 bit option is really dependent on whether xcode can verify the sdk that you're trying to use. Being stuck at 64 while trying to compile for 32 gives the error without notifying you that its first issue is that the sdk can't be found.
I fixed this by deleting my xcuserdata in my Project file. Not sure how it got corrupt. But it worked for everyone else in the office, deleting the xcuserdata did the trick. I made sure Xcode was closed while doing so. Just for fun, make sure you delete your DerivedData folder for the app, and do a build clean for superstitious folks.
If this happened after you renamed your app, go to Schemes -> Edit Scheme -> Run <YourApp> -> Info
Select the right executable file (YourApp.app)
Another way is to select None as executable and then reselect the YourApp.app from your Debug-iPhoneOS folder.

Resources