Search Results

Search found 11296 results on 452 pages for 'facebook sdk 3 0'.

Page 98/452 | < Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >

  • Can a telephony.Phone object be instantiated through the sdk?

    - by Tyler
    I am trying to get a phone object so that I can call and conference two numbers from within my application. I have tried using the static PhoneFactory.makeDefaultPhones((Context)this) but have not had any luck. String phoneFactoryName = "com.android.internal.telephony.PhoneFactory"; String phoneName = "com.android.internal.telephony.Phone"; Class phoneFactoryClass = Class.forName(phoneFactoryName); Class phoneClass = Class.forName(phoneName); Method getDefaultPhone = phoneFactoryClass.getMethod("getDefaultPhone"); Object phoneObject = getDefaultPhone.invoke(null); Error - Caused by java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from Looper thread

    Read the article

  • How to set selected segment index in UISegmentedControl? (iPhone SDK)

    - by seanny94
    Hello all! I'm trying to avoid an app crash here... I have a button that will remove a segment from a UISegmentedControl. If that button is pressed and the user has the segment to be removed selected, the segment will remove and no selection will be highlighted. However, when another button is pushed that does an action that retrieves the selectedSegmentIndex, the app crashes. In short: Is there any way to force the selection of a segment in a UISegmentedControl? edit it seems as though the UISegmentedControl is returning a selectedSegmentIndex of -1 when no segment is selected... let's see what I can do from here.

    Read the article

  • iPhone SDK: How to centre content in a UIScrollView during setZoomScale?

    - by Russell Quinn
    I'm using a UIScrollView to show photos. If they are zoomed out so they are smaller than the scroll view in one dimension then the content is centred using contentInset and contentOffset. This all works fine for scrolling and manual zooming. However, if I use setZoomScale (with animated YES) then when zooming out the scroll view sets the top left edge to 0,0 during the animation and then snaps it back afterwards. It seems like the zoom animation ignores the contentInset and contentOffset settings. Does anyone have any idea how to overcome this problem? Thanks, Russell.

    Read the article

  • iPhone SDK: How to add an image to a UIBarButton?

    - by iPhone Developer
    I have used the code below to create a button on the nav bar with an image. I can see the image but I can also see the border of the button around it. My question is, how can I get rid of the button border. All I want to see is the image on the nav bar, no border. UIBarButtonItem *settingsBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_prefs.png"] style:UIBarButtonItemStylePlain target:self action:@selector(openSettings:)]; [[self navigationItem] setLeftBarButtonItem:settingsBtn]; [settingsBtn release]; Thanks in advance. Any pointers, links to read further or examples appreciated.

    Read the article

  • Microsoft Visual Studio SDK DSL Tools - Any serious takers?

    - by amazedsaint
    We are considering Microsoft DSL toolkit for creating some abstract designers. I already did some POCs, but would like to get some opinions on the same. Any one here to share their experiences working with Microsoft DSL Toolkit and T4? Also, any pointers to open source DSL projects will help - Eg. Microsoft Service Factory modeling edition is heavily relying on DSL toolkit. As OSLO/Quadrant will take some time to get released, I think the only option we have is to rely on Microsoft DSL designer. (See Kieth's blog on the same) Also, here is some information I already have on DSL: 1 - A Nice Lab in MSDN on DSL tools 2 - A List of Projects in Codeplex using DSL toolkit

    Read the article

  • iphone sdk - Itunes connect how to change device requirements?

    - by Dave
    What is it im supposed to set in the plist so that it shows that it does not work on the ipad on itunes? its somthing to do with this http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedFeatures/AdvancedFeatures.html but I dont see anything that seems appropriate? Im still kind of noobish so I'd appreciate a really simple answer or as simple as possible. Thanks for your time

    Read the article

  • How to solve a deallocated connection in iPhone SDK 3.1.3? - Streams - CFSockets

    - by Christian
    Hi everyone, Debugging my implementation I found a memory leak issue. I know where is the issue, I tried to solve it but sadly without success. I will try to explain you, maybe someone of you can help with this. First I have two classes involved in the issue, the publish class (where publishing the service and socket configuration is done) and the connection (where the socket binding and the streams configuration is done). The main issue is in the connection via native socket. In the 'publish' class the "server" accepts a connection with a callback. The callback has the native-socket information. Then, a connection with native-socket information is created. Next, the socket binding and the streams configuration is done. When those actions are successful the instance of the connection is saved in a mutable array. Thus, the connection is established. static void AcceptCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { Publish *rePoint = (Publish *)info; if ( type != kCFSocketAcceptCallBack) { return; } CFSocketNativeHandle nativeSocketHandle = *((CFSocketNativeHandle *)data); NSLog(@"The AcceptCallback was called, a connection request arrived to the server"); [rePoint handleNewNativeSocket:nativeSocketHandle]; } - (void)handleNewNativeSocket:(CFSocketNativeHandle)nativeSocketHandle{ Connection *connection = [[[Connection alloc] initWithNativeSocketHandle:nativeSocketHandle] autorelease]; // Create the connection if (connection == nil) { close(nativeSocketHandle); return; } NSLog(@"The connection from the server was created now try to connect"); if ( ! [connection connect]) { [connection close]; return; } [clients addObject:connection]; //save the connection trying to avoid the deallocation } The next step is receive the information from the client, thus a read-stream callback is triggered with the information of the established connection. But when the callback-handler tries to use this connection the error occurs, it says that such connection is deallocated. The issue here is that I don't know where/when the connection is deallocated and how to know it. I am using the debugger, but after some trials, I don't see more info. void myReadStreamCallBack (CFReadStreamRef stream, CFStreamEventType eventType, void *info) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; Connection *handlerEv = [[(Connection *)info retain] autorelease]; // The error -[Connection retain]: message sent to deallocated instance 0x1f5ef0 (Where 0x1f5ef0 is the reference to the established connection) [handlerEv readStreamHandleEvent:stream andEvent:eventType]; [pool drain]; } void myWriteStreamCallBack (CFWriteStreamRef stream, CFStreamEventType eventType, void *info){ NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init]; Connection *handlerEv = [[(Connection *)info retain] autorelease]; //Sometimes the error also happens here, I tried without the pool, but it doesn't help neither. [handlerEv writeStreamHandleEvent:eventType]; [p drain]; } Something strange is that when I run the debugger(with breakpoints) everything goes well, the connection is not deallocated and the callbacks work fine and the server is able to receive the message. I will appreciate any hint!

    Read the article

  • Facebook Connect for iPhone: How to upload an image (UIImage) to user's wall without having to use j

    - by Crowem
    Is there any way to upload an image (UIImage) directly from an iPhone app to a user's wall/feed? All the samples I see are either using a json-embedded link or they use the photos.upload call with album ID (aid) which results in the user getting the image in his photo album(s). What I want to do is to upload an (UI)Image created (by the user) inside an iPhone app and upload to his/her wall. Is this possible? Sample code would be highly appreciated.

    Read the article

  • iPhone SDK Core Data: Fetch all entities with a nil relationship?

    - by Harkonian
    I have a core data project that has Books and Authors. In the data model Authors has a to-many relationship to Books and Books has a 1-1 relationship with Authors. I'm trying to pull all Books that do not have an Author. No matter how I try it, no results are returned. In my predicate I've also tried = NIL, == nil, == NIL. Any suggestions would be appreciated. // fetch all books without authors - (NSMutableArray *)fetchOrphanedBooks { NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Book" inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; [fetchRequest setFetchBatchSize:20]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"author = nil"]; [fetchRequest setPredicate:predicate]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; NSString *sectionKey = @"name";//nil; NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:sectionKey cacheName:nil]; BOOL success = [aFetchedResultsController performFetch:nil]; NSMutableArray *orphans = nil; // this is always 0 NSLog(@"Orphans found: %i", aFetchedResultsController.fetchedObjects.count); if (aFetchedResultsController.fetchedObjects.count > 0) { orphans = [[NSMutableArray alloc] init]; for (Note *note in aFetchedResultsController.fetchedObjects) { if (note.subject == nil) { [orphans addObject:note]; } } } [aFetchedResultsController release]; [fetchRequest release]; [sortDescriptor release]; [sortDescriptors release]; return [orphans autorelease]; }

    Read the article

  • How build a custom control in Xcode for the iPhone SDK?

    - by mamcx
    I want to build a custom control to reuse in my project which consists of two UITextFields that are linked together + a label. It is starting to become repetitive across my App and smells of code duplication ;) However, I wonder what is the best aproach here. Is it best do everything by code in a controller or is posible do a visual thing like the ones built-in in Xcode?

    Read the article

  • iPhone SDK / Core Data usage scenario, similar to GAE data store?

    - by boliva
    Hi all, I am currently rewriting a map based App which I wrote in the past, specifically for 2.2.1 devices. Originally I wrote it to make use of SQLite databases but I would like to try and migrate it over Core Data, now that it's available on 3.X (for which I am rewriting to). I am fairly experienced in iPhone/Obj-C development, SQL and server backend technologies, but I have never had the chance to work with Core Data so IDK really if it's the appropiate tool for what I am trying to accomplish. The App works on a limited area in a map over which there are about 4000 placemarks, with different kinds of icons and sizes. Of course not all 4000 placemarks are shown at once but only those currently visible in the map viewport, and depending on the zoom level. What I am doing right now is, after the user moves the map in any way (panning or zooming) I am requesting from the backend server the required information for the placemarks that would be visible given the viewport coordinates boundaries and zoom level, however the process isn't as smooth as I'd like (the backend is sending its response in XML and I am compressing it using gzip), it takes anywhere from 1 to 3 seconds to update the display of the placemarks after the user ends moving the map. What I would like to do is to prefetch all the placemarks data at the App launch and use it all through the app life time - I don't mind storing it for later use because the data should be dynamic. The way I would do it right now is, after retrieving all the data, to store it on an SQLite db which I would query later, whenever the user moves the map, to return only the placemarks inside the viewport coordinate boundaries and specific to a given zoom level. Now, the question itself is, if is it possible to use some more 'native', object driven way to carry this queries process, which got me thinking about Core Data and if it is in any way similar to what Google App Engine offers through its datastore where you can fetch a number of objects from the backend given a certain query or criteria, without resorting to an SQL query itself. Like I said before I don't have any experience on Core Data but I have a pretty deep understanding of Obj-C and iPhone development, as well as SQL databases. Any guides on how to achieve what I'm trying (if possible at all) would be greatly appreciated.

    Read the article

  • iphone s/w version 3.1.2 (7D11) not supporting in XCode 3.1.4 SDK 3.1

    - by Shibin Moideen
    Hi, I just updated my iPhone OS to 3.1.2(7D11) but when i tried to debug application in my device its not working. It is showing Code Sign error: Provisioning profile 'AF7973F9-B977-44F5-98C4-0C1976A41B10' can't be found Also in the organizer window its showing "XCode cannot find the software image to install the version" Can anyone help me in solving this.. please help needed Thanks, Shibin

    Read the article

  • Iphone SDK array initlised at viewdidload and released at dealloc is causing leak?

    - by Skeep
    Hi All, I am new to iphone development and i am getting ready to submit my first app. I have an array initlised at viewdidload and released at dealloc, however it is causing a leak. My question is why would this happen is it because the dealloc has not run? My Code is as follows the NSMutableArray called listOfItems is referenced in my .h file for the UITableView. The listOfItems array is used to populate the table. In the viewDidLoad method i have this code listOfItems = [[NSMutableArray alloc] init]; and in the dealloc i have: [listOfItems release]; When watching leaks in instruments I get a NSArray leak which when I drill down points to the line: listOfItems = [[NSMutableArray alloc] init]; Am i putting all this in the right place? Thanks

    Read the article

  • IPhone sdk, more accurate collision detection and set the frame/bounds of UIImageView...

    - by Harry
    Hey, Im having a big problem with my app at the moment, its all too inaccurate. I have a image of a ballooon, https://dl.dropbox.com/u/2578642/Balloonedit.png And i have a dart which if it collides into the balloon the game ends. At the moment i am populating the image of the balloon with 8 UIImageViews. and i am detecting if the dart hits them, this was suppose to make it really accurate but its not, the dart pretty much passes through the balloon when its meant to collide, so i have a plan, is there any way to detect when the dart hits the actual image of the balloon not the UIImageView, or is there any way to draw a border around the balloon and detect if it hits that? currently i am using this code to detect the collision: if (CGRectIntersectsRect(pinend.frame, balloonbit1.frame)){ [maintimer invalidate]; accelManeger.delegate = nil; [ball setImage:img]; [UIImageView beginAnimations:nil context:NULL]; [UIImageView setAnimationDuration:0.3]; ball.transform = CGAffineTransformMakeScale(2, 2); [UIImageView commitAnimations]; } So in one method there are 40 of these bits of code and as you can imagine it is not very accurate/fast to respond. So like i said is there a way to draw a border or something around the balloon and detect the collision between the border and dart? Because then i would imagine it would run a lot smother because it would only have to process 5 bits of code. Thanks for any help. This is a big Question so if you can answer it i will buy your app :) Cheers, Harry :/

    Read the article

  • IPhone SDK removal of NSLog causes NSArray to be undeclared !

    - by Maxwell Segal
    I have a working application I'm about to distribute and am tidying up NSLog statements in it. When I remove NSLog from from a "case" statement, the NSArray declared within the "case" statement errors as Expected expression before AND undeclared. Anybody any idea why this may be? This is happening on all case statements in my app where I'm now removing NSLog. An example code sections appears below: switch (chosenScene) { case 0: //NSLog(@"group1"); // the following NSArray errors with "expected expression.." AND "..group1Secondsarray undeclared" NSArray *group1SecondsArray = [NSArray arrayWithObjects: @"Dummy",@"1/15",@"1/30",@"1/30",@"1/60",@"1/125",@"1/250",nil]; NSArray *group1FStopArray = [NSArray arrayWithObjects: @"Dummy",@"2.8",@"2.8",@"4",@"5.6",@"5.6",@"5.6",nil]; NSString *group1SecondsText = [group1SecondsArray objectAtIndex:slider.value]; calculatedSeconds.text = group1SecondsText; NSString *group1FStopText = [group1FStopArray objectAtIndex:slider.value]; calculatedFStop.text = group1FStopText; [group1SecondsText release]; [group1FStopText release]; break;

    Read the article

  • iPhone SDK: How do you download video files to the Document Directory and then play them?

    - by Jessica
    I've been fooling around with code for ages on this one, I would be very grateful if someone could provide a code sample that downloaded this file from a server http://www.archive.org/download/june_high/june_high_512kb.mp4, (By the way it's not actually this file, it's just a perfect example for anyone trying to help me) and then play it from the documents directory. I know it seems lazy of me to ask this but I have tried so many different variations of NSURLConnection that it's driving me crazy. Also, if I did manage to get the video file downloaded would I be correct in assuming this code would then successfully play it: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"june_high_512kb.mp4"]; NSURL *movieURL = [NSURL fileURLWithPath:path]; self.theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; [_theMovie play]; If the above code would work in playing a video file from the document directory, then I guess the only thing I would need to know is, how to download a video file from a server. Which is what seems to be my major problem. Any help is greatly appreciated.

    Read the article

  • Why is my iPhone SDK 3.2 iPad code showing a white screen?

    - by Anthony Glyadchenko
    I'm trying to get a UISplitViewController working with an iPad app. I have the table view controller linked up under the Master pane and a plain UIView under the Detail view. I also have [window addSubview:splitView.view]; in my code. For some reason I just get a white screen even though the table view controller code is properly coded and linked under my nib. Any help would be great! Thanks! Here's where you can find the code: http://drop.io/s28bu4t/asset/mydevice-hd-zip

    Read the article

  • IPHONE SDK, How to put Void function into my BOOL??? PLEASE!

    - by Harry
    I am using the IPhone's Accelerometer to make a object move. I want to be able to make this function work and not work depending on different states. I have my code for my Accelerometer function and i want to put it into a BOOL so i can call on it when i need it, but i am having problems. Can anyone Help me put this code into a BOOL named: -(BOOL) accelerometerWorks -(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration{ valueX = acceleration.x*25.5; int newX = (int)(ball.center.x +valueX); if (newX > 320-BALL_RADIUS) newX = 320-BALL_RADIUS; if (newX < 0+BALL_RADIUS) newX = 0+BALL_RADIUS; int XA = (int)(balloonbit1.center.x +valueX); if (XA > 320-BALL_RADIUS) XA = 320-BALL_RADIUS; if (XA < 0+BALL_RADIUS) XA = 0+BALL_RADIUS; int XB = (int)(balloonbit2.center.x +valueX); if (XB > 320-BALL_RADIUS) XB = 320-BALL_RADIUS; if (XB < 0+BALL_RADIUS) XB = 0+BALL_RADIUS; int XE = (int)(balloonbit5.center.x +valueX); if (XE > 320-BALL_RADIUS) XE = 320-BALL_RADIUS; if (XE < 0+BALL_RADIUS) XE = 0+BALL_RADIUS; int XF = (int)(balloonbit6.center.x +valueX); if (XF > 320-BALL_RADIUS) XF = 320-BALL_RADIUS; if (XF < 0+BALL_RADIUS) XF = 0+BALL_RADIUS; int XH = (int)(balloonbit8.center.x +valueX); if (XH > 320-BALL_RADIUS) XH = 320-BALL_RADIUS; if (XH < 0+BALL_RADIUS) XH = 0+BALL_RADIUS; ball.center = CGPointMake (newX, 415); balloonbit1.center = CGPointMake (XA, 408); balloonbit2.center = CGPointMake (XB, 395); balloonbit5.center = CGPointMake (XE, 388); balloonbit6.center = CGPointMake (XF, 413); balloonbit8.center = CGPointMake (XH, 426); } Please help. i have been trying for ages with no success. Thanks. Harry.

    Read the article

  • iPhones SDK: Setting a relationship property object using core data?

    - by Harkonian
    I'm using core data in my app. I have two entities that are related: EntityA and EntityB. EntityA has a property of type "relationship" with EntityB. In addition, both of these entities are defined classes (not the default NSManagedObject). I'm inserting a new object into my data like this: EntityA *newEntityA = [NSEntityDescription insertNewObjectForEntityForName:@"EntityA" inManagedObjectContext:self.managedObjectContext]; newEntityA.name = @"some name"; newEntityA.entityB.name = @"some other name"; The problem is entityB.name is null. Even if I add an NSLog() statement right after assigning the value, it is null. What is the proper way of setting my "name" property of EntityB when EntityB is a property of EntityA?

    Read the article

< Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >