Search Results

Search found 3754 results on 151 pages for 'ios simulator'.

Page 14/151 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • iOS enterprise program - In-house Distribution

    - by fr33d0m
    I'm development a app for iPad that will be used within the company only. As the devices that will use the app will be more than 100, the company need to join iOS enterprise program. How works the distribution for In-house distribution? I need to register all the devices to generate one Certificate for the app? Or I can generate one Certificate and the app will work on every devices? Apple need to approve the application for In-house distribution? The company's objective for distribution will be deploy the application on their website so the employees can access the web site, login, and download the app for theirs devices. There is any roles from apple that does not approve this method? What is the best method for distribution In-house app?

    Read the article

  • iOS Downloading Videos and saving in Application Support folder

    - by Satyam svv
    In my application, i've to download videos around 10 to my application and play accordingly. Each video is around 50 MB. I'm using following code and then after downloading the video, i'm saving it to Application support folder to avoid icloud sync. But the problem is that when downloading the videos its crashing. [NSURLConnection sendAsynchronousRequest:req queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *rcvdDat, NSError * err) { . . . } What I'm thinking is that, while downloading the video, it resides in memory and so the total memory occupying by the app is increasing. Finally iOS is making the app to close. I would like to download the video and when ever a stream of data received, write to temp file and when completes move it to application support folder. Can some one help me on how to write it to file and save it at the end? I cannot use 3rd party libraries (unless its small) due to legal issues.

    Read the article

  • iOS - Losing in-app subscription?

    - by user3280451
    I've just built an iOS app that uses a non-reoccuring subscription model. You hit "buy" and then when the client device receives the receipt from the Apple server it whizzes it off to my server to validate it and add the subscription to my user database. If the connection fails before my server has responded then the request is cached, ready to be resent the next time the client comes online. My problem is, what happens if the connection fails between when the user hits the buy button and the receipt is received by the client from Apple? Theres no way for it to know that the purchase has been made? Presumably I should add a "restore purchases" button that sends all of the users receipts to my server which checks if they've already been validated and their respective subscriptions added to the database? Is there a less intrusive way of doing this?

    Read the article

  • Detect when home button is pressed iOS

    - by nick
    I have several iOS apps that all use the same port to listen for a network beacon. On the main view I use viewWillDisappear to close the port when another view is opened, which was working great. Then I noticed if I pressed the home button from the main view controller without opening another view to close the port, then the port stays open and non of my other apps can listen on that port any more. I then tried using viewWillUnload, but that doesn't seem to get called when I press the home button. -(void)viewWillUnload { //[super viewWillUnload]; NSLog(@"View will unload"); [udpSocket close]; udpSocket = nil; } View will unload is never displayed in the console, which leads me to believe that the method is never getting called. Is there a way to detect when the home button is pressed so I can close my port?

    Read the article

  • How to perform DNS query on iOS

    - by yasirmturk
    i want to perform some DNS queries e.g. to get IP records against a specific domain name, i am looking for a preferred way or some useful snippet for this on iOS 3.2+ SDK. thanx in advance part from other snippets i found this code Boolean result; CFHostRef hostRef; NSArray *addresses; NSString *hostname = @"apple.com"; hostRef = CFHostCreateWithName(kCFAllocatorDefault, (CFStringRef)hostname); if (hostRef) { result = CFHostStartInfoResolution(hostRef, kCFHostAddresses, NULL); // pass an error instead of NULL here to find out why it failed if (result == TRUE) { addresses = (NSArray*)CFHostGetAddressing(hostRef, &result); } } if (result == TRUE) { [addresses enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { NSString *strDNS = [NSString stringWithUTF8String:inet_ntoa(*((struct in_addr *)obj))]; NSLog(@"Resolved %d->%@", idx, strDNS); }]; } else { NSLog(@"Not resolved"); } but this is producing same IP for every host Resolved 0-220.120.64.1 any help??

    Read the article

  • Site won't open in Facebook App for ios, nor redirect to Safari

    - by user1431811
    I'm not a heavy coder here, so i'll ask my best. We made a brochure about our home town. However users spreading it trough facebook cant open the links when in their facebook app. The app does not send it to safari either. If opened directly from safari it is no problem. The link is http://visit.lodingen360.com Is there anything i can do to the site/index.html/whatever that will make it open in safari when the link is clicked in the facebook app for ios? (that won't affect visiting the site from pc's and so on) Is there anything uiwebview won't read that can force it to safari, so that we can redirect from the thing opened in safari to the site?

    Read the article

  • port an iOS (iPhone) app to mac?

    - by William Jockusch
    Is there a preferred way to go about this? The app in question is not too large . . . single-player game that I wrote over the course of a couple of months. EDIT: I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer. EDIT: Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

    Read the article

  • iOS AS3 AIR local storage

    - by Kere Puki
    I am developing an app which requires a SQL DB on the device. I am using the File.applicationStorageDirectory and folder.resolvePath to add a new DB. When debugging the app it all looks like it executes correctly and I am able to successfully create a new table. I haven't gone too far with inserting and reading records however I just wanted to ask, when I re-run the app does the existing DB file get replaced with a new empty one? If so do I need to check if the file exists etc. How can I look at the DB on the device (iOS at this stage)? Thanks

    Read the article

  • CorePlot linker errors after upgrading iOS SDK

    - by JustinXXVII
    This seems like it's happened before but somehow ended up working itself out. It's happened again and I can't seem to get this fixed. I use the CorePlot Cocoa Touch framework. Everything was fine until I upgraded to the new 4.3 beta. Now my project won't compile, and is giving me linker errors for unknown symbols having to do with CorePlot. I've become a pro at adding the framework to my project, and I've checked and rechecked the instructions trying to do it again. Is there a button I can click or anything to just make this work again? I've used these instructions to try to re-add the framework, to no avail EDIT: By the way, this compiles just fine for simulator and runs graphs no problem. Compiling for the device gives me the linker errors, as follows: "_OBJC_CLASS_$_CPPlotRange", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPXYGraph", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPTextStyle", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPLineStyle", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPScatterPlot", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPAxisLabel", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPPlotSymbol", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPColor", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_OBJC_CLASS_$_CPFill", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o "_CPDecimalFromFloat", referenced from: -[GraphStatsWindow setNewGraph] in GraphStatsWindow.o -[iPadGraphView viewDidLoad] in iPadGraphView.o -[GraphTrendView setNewGraph] in GraphTrendView.o "_kCPPlainWhiteTheme", referenced from: -[GraphStatsWindow setNewGraph] in GraphStatsWindow.o -[iPadGraphView viewDidLoad] in iPadGraphView.o -[GraphTrendView setNewGraph] in GraphTrendView.o "_OBJC_CLASS_$_CPTheme", referenced from: objc-class-ref in GraphStatsWindow.o objc-class-ref in iPadGraphView.o objc-class-ref in GraphTrendView.o ld: symbol(s) not found for architecture armv7

    Read the article

  • PhoneGap/Cordova. childBrowser plugin giving starnge URL (iOS)

    - by MeltingDog
    I am having a great deal of difficulty getting the childBrowser plugin to work Currently when I click my link it does nothing on my iOS simulator and when I click it using a browser I get a Web Page Not Found error with the web address looking something like: file://myapp/www/%C3%A2%E2%82%AC%C2%9D#??????? I am really stuck for ideas on whats going on and what is causing this, any advice would be greatly appreciated. My code is: <script type="text/javascript" charset="utf-8" src="js/ChildBrowser.js"></script> <script> function onDeviceReady() { childbrowser = ChildBrowser.install(); var root = this; cb = window.plugins.childBrowser; if(cb != null) { cb.onLocationChange = function(loc){ root.locChanged(loc); }; cb.onClose = function(){root.onCloseBrowser(); }; cb.onOpenExternal = function(){root.onOpenExternal(); }; //cb.showWebPage(“http://google.com”); } } function onCloseBrowser() { console.log(“onCloseBrowser!”); } function locChanged(loc) { console.log(“locChanged!”); } function onOpenExternal() { alert(“onOpenExternal!”); } <body onLoad=”onBodyLoad()”> <a href=”#” onclick=’cb.showWebPage(“http://www.google.com”);’>Click Me</a>

    Read the article

  • RetinaJS and LESS : Background image doesn't show on iOS

    - by jidma
    I am trying to make a background image into a retina image using LESS CSS and RetinaJs: in my index.html file : <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> [...] <link type="text/css" rel="stylesheet/less" href="resources/css/retina.less"> <script type="text/javascript" src="resources/js/less-1.3.0.minjs" ></script> [...] </head> <body> [...] <script type="text/javascript" src="resources/js/retina.js"></script> </body> </html> in my retina.less file: .at2x(@path, @w: auto, @h: auto) { background-image: url("@{path}"); @at2x_path: ~`"@{path}".split('.').slice(0, "@{path}".split('.').length - 1).join(".") + "@2x" + "." + "@{path}".split('.')["@{path}".split('.').length - 1]`; @media all and (-webkit-min-device-pixel-ratio : 1.5) { background-image: url("@{at2x_path}"); background-size: @w @h; } } .topMenu { .at2x('../../resources/img/topMenuTitle.png'); } I have both topMenuTitle.png (320px x 40px) and [email protected] (640px x 80px) in the same folder. When test this code: In Firefox i have the normal Background In the XCode iPhone simulator I also have the normal Background In the iPhone device, I don't have any background at all. I'm using GWT if that matters. Any suggestions ? Thanks.

    Read the article

  • Storyboard Bug - iOS 5.1 - Xcode 4.3.3

    - by user1505431
    In my iOS project (using xcode only), I continue to run into a problem where layout presented to me in the storyboard editor becomes automatically modified after some change (which I have not been able to specifically determine). The problem is as follows: The TabBarController has for whatever reason started displaying in landscape orientation. Some of the NavigationControllers have also done the same thing. I can no longer see or edit the navigation bar on my nested views. I can no longer see of edit the tab bar on the views of the resp. tab bar items. Everything works properly when I run the app in my simulator. If I had set it up prior to this change in default display settings, it still works just fine. Here is a screen shot of the problem: My storyboard has consistently presented me with this bug throughout the course of my project. I have fixed it once by resetting via git and another time by rebuilding the entire storyboard. Both solutions worked for an extended period of time, but I would rather have a permanent solution. Any input would be helpful.

    Read the article

  • IOS: How to uplaod a file to specific google drive folder using google drive sdk library

    - by loganathan
    I integrated google drive sdk with my ios app. But i do not know how to upload a file to google drive specific folder. Here the code am using to upload the file. But this one uploading the file to my google drive root folder. Any one share a code to upload a file to google drive specific folder?. My Code: -(void)uploadFileToGoogleDrive:(NSString*)fileName { GTLDriveFile *driveFile = [[[GTLDriveFile alloc]init] autorelease]; driveFile.mimeType = @"application/pdf"; driveFile.originalFilename = @"test.doc"; driveFile.title = @"test.doc"; NSString *filePath = [LocalFilesDetails getUserDocumentFullPathForFileName:fileName isSignedDocument:YES]; GTLUploadParameters *uploadParameters = [GTLUploadParameters uploadParametersWithData:[NSData dataWithContentsOfFile:filePath] MIMEType:@"application/pdf"]; GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:driveFile uploadParameters:uploadParameters]; [self.driveService executeQuery:query completionHandler:^(GTLServiceTicket *ticket, GTLDriveFile *updatedFile, NSError *error) { if (error == nil) { NSLog(@"\n\nfile uploaded into google drive\\<my_folder> foler"); } else { NSLog(@"\n\nfile uplod failed google drive\\<my_folder> foler"); } }]; }

    Read the article

  • iOS iPad UIActionSheet Issue

    - by hart1994
    I am currently developing an application which needs an option to 'share' using multiple services; such as email, twitter. To to this, I have a UIBarButtonItem coded in and when touched, it triggers this: UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; [sheet addButtonWithTitle:@"Email"]; [sheet addButtonWithTitle:@"Tweet"]; [sheet addButtonWithTitle:@"Cancel"]; sheet.cancelButtonIndex = sheet.numberOfButtons-1; [sheet showFromRect:self.view.bounds inView:self.view animated:YES]; [sheet release]; In conjunction with this to detect which button is selected: clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == actionSheet.cancelButtonIndex) { return; } switch (buttonIndex) { case 0: { [self emailThis]; break; } case 1: { [self tweetThis]; break; } } This works a treat on the iPhone. But unfortunately it displays incorrectly on the iPad. It looks like it is trying to display the UIPopoverController, but it is positioned center of the navbar with practically no height. I have looked into using the UIPopoverController, but I cannot seem to find out how to use it with buttons. Is there anyway I can adapt the code above to properly display the buttons, as it's trying to already. Many thanks, Ryan PS: I'm new to objective-c/iOS coding, so please be specific. Thank you :)

    Read the article

  • "error creating files compilation failed" when publishing for iOS on Flash CS5.5

    - by user1662660
    I'm currently developing an app using Flash CS5.5 for iOS. All of my .ipa files have been created and tested with no problems so far. Until now. I'm using Windows. It only started today and happens to every file I try to publish. I get the error "error creating files. compilation failed..." That is the only piece of information I am given about the error. All of my certificates and provisioning profiles are legit and still valid. Has anyone had any experience with this before? Since posting the question I have found a resolution that I will post for anyone who encounters the same problem. In this case I was unable to publish my .ipa file as I was opening the document (and Flash) from the start menu in Windows 7. To fix this instance of the issue I simply opened Flash first and then opened my document and I was able to publish.

    Read the article

  • Facebook IOS SDK: Error in Publish Story Dialog

    - by lividsquirrel
    I've successfully set up the "DemoApp" project from the Facebook IOS SDK to use my "OKC ThunderCast" Facebook application. I have also configured another "Tester" application from scratch to successfully use the Facebook SDK and publish stories to my news feed. However, in my production application, I always get this result when calling the "dialog" method. The full description of the error message is "Error on line 52 at column 17: Opening and ending tag mismatch: div line 0 and body" Here's a detailed walkthrough of all of my code to make sure nothing is missed. 1) A UIViewController calls the "authorize" method NSArray *fbPerms = [NSArray arrayWithObjects:@"read_stream", @"offline_access", nil]; [[FacebookSingleton sharedInstance].facebook authorize:fbPerms delegate:self]; Note: The FacebookSingleton is a class I wrote that always returns a single instance of the "Facebook" class. I am using it successfully in other applications. 2) Safari is opened and the user is successfully authenticated and authorized 3) The application is called back and the "handleOpenUrl" method is called, which calls the "fbDidLogin" method of the UIViewController - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { Facebook *fb = [FacebookSingleton sharedInstance].facebook; return [fb handleOpenURL:url]; } 4) The same UIViewController handles the "fbDidLogin" event, and calls the "dialog" method - (void)fbDidLogin { [[FacebookSingleton sharedInstance].facebook dialog:@"feed" andDelegate:self]; } I also have the necessary "URL Schemes" and "URL Types" entries in the .plist file. To my eyes, I am using exactly the same code in the "DemoApp", "Tester", and production applications. But while the DemoApp and Tester work, I always see this HTML error in the feed dialog in my production application. Has anyone seen a similar issue? Could it be related to the Facebook "Bundle ID" setting in the Facebook application settings? Is there some build or .plist setting that is different? I have invested a great deal of time into troubleshooting with no success in several weeks. Thanks in advance...

    Read the article

  • http-post request for a long String in iOS

    - by onkar
    I am looking to send a very long String, which is an image that is encoded into a String. I need to send that information using POST method. I have implemented the same in Android using key-value pair, I need to implement the same in iOS using key-value pair. Please help me with useful resources/approach. EDIT 1 What have I tried [dictionnary setObject:@"admin" forKey:@"username"]; [dictionnary setObject:@"123123" forKey:@"password"]; NSError *error = nil; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionnary options:kNilOptions error:&error]; NSString *urlString = @"MY CALL URL"; NSURL *url = [NSURL URLWithString:urlString]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"POST"]; [request setHTTPBody:jsonData]; NSURLResponse *response = NULL; NSError *requestError = NULL; NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&requestError]; NSLog(@"response is obtained"); NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding] ; NSLog(@"%@", responseString); EDIT 2 Error I am getting Request Error Error Domain=kCFErrorDomainCFNetwork Code=303 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 303.)" UserInfo=0x7ba0120 {NSErrorFailingURLKey=http://yahoo.com/, NSErrorFailingURLStringKey=http://yahoo.com/}

    Read the article

  • Why can't I access the facebook friends list after reopening a session in ios

    - by user1532390
    I am upgrading to the facebook 3.0 sdk for ios. Things went well, until I tried to open an existing session after relaunching the application. I am trying to access the list of friends for the facebook user. if ([[FBSession activeSession] isOpen]) { [request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) { //do something here }]; }else{ [[self session] openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) { if ([self isValid]) { [request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) { //log this error we always get NSLog(@"%@",error); //do something else }]; } }]; } However I get this error: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x1d92ff40 {com.facebook.sdk:ParsedJSONResponseKey={ body = { error = { code = 2500; message = "An active access token must be used to query information about the current user."; type = OAuthException; }; }; code = 400; }, com.facebook.sdk:HTTPStatusCode=400} I've found that if I use the FBSession reauthorize method it allows me to complete the request without error, but it also means I must show UI or switch apps every time we relaunch the application which is unacceptable. Any suggestions on what I should be doing differently?

    Read the article

  • iOS Switching an embedded view in storyboard

    - by Coyote6
    I have been trying to figure this out all day and I know it should be able to be done, but being new to iOS development using Objective-C and not Appcelerator I'm having newbie issues. What I am trying to accomplish is to have an embedded view in one of my other views, but to be able to switch which view is embedded through programming. I am using storyboards. When I tried to use the view container it displays the attached view, but I cannot attach multiple views to the container in the storyboard. I drew up an image, but to my annoyance I cannot post an image on here because I don't have enough "rep" points, so I posted it on my site: http://static.c6gx.com/images/iphone-embedded-views-diagram.jpg Later on I would like what appears to be a push segue, within that view container, but first I just want to be able to switch between embedded view 1, 2, 3, etc. Am I supposed to be using a view container to accomplish this, or some other type of controller? Then how would I call the transition to change the view? Thank you for any help you can provide.

    Read the article

  • iOS Cell Label link

    - by hart1994
    Hi I am new to iOS programming and I need a little help. I have a table view cell which is populated by data from a .plist file. I need to be able to make a link within one of the cells. How could I do this? Here is the code which is loading the data into the cells: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CustomTableCell"; static NSString *CellNib = @"DetailViewCell"; DetailViewCell *cell = (DetailViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:CellNib owner:self options:nil]; cell = (DetailViewCell *)[nib objectAtIndex:0]; } cell.accessoryType = UITableViewCellAccessoryNone; cell.cellTitleLabel.textColor = [UIColor blackColor]; cell.cellTitleLabel.font = [UIFont systemFontOfSize:20.0]; cell.cellSubtitleLabel.textColor = [UIColor darkGrayColor]; informations = [[NSArray alloc] initWithObjects:@"City", @"Country", @"State", @"History", @"Link", nil]; subtitles = [[NSArray alloc] initWithObjects:titleString, subtitleString, stateString, populationString, @"Link", nil]; cell.cellTitleLabel.text = [informations objectAtIndex:indexPath.row]; cell.cellSubtitleLabel.text = [subtitles objectAtIndex:indexPath.row]; return (DetailViewCell *) cell; } For the cell "Link" I need it to open a url which is stored in the .plist file. How could i do this? Many thanks Ryan PS: I'm a newbie at this stuff, so be descriptive. Thanks

    Read the article

  • Memory management of objects returned by methods (iOS / Objective-C)

    - by iOSNewb
    I am learning Objective-C and iOS programming through the terrific iTunesU course posted by Stanford (http://www.stanford.edu/class/cs193p/cgi-bin/drupal/) Assignment 2 is to create a calculator with variable buttons. The chain of commands (e.g. 3+x-y) is stored in a NSMutableArray as "anExpression", and then we sub in random values for x and y based on an NSDictionary to get a solution. This part of the assignment is tripping me up: The final two [methods] “convert” anExpression to/from a property list: + (id)propertyListForExpression:(id)anExpression; + (id)expressionForPropertyList:(id)propertyList; You’ll remember from lecture that a property list is just any combination of NSArray, NSDictionary, NSString, NSNumber, etc., so why do we even need this method since anExpression is already a property list? (Since the expressions we build are NSMutableArrays that contain only NSString and NSNumber objects, they are, indeed, already property lists.) Well, because the caller of our API has no idea that anExpression is a property list. That’s an internal implementation detail we have chosen not to expose to callers. Even so, you may think, the implementation of these two methods is easy because anExpression is already a property list so we can just return the argument right back, right? Well, yes and no. The memory management on this one is a bit tricky. We’ll leave it up to you to figure out. Give it your best shot. Obviously, I am missing something with respect to memory management because I don't see why I can't just return the passed arguments right back. Thanks in advance for any answers!

    Read the article

  • iOS layout; I'm not getting it

    - by Tbee
    Well, "not getting it" is too harsh; I've got it working in for what for me is a logical setup, but it does not seem to be what iOS deems logical. So I'm not getting something. Suppose I've got an app that shows two pieces of information; a date and a table. According to the MVC approach I've got three MVC at work here, one for the date, one for the table and one that takes both these MCVs and makes it into a screen, wiring them up. The master MVC knows how/where it wants to layout the two sub MVC's. Each detail MVC only takes care of its own childeren within the bounds that were specified by the master MVC. Something like: - (void)loadView { MVC* mvc1 = [[MVC1 alloc] initwithFrame:...] [self.view addSubview:mvc1.view]; MVC* mvc2 = [[MVC2 alloc] initwithFrame:...] [self.view addSubview:mvc2.view]; } If the above is logical (which is it for me) then I would expect any MVC class to have a constructor "initWithFrame". But an MVC does not, only view have this. Why? How would one correctly layout nested MVCs? (Naturally I do not have just these two, but the detail MVCs have sub MVCs again.)

    Read the article

  • Saving Email/Password to Keychain in iOS

    - by Jason
    I'm very new to iOS development so forgive me if this is a newbie question. I have a simple authentication mechanism for my app that takes a user's email address and password. I also have a switch that says 'Remember me'. If the user toggles that switch on, I'd like to preserve their email/password so those fields can be auto-populated in the future. I've gotten this to work with saving to a plist file but I know that's not the best idea since the password is unencrypted. I found some sample code for saving to the keychain, but to be honest, I'm a little lost. For the function below, I'm not sure how to call it and how to modify it to save the email address as well. I'm guessing to call it would be: saveString(@"passwordgoeshere"); Thank you for any help!!! + (void)saveString:(NSString *)inputString forKey:(NSString *)account { NSAssert(account != nil, @"Invalid account"); NSAssert(inputString != nil, @"Invalid string"); NSMutableDictionary *query = [NSMutableDictionary dictionary]; [query setObject:(id)kSecClassGenericPassword forKey:(id)kSecClass]; [query setObject:account forKey:(id)kSecAttrAccount]; [query setObject:(id)kSecAttrAccessibleWhenUnlocked forKey:(id)kSecAttrAccessible]; OSStatus error = SecItemCopyMatching((CFDictionaryRef)query, NULL); if (error == errSecSuccess) { // do update NSDictionary *attributesToUpdate = [NSDictionary dictionaryWithObject:[inputString dataUsingEncoding:NSUTF8StringEncoding] forKey:(id)kSecValueData]; error = SecItemUpdate((CFDictionaryRef)query, (CFDictionaryRef)attributesToUpdate); NSAssert1(error == errSecSuccess, @"SecItemUpdate failed: %d", error); } else if (error == errSecItemNotFound) { // do add [query setObject:[inputString dataUsingEncoding:NSUTF8StringEncoding] forKey:(id)kSecValueData]; error = SecItemAdd((CFDictionaryRef)query, NULL); NSAssert1(error == errSecSuccess, @"SecItemAdd failed: %d", error); } else { NSAssert1(NO, @"SecItemCopyMatching failed: %d", error); } }

    Read the article

  • Where is the "personal" folder of the iPhone simulator?

    - by Krumelur
    Hi, I found the iPhone simulator at /Username/Library/Application Support/iPhone Simulator/4.2/ and in there I can see my apps within a cryptic directory name. One of my apps is storing a database and some cached files in the iPhone's "Personal" folder which I thought is the "Documents" folder in the directory of the simulator. But there's nothing in it. Nevertheless, I can read my files - where are they? René

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >