Skip to main content

Posts

Showing posts with the label xcode

iOS Multi-Tasking Track GPS Location

I was just wondering if it was possible to make an iOS app that would track your location via GPS while it was in the background. I tried this with the built-in app "Maps", but to no avail. If this is possible, it would be great if you could refer me to some sample code, documentations, or tutorials! (if this is a duplicate, please let me know and I will remove it) Source: Tips4all

Program received signal: “0”. Data Formatters temporarily unavailable

I'm working on an iPad app that downloads a CSV file from the web and parses the file into a NSMutableArray. (I'm using the code from http://www.macresearch.org/cocoa-scientists-part-xxvi-parsing-csv-data suggested in another post). When I run in the simulator, everything works perfectly, but when I run on the device, I get the following error: Program received signal: “0”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib") (gdb) Does anyone know why this would pop up? Google isn't helping me here... :( Thanks!

Asihttprequest 61 errors [closed]

it should be a simple problem. im using the ASIhttprequest in many project but sins 1 week each new project i'm trying to add the ASIhttprequest classes i got the following 61 error before using classes just when i'm trying to import them. Build finjan of project finjan with configuration Debug Ld build/Debug-iphonesimulator/finjan.app/finjan normal i386 cd /Users/Apple/Desktop/application/finjan setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk -L/Users/Apple/Desktop/application/finjan/build/Debug-iphonesimulator -F/Users/Apple/Desktop/application/finjan/build/Debug-iphonesimulator -filelist /Users/Apple/Desktop/application/finjan/build/finjan.build/Debug-iphonesimulator/finj

iPhone: Create a reusable component (control) that has some Interface Builder pieces and some code

I want to create a reusable component (a custom control) for the iPhone. It consists of several standard controls prearranged on a View, and then some associated code. My goals are: I want to be able to use Interface Builder to lay out the subviews in my custom control; I want to somehow package the whole thing up so that I can then fairly easily drag and drop the resulting custom component into other Views, without having to manually rewire a bunch of outlets and so on. (A little manual rewiring is fine, I just don't want to do tons and tons of it.) Let me be more concrete, and tell you specifically what my control is supposed to do. In my app, I sometimes need to hit a web service to validate data that the user has entered. While waiting for a reply from the web service, I want to display a spinner (an activity indicator). If the web services replies with a success code, I want to display a "success" checkmark. If the web service replies with an error code,

Linker Error in Xcode 4.2 Developer Preview

d /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator/Goozzy.app/Goozzy normal i386 cd /Users/yariksmirnov/Desktop/Goozy/branches/new setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator -F/Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator -filelist /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Intermediates/Goozzy.build/Debug-iphonesimulator/Goozzy.build/O

Where is set the active build configuration in Xcode 4

I have 3 configurations in my project (Debug, Distribution_AdHoc and Distribution_AppStore). In Xcode 3 we had a list to choose device, version, configuration and target before build and run. Now with Xcode 4 we only have the device kind and version in this list. This bring my two questions: So where is defined the configuration used ? Is that the configuration defined in "Project > Info > Command-line builds use: Debug" ? And now the "Project" menu is replaced by "Product" So where can we create (or duplicate and edit) a Configuration ? Thank you.

Bundle Name, Executable Name, Product Name…anything else?

Bundle Name, Executable Name, Product Name... any more?? can someone please help clarify the use of each of these in Xcode on an iPhone project? They never fail to confuse the living bajezus out of me...and Im tired of getting them wrong. Someone please explain... why the hell do we need this many different naming schemes for one app environment? and what do I use each of these for so I can stick them in the right cubby hole in my head?

How to use MallocStackLogging on the device?

I've a memory issue in an iPhone app that I'd like to debug with MallocStackLogging . The error involves the gyroscope so I have to debug on the device not the simulator. I've set the MallocStackLogging environment variable and the iPhone properly records the mallock stack logs: MyApp(1856) malloc: recording malloc stacks to disk using standard recorder MyApp(1856) malloc: stack logs being written into /private/var/mobile/Applications/1FD1F8D2-5D30-4AA7-B426-C52FE20266DE/tmp/stack-logs.1856.MyApp.index MyApp(1856) malloc: Please issue: cp /private/var/mobile/Applications/1FD1F8D2-5D30-4AA7- B426-C52FE20266DE/tmp/stack-logs.1856.MyApp.e8z3IL.link /tmp/ Now how can I work with them? I can transfer them to the Mac using the Xcode Organizer. But what should I do with these two files? stack-logs.1856.MyApp.index stack-logs.1856.MyApp.e8z3IL.link I tried moving the files in /tmp on the Mac and called: $ malloc_history 1856 -all_events malloc_history cannot exa

Issue with iphone sdk 4.2.1

Probably a silly question. When running my project on the Device in the debug mode I get a lot of warnings al having the following string: warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)/Symbols/System/Library/PrivateFrameworks/ I think its due to the space between "4.2.1" and "(8C148a)". How can i get rid of it? It must be a setting somewhere in Xcode. I dont have these warnings on the simulator. thanks in advance, Christian

Adding box2d header causes a torrent of compiler errors

I am experiencing either an extremely weird error or a temporary loss of brain function. I have a box2d / cocos project running in XCode. This all works fine but my code is currently a proof of concept "hack". Stage one of cleaning up the code is creating classes for various objects. Now, if I create a brand new Objective C class (inherited off NSObject) as below it all compiles fine. As soon as I attempt to import the "Box2D.h" I receive a gazillion errors originating from the box2d library saying it cannot be built. 201 to be precise and it indicates no issues with the class itself. Can anyone shed any light? I have already tried a clean and rebuild as well as restarting XCode. My super complicated class definition #import "Box2D.h" @interface test : NSObject @end An example compiler error thrown Expected '=', ',', ';', 'asm' or '__attribute__' before 'b2Fixture' in /Users/..../libs/Box2D/Dynamics

UIBezierpath Shadow effect - iOs

Currently i am working on a paint app for iPhone and iPad.I am stuck with applying shadow effect to a paticular drawn path. I have use UIBezierpath to draw paths. Is there any way to apply shadow effect on UIBezierpath ? Thanks in Advance

xcode 4.2.1 - limiting character length in TextField

I have been trying to limit a textField by many codes available out there in the internet but with no luck. I have added UIViewController<UITextFieldDelegate> in my header file and textField.delegate = self; in my viewDidLoad and implemented the following fundtion in my .m file: - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:string]; return !([newString length] > 5); } this stil does not limit my text field. any idea?

Core Data - how to generate CoreDataGeneratedAccessors?

I've gone through apple dev website, google and stack overflow to figure out the basics behind CoreDataGeneratedAccessors. I'm using Xcode 4.2 and core data. I created entities and their relationships properly including inverse. Following code is failing: self.remdetail = [NSEntityDescription insertNewObjectForEntityForName:@"RemDetail" inManagedObjectContext:context]; [rem addRemDetailObject:remdetail]; --> I'm trying to add rem detail to rem object because there are no accessor methods generated automatically, I put the following code manually in one of the NSManagedObject subclass. The following code was not generated when i created NSManagedObjects for my entities. I tried to generate accessors automatically by going through few articles and suggestions like Xcode copy & paste etc but nothing is generating the following code. in rem ManagedObject --> @interface Rem (CoreDataGeneratedAccessors) - (void)addRemDetailObject:(RemDetail *)va