Xcode 8 Memory Graph says "No selection" and not working - ios

I am working with a project using Xcode 8.0 and Swift3.
I want to use Memory Graph Debugger but it shows nothing:
Expected appearance (from tutorial):
Why can't I use this feature?
This project was created using Xcode 8 (not migrated from old version of Xcode).
Is bitcode related to this problem?
I am trying to use Memory Graph with "Debug" configuration and bitcode on "Debug" is enabled(YES).

Computer restart is what you have to do.
It happened for me too, and no amount of tweaking the settings fixed it - disappointingly, the only thing that worked was a complete restart of the computer.

This could be because you haven't enabled the things that need to be enabled for your requirements. You could try these two steps:
First, launch scheme editing by clicking on "Edit Scheme" as in this screen shot:
Second: go to "Diagnostics" and enable the things that you need to work (sometimes I need these two things):
Close out of editing schemes and try again.
Props to this answer for shaking my own memory awake on this one.

Restart computer is nor work for me.
And it can work on simulator, so I try to restart my device, and it worked.
on Xcode 10.
Restart your device

Changing to a different simulator helped in my case.
I have not done any detailed research but still I wanted to share my solution; I had the same problem recently with Xcode 9.4.1 / Swift 4.1. Restarting the computer did not help in my case. However, changing the simulator to 'iPhone 7 - 11.4' (I had used 'iPhone 8 - 11.4' before) solved the problem in my case.

Related

Xcode Memory Graph Debugging Icon not showing

I've recently started working on an existing objc project and wanted to check the memory graph debugging tool. As I started a debugger with the app I realised it doesn't show in the debugging tools.
I tried it with another project (created a new swift project) and the icon suddenly did show again. But only for this project.
So my question now is if there're any settings in a particular project that can prevent the memory graph debugging tool from showing?
Any hints are appreciated.
I tried a lot of different simulators (iOS 9/10/11). I event tried rebooting my macbook because I read somewhere this could help ;-)
I'm using an objc only project with Xcode 9.1 or Xcode 9.2 beta 2.
This is my diagnostics selection in the scheme if that's related:
Step 1: shut down and restart your iPhone.
Step 2: quit and reopen Xcode.
This should make the button reappear.
For some reason, the button is not there when I test on the device, but it's there when I test on the simulator.
Hi I was having the same issue. It's actually hidden here:
It appears that the memory debugger will only work for newer devices. It definitely does appear on the iPhone 8 running iOS 11. On some of my older devices it does not appear. I'm not sure at this time what the cutoff is.

How to solve the ** 0_abort_with_playload ** Error in ios 10.2.1. [duplicate]

When I run the app in Xcode IOS 6 beta 2 firmware on the device 8 Beta 2, I get the error message:
"dyld: could not load inserted library '/ USR / Library / libgmalloc.dylib", because the image was not found. "
What could be the problem?
Disable "Enable guard Malloc" from diagnostics to run app in device.
This is because Xcode mount wrong DeveloperImage. If you open the Settings-> Developer you will see that the "Enable UIAutomation» and others are missing.
For fix:
move all folders from "/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" except "8.0 (12A4297e)" to safe place
reboot the phone
connect your phone to xCode 6 beta 2
restore folders in DeviceSupport
This is the only thing that helped me. Even re-flashing on ios8 beta2 does not helps.
If you're using any 3rd party IDEs for iOS development (e.g. RubyMotion) you should be able to fix this by rebooting your device without that 3rd party IDE running and building and running an app on your device from Xcode.
I've been seeing this on Xcode 7.1.
My quick and dirty solution has been to open the right sidebar of the playground, and toggle the platform setting under "Playground Settings".
In my case, I toggled from iOS to OS X and viola, playground compiles and runs as expected.
Reboots had no effect in my case.
Just restart your iPhone. It worked for me.
Disable "Enable guard Malloc" from diagnostics to run app in device.
Edit Scheme
step - 1
Step 2:
you can see Memory Management Uncheck Guard Malloc
Try deleting the app from the device and then reboot. Worked for me.

Unable to determine simulator device to boot. - Xcode

