Search Results

Search found 7500 results on 300 pages for 'mojo sdk'.

Page 17/300 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • iPhone SDK: Bonjour & NSNetService name != published name?

    - by Harkonian
    In my iPhone app, I'm publishing a bonjour service and using the following delegate method: - (void)netServiceDidPublish:(NSNetService *)ns { NSLog(@"Bonjour Service Published: http://%@.%@", [ns name], [ns domain]); } The "name" property is returning the device name, "How's Testing", which is correct. However, when I use Safari to discover available services the name is "hows-testing" -- the service is http://hows-testing.local.:. Why is the published name different than what is being reported by the NSNetService? How do I display for the actual name of the published service? Assuming that, for some reason, there is no way to get the published name from the object, how do I determine it myself? I understand that it's based on device name, but what are the substitution rules? Remove apostrophes, replace spaces with dash...anything else? What about special characters?

    Read the article

  • New App provisioning in iPhone SDK 4 Beta

    - by Vinod
    The enterprise distribution in iPhone 4 beta is supposed to be easier. Companies can host their own servers with the apps instead of distributing through iTunes. I am looking for technical information on how to do this. Can someone refer to the documentation/online details regarding this? Thank much.

    Read the article

  • accessing parsed JSON on the iPhone SDK

    - by itai alter
    Hello All! I've been following the great tutorial about (iPhone, json and Flickr API and I did manage to access the parsed json info just fine. Now I'm trying to do the same thing with the Twitter API, and I am able to get the json info and parse it, but I can't seem to access it like in Flickr. I noticed that the json info that is retrieved from Twitter is a little different from Flickr. The Flickr json info starts straight with a curly braces ({), while the Twitter json info starts with a square bracket and then a curly braces ([{). I understand that it means it's an array inside the json info, but I don't know how to access it. In the Flickr example, I access the objects like so (the second line takes the number of pages Flickr has reported): NSDictionary *results = [jsonString JSONValue]; pagesString = [[results objectForKey:@"photos"] objectForKey:@"pages"]; but I can't seem to access the Twitter response in the same way... Does anyone know of a solution? (here's an example of the Twitter JSON response: api.twitter.com/1/statuses/public_timeline.json ) Thanks a bunch!

    Read the article

  • Loading 2 Singletons With Dependencies when an app is opened (appDelegate / appDidBecomeActive) iPhone SDK

    - by taber
    I'm trying to load two standard-issue style singletons: http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html when my iPhone app is loaded. Here's my code: - (void) applicationDidFinishLaunching:(UIApplication *)application { // first, restore user prefs [AppState loadState]; // then, initialize the camera [[CameraModule sharedCameraModule] initCamera]; } My "camera module" has code that checks a property of the AppState singleton. But I think what's happening is a race condition where the camera module singleton is trying to access the AppState property while it's in the middle of being initialized (so the property is nil, and it's re-initializing AppState). I'd really like to keep these separate, instead of just throwing one (or both) into the App Delegate. Has anyone else seen something like this? What kind of workaround did you use, or what would you suggest? Thanks in advance! Here's the loadState method: + (void)loadState { @synchronized([AppState class]) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *file = [documentsDirectory stringByAppendingPathComponent:@"prefs.archive"]; Boolean saveFileExists = [[NSFileManager defaultManager] fileExistsAtPath:file]; if(saveFileExists) { sharedAppState = [[NSKeyedUnarchiver unarchiveObjectWithFile:file] retain]; } else { [AppState sharedAppState]; } } }

    Read the article

  • Is it possible to accept a button tag to be in some range iphone sdk

    - by neha
    Hi all, In my application I'm doing dynamic resizing of cells and label in it depending upon the text in it. I'm adding button to cells in uitableview. I'm taking the label instance and button instance in a new label and button variable respectively and setting their frames to arrange them properly after resizing. if(cel==nil) { //some code original_label=[[UILabel alloc]init]; original_label.tag=111; //SOME MORE CODE GOES HERE original_button=[[UIButton alloc]init]; original_button.tag=222; //SOME MORE CODE GOES HERE } new_label=(UILabel *) [cell viewWithTag:111]; //This' how I'm taking the label instance on cell and below button instance on cell in new variables new_button = (UIButton * ) [cell viewWithTag:222]; Earlier I kept the tags of all the buttons on cells same, so it was easier to get button instances on cells properly and were being arranged properly. But now I want to recognize these buttons separately as I'm adding some functionality on button_click. I'm giving the buttons that are added to the cells incremental tags[1,2,3...9 and so on]. Now, how can I take these button tags in some range like[suppose 1-9]? Can anybody help? Thanks in advance.

    Read the article

  • "The item you tried to buy is no longer available" storekit error in iphone sdk

    - by aloo
    Hi all, I'm trying to use the StoreKit API in OS3.0 for the iphone to do in app purchase. However, I'm getting the following error when trying to purchase something in the SANDBOX ENVIRONMENT. The item you tried to buy is no longer available [Environment: Sandbox] Here's the code I use to do the payments: SKPayment* payment = [SKPayment paymentWithProductIdentifier:model.productId]; [[SKPaymentQueue defaultQueue] addPayment:payment]; I've also queried storekit for the list of available products and that seems to work just fine returning the same product identifiers that I'm now using to purchase the item. I have all the products setup in iTunes Connect and created a test user. Before debugging the app I signed out of the store in the settings menu and entered my test account and password when debugging my own app. What could be going on here?

    Read the article

  • IPhone SDK help with minigame

    - by Harry
    right basically what ive got is an app which is a ball and bat and its how many bounces you can achieve, it works alright but there is one problem, when the ball hits the side of the bat it throws it off course and its like the frame of the ball is bouncing in the frame of the bat, Here is my code in my mainview.m #import "MainView.h" #define kGameStateRunning 1 @implementation MainView @synthesize paddle, ball; - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; CGPoint location = [touch locationInView:touch.view]; CGPoint xLocation = CGPointMake(location.x,paddle.center.y); paddle.center = xLocation; } -(IBAction) play { pos = CGPointMake(14.0,7.0); [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(onTimer) userInfo:nil repeats:YES]; } -(void) onTimer { ball.center = CGPointMake(ball.center.x+pos.x,ball.center.y+pos.y); if(ball.center.x > 320 || ball.center.x < 0) pos.x = -pos.x; if(ball.center.y > 460 || ball.center.y < 0) pos.y = -pos.y; [self checkCollision]; } -(void) checkCollision { if(CGRectIntersectsRect(ball.frame,paddle.frame)) { pos.y = -pos.y; } } @end can anyone work out the problem here? Thanks Harry

    Read the article

  • iPhone sdk can't get Mobclix to work

    - by Matt S.
    I followed the guide here, and when I build my application the ad (or anything for that matter) doesn't show up. Nothing, nada. I followed the guide very carefully. I know that it is trying to retrieve an ad (thanks to little snitch), but it doesn't display. Has anybody experienced this and do you know of a fix?

    Read the article

  • Iphone sdk - please help , 1 view takes me 45 minutes to do :(

    - by Dave
    Hey, I've been working on a Cook Book App but each view ( or recipie page) takes about 45 minutes to complete so as you can imagine its taking forever. The problem is that I have to manually: Set up a gradient image for the back ground (Somtimes I have to add a few image backgrounds to fit the view as I often use a scroll view, not sure how this could be automated?) Put an image behind the titles "Recipe name" , "Time needed" and an image to go behind the recipie instructions ( again I might need a few of these depending on how long the description is. Creating view controllers for main sections such as "Breakfast" and "Lunch" and then I need to manually create view controllers to go in these sections. Theres got to be a way to set up a template for this? Thanks for reading all of this.

    Read the article

  • view Large PDF file in iPhone SDK

    - by aRrAY
    I have followed some tutorial that teach me how to view PDF file in UIWebView, however I found that if the file size is large, it will be lag when I zoom the PDF, but it doesn't occur in Mobile Safari. So anyone know how to solve it?

    Read the article

  • Emulate disk IO speeds in Android SDK

    - by Ben L.
    I don't have a physical Android device to work with, so all I can use is the emulator. I'm wondering if there's something I could use to make the IO speeds more realistic - How do I slow down disk access to the speed it would be on a physical device? Also, this may be unrelated, but when I change the speed and latency options in Eclipse ADT DDMS view, I don't notice any change in internet speed on the emulator. Is this a bug?

    Read the article

  • Weird ViewControllers - iPhone SDK

    - by Kevin
    Hello everyone, I have a Tab-Bar Application for this iPhone application I am making. I make a simple button on the 3rd view (3rd tab), and give it an IBAction to give an alert view. When I press build and go, everything works out fine. I go onto the 3rd tab, and I press my button. It simply crashes... Why is this happening? Everything I put in this 3rd tab crashes. I create a simple view controller, and write the class files to start over, but I keep getting the same errors.. Everything works fine on my first tab, where I originally got the first view controller.. P.S It also says Incomplete Implementation of Class 'ThirdViewController'. I don't know why its there.. If anyone can help me out here, i would greatly appreciate it. Kevin

    Read the article

  • iPhone SDK Nested For Loop performance

    - by Skeep
    Hi All, I have a NSArray of string id and a NSDictionary of NSDictionary objects. I am currently looping through the string id array to match the id value in the NSDictionary. There are around 200 NSDictionary objects and only 5 or so string ID. My current code is such: for (NSString *Str in aArr) { for (NSDictionary *a in apArr) { if ([a objectForKey:@"id"] == Str) { NSLog(@"Found!"); } } } The performance of the above code is really slow and I was wondering if there is a better way to do this?

    Read the article

  • iPhone SDK Objective-C __DATE__ (compile date) can't be converted to an NSDate

    - by Janice
    //NSString *compileDate = [NSString stringWithFormat:@"%s", __DATE__]; NSString *compileDate = [NSString stringWithUTF8String:__DATE__]; NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease]; [df setDateFormat:@"MMM d yyyy"]; //[df setDateFormat:@"MMM dd yyyy"]; NSDate *aDate = [df dateFromString:compileDate]; Ok, I give up. Why would aDate sometimes return as nil? Should it matter if I use the commented-out lines... or their matching replacement lines?

    Read the article

  • Detect same images name {iPhone SDK}

    - by Momeks
    hi , i want create image animation , i have 50 images with png format now i want set images name ... something like this but doesnt work ! my images name are : iamge_0000 to image_0050 NSArray *myImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"image_%d.png"], //image named doesnt work ??!?!?!?

    Read the article

  • Creating a standard card game (iPhone SDK)

    - by Chris
    I am trying to create a card game with a standard deck of cards. I need to be able to create a new card on screen every time someone draws a card from the deck and then be able to continuously move it throughout gameplay. I have image files for every card available in the game. I have tried creating a card object which held a UIImageView for the card along with some other basic data but I had trouble referring back to that card to move it again after the first touch. Was this the right way to do this?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >