How to get back all those good old Xcode features? - iphone

After I've upgraded to Snow Leopard and Xcode 3.2, everything was screwed up. It took a while for me to figure out the whole evil was that my old Xcode installation was not really "updated", but replaced. So just everything was gone. All SDKs, Settings, everything.
So Code Sense did not work because of no SDK available, and all the other problems mentioned also just appeared because of that. So now, after re-installing all SDK's, Xcode seems to work fine. Well, almost: Simulator 2.2.1 is gone, which feels more like a punishment for upgrading fast to SL.
After all I decided to re-edit my question to prevent irritations. However, here in short what problems I had, so the answers still match:
1) The font was totally different
2) New Xcode didn't autocomplete CGRectMake and provided no parameter info, for instance. That was because of all missing SDK's and my wrong believe that it was an "upgrade" rather than a whole new replace.
3) New Xcode didn't highlight same symbols in scope. Same problem cause like above.
4) New Xcode never autocompleted anything. Same problem cause like above.
Off topic, but I feel everyone in the world must know:
The new Quicktime Player sucks. They removed all important controls like speed and sound tuning, which was always welcome on bad video trainings. Hopefully, they will add those important features again soon.

You are the first person I know of who feels that Xcode 3.2 is not a significant step forward. In response to your issues:
1) The new default font for Xcode is Menlo, as opposed to the previous Monaco. You can easily change this back under Xcode | Preferences | Fonts & Colors. Personally, I prefer Anonymous Pro or Inconsolata.
2) It sounds like your Code Sense index for your project might be messed up, causing the autocompletion issues that you're seeing. Click on the root of your project in Xcode, bring up the inspector, go to the General tab, and click on the Rebuild Code Sense Index button. I had this happen to me once, and that took care of the problem.
3) If I double-click on a symbol to highlight it, a dashed underline does appear below all instances of the symbol within the scope. As has been pointed out, right-clicking on the symbol will let you Edit All in Scope, a really nice addition to the editor.
4) See 2) above.
As far as the Quicktime Player, you can install the old Quicktime 7 as an optional player so that you can gain back some of the functionality that hasn't made it into the new player. The whole point of the new player is to start from scratch with the video playback frameworks, enabling much better performance (my MacBook Air can play 720p video without stuttering now). The missing functionality will be added back in, as it was with the new iMovie.
The point of Snow Leopard was not to remove capabilities, but to refine what was there and to strip out obsolete elements. In the case of Xcode 3.2, they added the integrated Clang LLVM compiler team, the integrated Clang Static Analyzer (worth the upgrade alone), a much improved documentation browser, and many new capabilities to the editor (like the Edit All in Scope mentioned above).
As far as iPhone OS 2.x support, you can build for it in Snow Leopard, but the Snow Leopard version of the iPhone Simulator only runs the 3.x OS. Apple clearly wants you to target the 3.x OS going forward.

1) Change the font in the Xcode preferences.
2) Xcode preferences "Code Sense"
3) Select the symbol and hover over it, after a short delay a small grey triangle appears to the right of the symbol, left click on it and select "Edit All in Scope". Not quite the same.
4) Same as 2 above.
Both 2 and 4 work for me, I must have different preference settings.

I use Mac OS X 10.6.1 and Xcode 3.2:
My fonts are nice
Works for me
Works for me
Maybe you should try to reinstall.

As noted, all of the things you list can be addressed with preference settings in XCode - for #3, check your setting for "Edit All In Scope" under "Code Sense" in Settings.

Related

IB z-order on simulator 6.0

Consider the above's IB objects listing. Siblings further down the list should be on top of the siblings listed further up when rendered on the screen.
Under Xcode 4.5.2, everything is ok if iphone simulator 5.1 is used. But for simulator 6.0 the map just covers everything. The same if using actual devices (phones) for testing.
Hope that somebody knowledgeable could help.
Please also add comments if you do not (or do) find such a problem on simulator 6.0. Chances are the problem is related to how my project is setup.
Update :
Have setup a new test project with iOS 6 map view myself. There seems to be no problem with z-order at all. So the problem could relate to my code. Unfortunately, quite a lot have already been written, there wouldn't be enough time to go over everything for the time being. I suspect that it has something to do with the rootViewController property. My project initially followed a older scheme in which rootViewController was not used ...
I dont know if that order is reliable at all -- in the past definitly not and I am not conviced it is today :D. (even though apple claims it :D)
see: IPhone Interface Builder: Z-Index, Z-order of a button, image, ui element, etc?
(the 3rd answer currently. 7 votes)
The problem is solved by calling Window's bringSubviewToFront method. But I believe a better and more proper solution can be found given enough time.

Weird three20 graphics bug in thumb viewer when running in release mode

I've just encountered the strangest problem with the three20 thumbs viewer.
When running in debug, my TTThumbsViewController works completely normally, however if I switch to release mode (ad-hoc and on the live app store version), I get some pretty weird graphical glitches.
For example, the loading view of the thumb controller:
http://img.skitch.com/20120125-kugx5diqbs8sttnxatrppf4rjg.jpg
And then all my thumbnails get squashed:
http://img.skitch.com/20120125-mi3mpkr1j1s9f79fdf9r3krjhs.jpg
I'm running the latest (master) version of three20, and have only made one slight modification to the source, to stop the header bar appearing at the top of the gallery view.
I added the following method to TTTableViewDelegate.m:
- (float)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 0; // disable headers in TTTableViews - prevents header on thumbs view in iOS 5
}
In conclusion:
Can anyone repro (with release)?
What can I do?
Would that modification I made be causing these issues (bear in mind it only happens with the release build)?
If anyone has any ideas that would be great as this is currently live on the app store (I know I'm an idiot for not testing with release - this should teach me).
The problem is with the LLVM compiler bundled with Xcode 4.2 when compiling for armv6 devices on iOS 4.2.1.
The problem and solution are described here:
Strange layout issue on 3GS device with iOS 4.2.1 - Compiled with iOS 5
You need to add the -mno-thumb flag to your compiler flags for armv6 i.e.
Method with setting -mno-thumb in MY PROJECT SETTINGS didn't worked for me, But this is exactly issue of the
LLVM compiler bundled with Xcode 4.2 when compiling for armv6 devices
Fast way to do this is to update little Three20's Library.xconfig, which is located in
Three20/src/Configurations/common folder
Find the line for linker flags configuration, and add line with -mno-thumb to it.
// Linker Flags
OTHER_LDFLAGS = $(OBJC_LIBRARY)
// We needed this to resolve horrible bug
// When your'e setting value on origin.x and it is applied to origin.y
OTHER_CFLAGS[arch=armv6] = -mno-thumb
Profit.

Using Phonegap Barcode Scanner on Iphone

I'm trying to add a barcode scanner to a JQM phonegap project for iOS. I have followed the instructions listed, although I'm not 100% sure if I did the first and last steps correctly.
Copy the .h, .cpp and .mm files to the Plugins directory in your
project. You may need to set the compile options for
zxing-all-in-one.cc to turn off optimization.
I directly copied the three files into the plugins folder in xcode. It isn't giving me any errors, but it also isn't working. I have no idea how to do compiler options in xcode, so I haven't done the last step.
Currently my app still runs with no errors and running the scan function opens the camera with the ui for the barcode scanner up. The problem is that it doesn't seem to be either looking for or finding barcodes, it just stays up and does nothing (until you hit cancel, then it displays the cancelled message correctly).
Anyone have any ideas what's wrong or where I should look?
If the camera is turned on and the UI for scanning appears on the screen, then it means you've done everything right. The problem seems to be that the scanner doesn't detect the barcodes.
Be aware that recognizing 1D barcodes ("classical" barcodes) with zxing require an iPhone with autofocus lens (iPhone 4 or iPhone 4S). 1D barcodes are a little tricky to detect with mobile phone lenses, you need proper light and focus ; that's one reason why 2D codes like QR code where invented.
Try generating a QR code with http://zxing.appspot.com/generator/, display it on the screen and try scanning it with your app. If it works then good news, everything is OK, but bad news, your phone is not fit for 1D barcode scanning.
Another explanation for this behaviour are compiler flags. As mentioned on BarcodeScanner wiki, you may need to set the compile options for zxing-all-in-one.cc to turn off optimization.
In XCode4, click on your project, then select your target under Targets, go to Build Phases->Compile Sources, select zxing-all-in-one.cc and enter -O0 (that's dash oh naught) into the Compiler flags column.
That solved it for me.

IPhone simulator vs. Device issue (open GL)

I am developing an iPhone application using openGl ES 2.0, and after a lot of testing in the simulator I installed the application on my iPhone(3GS) to see how well it preformed. When the app launched it started up fine with no errors, but nothing showed up, however the background was the appropriate color.
Does anybody have any ideas/pointers about what might be causing this issue? If code/details would help just let me know what section of code you would like to see.
Check the constraints on various functions you may use. For example, by default the width and height for glTexImage2D must each be powers of 2 (or powers of 2 plus 2, if you are using a border). There is an extension that allows for non-power-of-two textures, but in my experience this extension is not present or is not completely implemented on at least some devices (i.e. it works for GL_CLAMP_TO_EDGE but not GL_REPEAT).
The Device is strict about case-sensitivity in filenames -- check to make sure that if you are loading Shaders, that the filenames referenced in your code are identical to their actual filesystem names.
Also, if you are in xCode 4, go to your Target Build Phases settings and make sure all of the shaders you use are in Copy Bundle Resources.
Finally, if the shaders appear in 'Compile Sources', you should remove them from there. You'll need to Clean your project and then re-build.

Problem displaying font texture (SDL Xcode 4 project)

The below project of mine works fine with OpenGL on Windows and the Mac but will not work on the iPhone simulator or physical device.
The below link is to an Xcode 4 project containing the usual SDL examples plus an extra one called Rectangles2. I can't get my font characters to appear on the screen - I just keep getting a white rectangle.
Can somebody please have a look and tell me what is wrong with my project?
Please don't be critical of how its coded - I would just like to know what I'm missing to make it work.
Xcode Project
Thanks
I've just been told the problem was my parameter to the glTexImage2D function. The code I borrowed uses some literal values 3 and 4 whatever they are. Anyway, changing these to GL_RGBA has solved my problem.. so I'll have to go and read up on what this function actually does and how it works etc.