I just downloaded Xcode 6 & played with it a bit.
After switching back to previous version of Xcode and running in simulator, I keep getting this error.
Unable to determine simulator device to boot.
How do we resolve this?
Thanks in advance.
Make sure you have only one iOS Simulator instance running in the Dock.
There was a simple answer to this for me:
Open the simulator via Xcode -> Open Developer Tool -> iOS simulator (even if it can't launch, the app will be open).
With the simulator app open, go to Hardware -> Device -> Manage Devices.
Add any missing simulators with the plus button (all of mine were missing for some reason).
I've faced same issue and solved by below steps:
1) Move xcode6-beta into application folder
2) Restart mac and open xcode6-beta from application folder.
I had the same problem when running from Xcode 6 beta selecting iPhone 5s. If I choose iPhone 5 or "resizable iPhone" then my app launches fine.
You will not see the profiles of simulator without a rebooting of OS X.I added simulator for many times,when the rebooting finished, it shows on the device list under the simulator bar. I think this is a bug of Xcode 6 Beta
I think you have 2 simulator running in the dock. Please close another one simulator and run the project again. It might helpful for you.
In my case I had such a message just because the simulated device was still booting (longer than usually, I guess). Xcode 7.2.
(This is not actually an answer to this specific question, but I came here googling the message in the title, so I am writing my note here for if someone else gets the same case as I did)
My case wasn't about having two simulators open. It was just because having instruments open as well. Closing Instruments resolved the issue
I just fixed the exact same problem by removing the beta version and rebooting the computer.

Xcode 5 running with iOS7 look and feel with Base SDK 6.1

So, I've been updating this app that has a BaseSDK of 6.1.
So far it has been fine, until this afternoon. I ran it once on my iPhone 5 and it was fine (but crashed). It was running with the iOS6 look and feel like I wanted.
Fixed the bug (just a simple index out of bounds bug) and ran it again and now it runs with the iOS7 look and feel.
I've checked the deployment target and the Base SDK and I have no idea why it's doing this.
Can anyone point me in the right direction?
SOLVED
OK, so I managed to fix it.
I had to...
Quit Xcode.
Delete Derived Data.
Delete the app from my phone.
Restart my Mac and Xcode.
Rerun "pod update" for my cocoapods. (I tried this before with no luck).
Then start it all up again.
Now it's fine.
I haven't changed any code and all the Base SDKs and deployment targets are the same.
Oh well...???
Xcode 5 does not support SDK 6.1.
You can trick it to use it, but the behaviour is undefined.
If you have multiple SDKs installed, then Xcode 5 has a bug (or undefined behaviour, whatever) where it shows the connected devices twice (or N times for N SDKs installed) in the drop down where you select simulator/device.
Each of these icons will access the connected device using one of the SDKs you have installed, so even though they look the same, they'll have some odd side effects.
I always use the top one.. (better ideas welcome)

"The run destination iOS Device is not valid for running the scheme"

I've been running my app on an iPhone 5 /iOS 6, but when I try to run it on an iPhone 4S / iOS6 I get "The run destination iOS Device is not valid for running the scheme NN. The Scheme contains no buildables that can be built for the architectures supported by the run designation device".
I've looked at previous postings on this but they involve issues with the Deployment Target.
In my case I've got the Base SDK set to 6.1 and the Deployment Target set to 5.0.
The iPhone 4 has got iOS version 6.0.1.
It was a bug in XCode, I closed and reopened Xcode and it started working.
I've noticed this sort of thing many many times now with Xcode with other problems, its very frustrating that the tool is so dodgy.
I had the same problem. The issue that i found is that , by mistake I had chosen iPad as deployment target due to which XCode showed that iPhone 5 is an invalid device. .
Hope it helps. Then I just changed the target to iPhone and it worked.
The run destination iPhone is not valid for Running the scheme.
Quit Xcode
Open Xcode
Clean project
Run project
It will work
This is some sort of memory issue sometimes.Close some application and try again.
Close Xcode too and reopen. Worked for me.
Cheers.
Quit and Reset Xcode can reslove most problem. The other cause is Device not support iPhone, you can
Target -> select scheme -> General -> Deployment Info -> Device-> select Universal or the current device you want.
In my case the problem was missing executable value selected into Scheme -> Profile -> Executable (e selected from the dropdown build configuration debug and executable the "application".app).
A simple solution.
1) Force quit X-Code
2) Force quit itunes
3) Reconnect iPhone
4) Open X-Code
Go to project info set development Target as 4.3 or 5.1.1 and same in target also.
I had this problem in XCode 9.0.1.
It seems that XCode does not refresh the list of connected devices.
You may notice that after disconnecting your device, you can still choose it as a target. So XCode may actually be trying to connect to a bogus device.
To fix this:
Edit the scheme.
Re-select the scheme's executable.
this seems to force XCode to update the list of connected devices.
If that did not work, try reconnecting your device (cable) before you do this.
Or perhaps, some other combination of disconnecting device, connecting device, and re-selecting the scheme's executable.
As a desperate measure, you may also try to change the cable that connects your mobile device to your pc.
But ideally... Xcode should be fixed.
Just Go to Devices -> The Intended device you wanted to run (I Was iPhone6 Simulator)-> Select the Device (I was selected iPhone6) -> Right Click-> Make sure the ‘Show the Run Destination Menu’ enabled.
For Me, it was enabled. I did, it worked.
I faced this issue in XCode 9, but later realised that for some reasons I had unchecked run destination in "Devices & Simulators" window
In my case, none of the answers given worked for me.
I was trying to setup TravisCI to my project and this is what i did:
Select Target > Edit Scheme > Build
Check the "run" option in the Tests target and the issue disappeared, i hope this help someone, i spent 2 days trying to fix this.
Other solutions might work for other scenarios but, in case using Xcode 11, I went into "Build Settings" of my test target and changed to universal under "Deployment"->"Targeted Device Family"
Select your project, Under Targets, select your main target, then on the Build Settings Tab, there is one field that says "Valid Architectures". Make sure "armv7" is also there. You probably only have armv7s right now.
I am using XCode 8.2.1 having same problem.
Solution:
->Go to Devices
-> Add additional simulators
->Right Click simulator u are using
->Show in Run Destination Menu <-Enable this Option
For me Xcode failed to copy symbols for connected device due to low disk space. First check if you have symbols connected device under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/.
Since I had iOS 8.3 (12F70) installed on my device the path for me was /Users/$USERNAME/Library/Developer/Xcode/iOS DeviceSupport/8.3 (12F70)/Symbols The size of this directory should be around 2.5GB.
When I got this issue the size was 484 KB.
To fix it I
Free up about 3GB of disk space. You can delete folders for any unsupported devices that you might have under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/
Disconnected device from Xcode and closed Xcode.
Removed the folder in above path (everything under 8.3(12F70).
Start Xcode and connected the device.
Xcode should start Copying symbols once done the size of the folder should be around 2.5GB
This happened to me because I switched branches in source control with unshared schemes.
My xcuserdata folder was git-ignored, and it contained a scheme I forgot to share. This meant I was trying to use a scheme that was from a completely different code branch.
I remade the scheme which fixed the problem, and marked it as shared so that it would be in the xcshareddata folder and checked into source control.
For my case, check the target -> Build Settings -> Search "Mach-O Type" and check the value, it should be Executable/Dynamic Library/Static Library. For other type values, the target could NOT be built and run.
This is similar to Kunal Gupta's comment, but I got this error after running an Xcode project on an actual iPad (the deployment target was changed to iPad and I wanted to run it on my iPhone simulator). Remember to change the deployment info after you use an actual device/simulator, especially when switching from iPad to iPhone.
Swift 3 or 4 Xcode 8 or 9
One thing you can do is click the Project file to open up General Settings, Capabilities etc.
Choose Build Settings
Search for Base SDK
Make sure debug AND release have the same build type.
I had debug set to ios 11.0 and release set to macOS 10.13
They must be the same in order to Archive
In my Case,
I open my iPhone here is the alert appearing in my iPhone for Trust and Don't Trust. I click on Trust. It works fine.
Switching to a different USB port and restarting Xcode solved the problem. Experienced this issue on iMac running Xcode 9.1 whenever I tried connecting any iOS device to one specific USB port. If your USB ports stopped working, check this.
Open the Apple Menu > About this Mac > More Info > System Report > USB and check that the device appears in the USB Device Tree. If it is not here try another USB cable.
I notice this with certain cable+device combinations (probably bad contact), restarting the XCode will only help for one or two runs and then it strikes again. Changing cable / device is the only long term solution worked for me.
In my case, this issue was fixed changing the Architectures (Build Settings --> Architectures) to Standard architectures - $(ARCHS_STANDARD)
Make sure to have arm64 armv7 armv7s on Valid Architectures.
In the case of iOS 13.x - What worked for me is unpairing my watch to my phone and repairing it to my iPhone. I wouldn't just unpair it via Bluetooth- I repeated the whole cycle as if I got a new watch. It took 10 mins to do the whole thing. When I ran my app again, it worked. From there, ensure all your Targets have the same sign in for identity.
Device Support Files is missing for device iOS version. Add it in XCode App Content path.
App Content Path is "contents/Developer/platform/iPhoneOS.platform/DeviceSupport"
Dowloaded support files from here and past them by creating folder of device version number there in app content path.
Go To General => Supported Destinations add IPhone or whatever platform you want run your app.
I encountered this issue while trying to run a watchOS app. After restarting both the Apple Watch and the iPhone, it displayed a different error message that informed me about the Developer Mode setting being turned off:
The run destination iPhone is not valid for Running the scheme 'My Watch App'.
To use Apple Watch for development, enable Developer Mode in Settings → Privacy & Security.
I turned on the Developer Mode setting, restarted Xcode, waited for a bit and it started working again.
Make sure your Xcode is up to date.
This might sound obvious. I tried all the answers presented in this threat and nothing would help. I used Xcode 12.0. After upgrading to 13.1, everything worked as expected.

Resources