Debugging independent unit test bundle for iPhone? - iphone

I created an independent 'LogicTest' bundle as described in Apple's
latest and greatest instructions for iPhone projects.
I've successfully set up and debugged dependent test bundles on Mac
OS, just fine. However I have not worked with independent bundles nor
test bundles for iPhone before. The test bundle builds and executes
tests just fine, but I'd like to be able to step-through debug it
also. I feel like a custom executable pointing to otest is involved,
but I don't know the right arguments and environments variables to
pass to it.
Any help would be appreciated.
This is a repost from the xcode-users mailing list, but I got no response there.

I found this, but I haven't tried it yet:
http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html

See also "Anyone succesful in debugging unit tests for iPhone?".

Related

GWT module may need to be (re)compiled

I can run my app in development mode without any problems. But sometimes it is necessary to test the app without the gwt.codesvr=127.0.0.1:9997. Everytime I try this I get the above mentioned exception. Thanks to Thomas answer in this post: GWT module may need to be (re)compiled REDUX I know what causes the problem. I didn't find a way to solve it yet.
I am Using maven and use the target directory to run the app from. When I run the app (gwt:run) after building it (clean install) the *.nochache.js file is overwritten causing the error.
I have another app where this doesn't happen. But I cannot figure out what is different. Most of the pom stuff seems the same.
Can anybody help me with this? Do you need more information?
Regards,
arne
Please check your build path is set to correct output folder.
Also please compile the project and make sure it compiles with 6 permutations.
The compiler version should also be compatible.
Also refer the following link.
http://code.google.com/webtoolkit/usingeclipse.html

Trouble with core-plot example folder (examples not working)

The examples are not working for me, why?
It tells me loadDocSet.scpt => Shell Script Invocation Error.
I have build an own example in my project and it works, but I can't open the examples.
The Linking and everything else for the configuration of core plot is done well.
Googled that problem but didn't find a solution till now.
It sounds like you're trying to build the documentation set instead of the proper application or framework target. In Xcode, make sure your build scheme is set to CPTTestApp-iPhone or whatever the example application is that you need to build, and not Documentation.
Based on the latest version in the Mercurial repository, the sample applications compile just fine for me when the scheme is set as I describe above.

opencv example not working in OpenFrameworks

I have downloaded openframeworks from Github. I can run all the samples but if I am trying to run opencv example given in openframeworks. Its not working, showing 44 errors and errors are not common too. I think there linking files are also missing in github. Do you have any idea why only opencv example cant get executed ?
In, for example, iPhoneFaceSamplesSomething some files are missing that you can get from other parts of the project (jpg, xml) or just ignore (png). You get a ton of warnings because they added OS X libs which XCode ignore, no big deal. And then some libs are missing for the iPhone like opencv highgui and some other. You should try to get them from somewhere else or compile them yourself. The project definition is a bit messy, you can also file a bug in github.
actually the answer to this is that the ofxOpenCv examples only work when run on the actual device. ofxOpenCv doesn't work in the simulator on iphone currently.
Check the read me file for includes. Often times OF addons have dependancies that are not included in the download.
Also another thing that will get you sometimes is when you're running the incorrect profile on your system. Like OSX 10.5 instead of OSX 10.6. Also fiddle with the release and debug options(switch back and forth), that will often help (I know it sounds hack-ish).

"No architectures" error when compiling objective flickr for iphone device

I'm getting the following error when I attempt to compile my XCode project to debug on my device.
No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=armv6 armv7).
I've included ObjectiveFlickr in my project just as the readme describes. I've gone through the process several times and redownloaded objectiveFlickr a few times to start over.
I've gotten objectiveFlickr to work on devices in the past. I don't know why I am suddenly having trouble. Can anybody point me to something that might hold the clue I need? Any other info I need to provide? I made only changes to my project that are specified by the OF documentation.
I also get this error when compiling the included snap-n-run example project provided with OF. So I must be missing something beneath my project.
Thanks,
Charlie
Check out this post for another solution. I have not tested it for release/dist but it works for debug so far.
http://groups.google.com/group/objectiveflickr/browse_thread/thread/ad8e5ec6ba976672
Well, I wasn't able to truly solve this problem. However, after corresponding with Lukhanos, the creator of objflickr, I tried including the objflickr source code directly in my project. After a bit of trial and error to sort out which source files were needed (the "source" directory and the "LFWebAPIKit" directory) and adding the "SystemConfiguration" framework to my project, things are building OK.
Still no clue as to why I was experiencing this issue, but at least I can get my project built now!
Thanks
- Charlie

Noshadow option for nunit-console

I have following question :
what are advantages and disadvantages in running nunit-console with /noshadow option?
Your comments will be very helpful
Thanks
The main issue I've found with /noshadow is that it stops your project from building as NUnit is now forced to use and lock your DLL. If you leave this option disabled, then NUnit creates a copy of your DLL.
If you are trying to practice TDD and are constantly building the project in the Red, Green, Refactor cycle, then you can't easily use /noshadow. You will get an error message like:
The process cannot access the file 'bin\Debug\calculator.dll' because it is being used by another process.
There are probably ways around this, but that's the main problem I've found.
As for when you would use this: I think the main reason is to speed up performance, but as most true unit tests run really quickly, I'm not sure when you would really need this. I'm sure other people will come up with some good examples.
If you happen to rely on anything that uses a file location in your tests, say for some curious assembly loading process, or just something as simple as Assembly.GetExecutingAssembly().Location, then you're likely to hit problems because NUnit has copied your file to some other location than the build location.
I'd say that typically these problems can be avoided though -- especially if you avoid touching the filesystem in your unit tests.
A quick warning, the gradle plugin for Nunit has changed how to specify shadow options. Took me a while to find this so posting here in case it can help someone else.
noShadow is replaced by shadowCopy and defaults to false, that is, the name has changed and the sense/direction of it is the opposite. This was done apparently to match more closely what Nunit 3 does. You can read details about this in the plugin changlog at https://github.com/Ullink/gradle-nunit-plugin/blob/master/CHANGELOG.md