Xcode "Run With Performance Tool" disabled? - performance

I am trying to find memory leaks from my Xcode project. I don't know, what happened - I can't select anything from Run->Run with performance tool - the list of things are disabled.
Please help me, I am a beginner.

The problem was i have deleted the build folder and was trying to run with performance tool, without building the code again, if you need to test your app with performance tool, you must compiled your code, and you need to have build folder in your project.

I believe you are building an iOS program. As said by Apple engineers, most items under Run with Performance Tool need dTrace support, but dTrace is not available for iOS yet, not even for simulators.

Related

Xamarin UI test alternative

I started using Xamarin.UITest for cross-platform testing (IOS & Android).
With Android it worked instantly without any problem and it keeps forking even after any SDK update or JDK.. name it!
But for iOS there was so many issue encountered with the device agent that didn't want to start, the wrong Xcode commande one, the wrong Xcode. Some time it worked, but out of no where it crashes.. then you must clean, rebuild, retry, cross your fingers it doesn't crash or at least that it will launch..
But now April 19 2019, I had an iOS update, combine with an Xcode update and sadly, it doesn't work anymore. I made a lot of research and attempt to recover my test case:
Downgrade Xcode to 10.1
Downgrade Xcode commande line tool to 10.1
downgraded the OS!
To finally rethink it. It's not a good solid testing tool if it breaks at every updates.
On the AppCenter it still works for both platform. But to create your test, you have to run them locally.. You can't anymore with iOS and if you find how to make it work, let me tell you : "See you for the next update!"
So the question is:
What are the alternative to do some automated UI test for iOS & Android using Xamarin?
Xamarin.UITest Xcode 10.2 support
Sorry to hear about your difficulty with the Xcode update.
Unfortunately Xcode minor updates for the last several releases have tended to break local iOS simulator testing, and occasionally device testing. I've seen this be an issue since at least as early as Xcode 9.x versions.
For context, Xcode 10.2 support was added in this package: https://www.nuget.org/packages/Xamarin.UITest/2.2.7.2002-dev
If you or future readers of this discussion still do end up using Xamarin.UITest, I recommend checking the release notes when new minor versions of Xcode come out to see if that support has been confirmed. Typically the support has been added in the 1st Xamarin.UITest package released after a new minor version of Xcode has been released.
(I generally haven't seen this issue with patch versions though, for example Xcode 10.2.1 didn't seem to cause any issues when it came out if it was run against a test suite that was working for Xcode 10.2)
Other testing frameworks
As for other testing frameworks, if you're using App Center itself; then Appium (JUnit) or Calabash are both able to be used with App Center Test and can be used cross-platform to run against your IPA/APK, generally regardless of what was used to write the apps in the first place, like Xamarin.UITest. (Though each framework has slightly different set up requirements and limitations.)
Outside of App Center Test, there may be other testing frameworks you can use; but that gets more into individual developer opinion which strictly speaking is out-of-scope for Stack Overflow answers.
Appium Studio which holds all the pros of native Appium. It also supports parallel execution with built-in test reporting mechanism. They also provide cloud devices with which you can check whether it is feasible for your project. Check out their documentation for more features.

What does The destination does not support the architecture means?

I have the same problem with Xcode Cannot Run on the Selected Destination
The destination does not support the architecture for which the
selected software is built. Switch to a destination that supports that
architecture in order to run the selected software.
I tried the solutions there and it doesn't work.
So I'll try to do something more reasonable.
What does the error means anyway? What is Xcode trying to say when it says to switch to a destination that supports that architecture? Where is the archtecture specified? What software? What is the problem?
While solutions may be nice what I am looking for is understanding of what it really means.
The project used to work
The project still work in real iPhone but not simulator
I used the newest facebook SDK. However, it run before even after the SDK. It's after I clean project it doesn't work.
While I don't have a solution for your problem, I can answer your question, namely, what does Xcode thinks is wrong and what does the error means.
So, the destination is actually your simulator in this case (could be the iPhone as well, if you're building for it). The architecture is decently explained here. What you need to understand is that in order for a software to run on a specific architecture it needs to be build for it(or assembled for it, to be more precise). That means that for the same software the CPU instructions are not the same for an iPhone (which has an ARM CPU) as they are for your iMac (which is x64).
Now, with the above in mind, what Xcode is trying to say is that you are trying to build the wrong architecture for your simulator and you should switch to a different destination that supports that architecture (as you mentioned, you can build just fine on the iPhone, which is a different architecture) in order for the software to run.
It could be an Xcode bug or a misconfiguration. You're probably better off creating a new project and copy all your classes into it than hunting it down.
You'll be happy to know this problem has a very simple solution. Select Info.plist in your project navigator tree and make sure it is not assigned to a target. I have confirmed this is the correct solution. If building for iOS 6 or earlier you may also need to add armv6 to supported architectures

MonoTouch to XCode Export

I am bidding on a project where the client wants the mobile app delivered in an XCode project as that they can sign it.
Can I build in MonoTouch, then "Export" to Xcode so that I can deliver that to the client?
My experience is that I can build in MonoTouch in roughly 1/2 the time as I can in Xcode. Mostly due to MonoTouch.Dialog and C#'s framework sugar.
I am using MonoTouch Enterprise 5 and MonoDevelop 2.8
I think a lot depend on the definition of "export to Xcode" and I encourage you to clarify this with your client.
If the technical requirement is simply to sign the application the know that the code signing step, done with MonoDevelop (or with the mtouch command-line tool), is simply calling the codesign tool which is provided by Apple. That step is applied on a fully built .app (directory) so anyone should be able (with the right certificates/keys) to sign it (as long as the .plist data match).
There is also some support to (in mtouch) to build an Xcode project (see --xcode option) that could prove useful. This is something you can (and should) try to ensure it can as is match your (client) requirements.
Finally there could be ways to create a dumb Xcode projects that could be used only to copy and sign files. I'm pretty sure that would be possible with VS.NET/msbuild and MonoDevelop/makefiles - but I don't know Xcode well enough to say if that's a possibility.
Conclusion: the only thing I really don't doubt is that you can make this with MonoTouch[.Dialog]/C# in half the time than other solutions ;-)

xcode 3.2.5 Run with performance tool -> Zombies option disabled

I have been developing for iOS but am new to Instruments. I was going through some tutorials for using instruments but most of them use Run with performance tool->object allocations, which is not present in my XCode (3.2.5) . If I select "Allocations" (which is present in my XCode), there is no option to select zombies (as is expected in Object Allocations). And also, Run with performance tool -> Zombies is disabled. Why does XCode disable the zombies option?
This post talks about it: Xcode "Run With Performance Tool" disabled?
I believe you are building an iOS program. As said by Apple engineers, most items under Run with Performance Tool need dTrace support, but dTrace is not available for iOS yet, not even for simulators.
I'm looking into this myself right now. If I find out more, I'll update this post. I was also hoping to use the Zombies performance tool for ios development. :(
Update: You might also look at How to run iPhone program with Zombies instrument? . I'm going to try that out.

Is there a way to install gcc in OSX without installing Xcode?

I've googled the hell out of it, and it seems like there is no way to install gcc on OS X without installing Xcode (which takes at leats 1.5GB of space). All I need is gcc and none of the other junk that comes with Xcode. And at this point, I'll take any other kind of C compiler.
I know I could simply install Xcode, but that is beside the point since I neither have my original installation disc nor a quick internet connection.
So... does anyone have any suggestions?
EDIT: Sorry if I was unclear, but I need the headers as well. I'm currently installing gcc4 via fink and it's downloading the shared libraries as well. I'll update on the progress.
EDIT 2: Ok, so I successfully installed gcc using fink. BUT, it's pretty much useless: "error: C compiler cannot create executables". After googling around, I found that not having Apple's Developer Tools installed is the cause of the error. Probably because I need all the libraries, headers, etc that are only available through Xcode.
Checkout command line tools for Xcode from apple. It's official support from apple to only create the command line tools.
Try the osx-gcc-installer on github.
I've been doing this for a long time, and I've done things like this, and I've concluded it's simply never worth doing. :-(
The reason is that no one expects you to do such things, so there are assumptions all over the system that "everything" is there. You might not run into this today - or worse, you might not even realize later that this is the cause of your issues.
Instead of wasting your smart time on things like this which don't actually produce any working code you can use, following the approved method, run the download overnight, and spend your time instead on planning and writing the top-level code (you shouldn't need a compiler for that anyway!)
I'm fairly certain that this is not possible. However, I'm also not sure if you need the whole developer suite to get the developer tools installed. Quite a few tools get installed along with XCode that might be optional. However, I think you're out of luck for not needing to bite the bullet and use wget or DownThemAll or some other download manager that will let you slowly download the developer tools in chunks.
Whenever I install OS X I install the developer tools as a rule, just because it opens up the world of available software tremendously. Perhaps you should consider doing this in the future as well.
The first thing you want to try is called Pacifist - what Pacifist lets you do is to open a large package (such as XCode) and to access parts of it directly. I'm pretty sure you'll be able to find a smaller package inside the XCode package that just has gcc.
HOWEVER it's not clear to me that this is the best route. If you are planning to do Cocoa or Carbon developing I strongly suggest installing the entire package because you will need all the documentation and headers. If you're only planning on doing command-line stuff, you still may find you need to poke around inside XCode to identify all the packages you will need - things such as libraries, headers, man pages and so on.
All in all you're probably still better off installing the whole thing - if HD space is really tight (because you're on a tiny old iMac for example) then look at tools like Monolingual - Monolingual removes all the international support from all the various OS X applications, which can easily reduce the size of an application by 50%.
There's fink and MacPorts, if you want an easy installer/updater.
Install the GCC package from the Packages directory in Xcode's disk image and you'll have just GCC. Note that of course you won't have autotools or other standard build tools, for which you will have to install more packages from that folder.
I found this googling around that appears to install it without XCode.
install Command Line Tool separately.
refer to
http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
yes i could do it with port but you need at least to accept the code license.

Resources