iphone

Add relationship between entity and property of another entity in coredata

Hi all, I have an entity with an attribute of type "string". I actually want it to be an array. So I created an another entity "array" and I want to add a many-one relationship between string and the array. So my question is: Is it possible to add a relationship between an entity and an attribute of another entity? Thanx in advance. ...

Draw shadow beyond c lipped region on Iphone

In a UIView, is it possible to draw a drop shadow beyond a clip path? I tried to use CGContextSetShadow() before clipping and it doesn't work. ...

max size to still fit 20MB Appstore limitation?

Hi, on some telecomunication services like AT&T or Telecom there is a 20MB download limitation for gprs/umts - so if an app is over 20mb you need WiFi to download the app. Is there a known maxsize for the zipped app file to still fit this 20MB limitation ? After I zipped my .app file my finder say its 19,9MB (19.922.768 Bytes) - I h...

Custom routing with Three20 TTURLMap

Hello, I would like to have different routing rule for my application: * standard URL (http/https) * custom URL : myApp://user * custom URL 2 : myApp://message In each case, I need to call a different controller. For the moment, I added a TTURL Map in the Delegate of my application: [map from:@"http://*" toViewController:[BrowserContr...

Is it possible to use Google Analytics in an iPad application?

Hi, I've followed the steps at How To Integrate Google Analytics Tracking Into Your Apps In 7 Minutes http://icodeblog.com/2010/04/22/how-to-integrate-google-analytics-tracking-into-your-apps-in-7-minutes/ successfully for an iPhone application, but recently have tried for an iPad app and I am not seeing any stats come through after a...

With obj-c on the iPhone, is there any harm in autoreleasing everything instead of releasing?

Hi all, With obj-c on the iPhone, is there any harm in autoreleasing everything instead of releasing? Eg, this code: NSString *recipe = [[NSString alloc] initWithUTF8String:sqlite3_column_text(dbps,0)]; [arr addObject:recipe]; [recipe release]; Can be shortened to two lines by autoreleasing the recipe nsstring when i create it: NSS...

Calculating times based on generic days of the week using NSDate

I'm trying to figure out how to calculate store opening times based on the way they are normally expressed. For example: Monday - Friday, 9am - 6pm. I want to know two things from this criteria. Is the store open? If it is how long will it be before it closes? My confusion with the documentation is that NSDate calculations expect uniqu...

iOS4 and audio playback during backgrounding

Hi All, When my app is backgrounded, the audioplayer continues to play, but i cant hear any sound. When i open my app again, it plays from the point where it would have been had the app not been backgrounded at all. This shows that the app is playing in the background though it is not audible. Why could this be happening? I have set th...

Decrease iPhone App Size

hi, I want to decrease my iPhone app size. Any suggestions? Taimur ...

Does apple view the actual source code when approving apps?

How exactly does apple approve apps? Is the actual source code viewed? ...

receiveData not called corresponding to all sendData mthod

I am developing a chat application using bluetooth.Initially i was sending text only and was receiving it correctly. NSData *mydata=[str dataUsingEncoding:NSUTF8StringEncoding]; [self sendPacket:mydata ofType:0]; -(void) sendPacket:(NSData*)data ofType:(PacketType)type { NSMutableData * newPacket = [NSMutableData dataWithCapacity:([d...

SetNeedsDisplayInRect not taking effect immediately

When I call setNeedsDisplayInRect:, why isn't my drawRect:inContext method being called soon after? If I zoom into the unpainted area, then zoom out (I guess triggering a repaint) the image will be drawn. But if I leave it sitting there, no dice. Is there a way to force a repaint immediately? Just in case it matters, I'm really using Ma...

Download content of app at download of application

Hi all, My problem is that my application size is very high. so i want that user download application and when required content then content is downloaded in user iphone memory. and if one time downloaded content then user never required to download content again and again. is it possible? please tell me if any reference. Thanks, Ar...

How to handle multiple properties on iPhone's addressbook?

The problem is that I always get runtime crashes at any method invoked at phones variable. At this version I get an error at 1 (ABMultiValueCopyValueAtIndex). If I'll comment this line, the code crashes at 2 (ABMultiValueGetCount). It looks like the property was empty. If I NSLog the phones variable. I get (null). I test the code on iPho...

How attach code to a running iphone app.

Hi, I am trying to fix a random hang in my iphone app. I could not regenerate the hang from launching it from the xcode. Is their any way to attach xcode debugger, as soon as I detect the hang? (I can attach it to 'instruments') but it did not much help. ...

iPhone, AVAudioPlayer and multiplesounds

Hi to all,im new developer and making my firt iPhone app ,and i want to make button to on/off multiplesounds , example when i press button for multiple sounds after when i play sounds it plays all sound at same time and if its off can play only one sounds, what code is to make ON/OFF multiple sounds play? sorry for my bad english, Tank...

When converting a NSString to a char* using UTF8String, how to retain it?

When converting a NSString to a char* using UTF8String, how to retain it? According to the following link, when you use UTF8String the returned char* is pretty much autoreleased, so it won't last beyond the current function: http://developer.apple.com/mac/library/documentation/cocoa/reference/Foundation/Classes/NSString_Class/Referen...

Using Sqlite in iphone development: if i open the database in the init function, it's inaccessible in my other functions. Any ideas?

Hi, I'm trying to use sqlite in a 'data services' class like below. I keep getting an error code 1 when calling 'sqlite3_prepare_v2'. The logs certainly back up that the database is getting opened before my recipeNames function is called. I'm so stumped! Is it a memory management thing with the sqlite3 *db ? Eg is it getting freed when i...

Array doesn't persist outside viewDidLoad

Hi all, I'm facing a strange problem with NSUsrDefaults. Whenever I'm fetching the data from NSUserDefaults, it's getting populated temporarily. I'm fetching it into viewDidLoad where it's fetched. -(void)viewDidLoad{ companies = [NSMutableArray array]; oldCompanies = [[NSUserDefaults standardUserDefaults] arrayForKey:@"companyData"];...

CoreAnimation and MultiTaksing

When my application goes into the background state and reappears, all CoreAnimations are stopped. In my case the animation in the view was endless, so I would like to restart it when the user resturns. How can I do this? Do I have to listen to applicationDidBecomeActive in every view/layer that has such an animation? That doesn't sound...