Search Results

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

Page 38/151 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • Creating your own UTI for an iOS app.

    - by Kalle
    Hello all, The app I'm developing has a custom file format for its files, and I'd like to be able to use the "Open In ..." feature of iOS which lets users e.g. email each other a file and then open it directly in the app. I've gotten as far as adding the CFBundleDocumentType stuff in the Info.plist file, but the problem is the LSItemContentTypes. From what I've read, I need to provide the actual file as a UTI, rather than just saying ".myfileextension", and I can't find a lot about how to create UTI's in a iOS app. Anyone know?

    Read the article

  • CGAL replacement for iOS

    - by Aleks N.
    I have a set of nodes that define streets. Each node has latitude and longitude. Also I have user location with latitude and longitude. My intention is to build Voronoi diagram for segments defined by each pair of nodes, and then find which node user location is closest to. Looks like this task can be accomplished with CGAL library. While I'm in the process of compiling it for iOS environment, probably you guys will be able to give links to libs that are already compiled against iOS, or were intended to be used in Objective C environment from the very beginning... Because I'm afraid that even if CGAL compiles for me, I might get into trouble when using it. Thanks!

    Read the article

  • UIActivityViewController 101

    - by Anthony Guay
    I'm starting to get familiar with the new iOS 6 way to share: UIActivityViewController (the same as when you share a photo from the native iOS photo app), but I'm experiencing a few problems. First, when I choose to share via email, I can't find a way to set the subject of the email. Second, when I post on twitter, I can't find how to post a URL (except explicitly writing it in a NSString). Before, on iOS 5, I was using MFMailComposeViewController for Mail and SLComposeViewController for Twitter. It worked well. If there's no way to choose the subject with UIActivityViewController, could there be a way that I put my own custom buttons on the ActivityViewController, buttons that will call MFMailComposeViewController and SLComposeViewController when touched? I'm just speculating here. Thanks!

    Read the article

  • what's wrong with concatenation in blackberry application?

    - by sexitrainer
    For the life of me, I can't understand why adding a concatenated string to the MainScreen is causing the BB simulator to throw an exception. If I run a VERY simple hello program with the following control, all is well: RichTextField rtfHello = new RichTextField("Hello There !!!"); add(rtfItemDescription); But if I add a concatenated string, the entire app breaks: String MyName = "John Doe"; RichTextField rtfHello = new RichTextField("Hello There !!!" + MyName); add(rtfItemDescription); So what am I doing wrong? Why would the simulator throw an exception for the second example?

    Read the article

  • How do IOS know which viewController is being viewed and hence need viewWillAppear to be called

    - by Jim Thio
    How does iOs know? Does each view has a pointer to it's controller? What happened? When we pop a viewController from navigation, does the navigationController arrange which view should be called? For example: If I added: [[BNUtilitiesQuick window] addSubview:[BNUtilitiesQuick searchController].view]; viewWillAppear will be called. However, window doesn't know the viewController. I am passing the view outlet of the controller not the controller. How can iOs 5 knows that it has to call [[BNUtilitiesQuick searchController] viewWillAppear:YES]

    Read the article

  • App crashing when upgraded xcode

    - by funatsg
    Hi guys! I have this problem of my app crashing (only when press a certain UIButton) after i upgraded my xcode to the latest 3.2.5 and iPhone simulator 4.2. It works fine in my friend laptop, who hasn't upgraded yet. I googled for answers, but most of them faces problem only crashing in simulator but not device. Mine crashes for both. Anyone has any idea about this issue? I cant seem to find any solution.

    Read the article

  • How does "Open With" some app in iPhone work?

    - by nybon
    As far as I know, from iOS SDK 3.2, file type handling is added and an iOS application can associate itself with some file type so that other applications can open this kind of file with the application. Because of the sandbox mechanism in iOS, I wonder when a file in appA is opened with appB, which registered itself with this kind of file, what will happen? Is this file copied to appB and both appA and appB keep a copy of this file? If the answer is yes, is it possible to make appB open the file under appA's document folder? I cannot find any Apple documentation on this. For example, appA stores a Keynote document in it, if I open this Keynote document with the Keynote app, is it possible to let Keynote app to edit this document in place so that after editing, appA can see the updated document? Any help is appreciated.

    Read the article

  • iOS - Open an app with a URL Scheme from Chrome

    - by Brett
    I've read many many blogs and examples of how to open an app from an URL scheme (for example, this blog), and it seems to work great when I call my app from mobile safari. For instance, when I call testapp://some.data.here in mobile safari, it opens my testapp and I can parse out the some.data.here. However, when I call testapp://some.data.here in iOS-Chrome, it just googles the term instead of calling the app. Is there a way to have iOS Chrome recognize the URL as a registered app the way mobile safari does? When I google this topic, I see a lot of comments on how to open a url in chrome from an app, but not the other way around. Has anyone encountered this? Thanks!

    Read the article

  • NSFileManager works fine on simulator but not on device

    - by Jenicek
    Hi, I have problem creating directories and files with NSFileManager on the iPhone device. My code, shown below, works fine on the simulator, but not on the device, could you please help me? Gimme some directions where the problem may be, thanks for every reply.. I'm first creating directories this way: NSFileManager *fileMgr = [NSFileManager defaultManager]; NSArray *arPaths = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask, YES); NSString *appPath = [[NSString alloc] init]; appPath = [arPaths objectAtIndex:0]; strDownloadsDir = [[NSString alloc] init]; strDownloadsDir = [[appPath stringByAppendingPathComponent:@"/Other"] copy]; if(![fileMgr fileExistsAtPath:strDownloadsDir]) [fileMgr createDirectoryAtPath:strDownloadsDir attributes:nil]; and then I'm trying to create new file in this directory this way: NSString *filePath = [strDownloadsDir stringByAppendingPathComponent:strDlFileName]; //Test whether this file exists, if not, create it NSLog(@"%@", filePath); if(![fileMgr fileExistsAtPath:filePath]) { if([fileMgr createFileAtPath:filePath contents:nil attributes:nil]) NSLog(@"Creating new file at path %@", filePath); else NSLog(@"Failed to create new file."); } It seems that there's something wrong with whole NSFileManager, because when I'm using fileExistAtPath with a path given by this NSArray *arPaths = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask, YES); NSString *appPath = [[NSString alloc] init]; appPath = [arPaths objectAtIndex:0]; it is not working too, I tried to change directory to NSDocumentsDirectory but it did not help

    Read the article

  • AVAudioPlayer working in Simulator, but not on device

    - by cannyboy
    My mp3 playing code is: NSError *error; soundObject = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:audioPathString] error:&error]; if (soundObject == nil) NSLog(@"%@", [error description]); soundObject.delegate = self; soundObject.numberOfLoops = 0; soundObject.volume = 1.0; NSLog(@"about to play"); [soundObject prepareToPlay]; [soundObject play]; NSLog(@"[soundObject play];"); The mp3 used to play fine, and it still does on the simulator. But not on the device. I've recently added some sound recording code (not mine) to the software. It uses AudioQueue stuff which is slightly beyond me. Does that conflict with AVAudioPlayer? Or what could be the problem? I've noticed that as soon as the audiorecording code starts working, I can't adjust the volume on the device anymore, so maybe it blocks the audio playback?. EDIT The solution seems to be to put this in my code. I put it in applicationDidFinishLaunching: [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: nil]; UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute,sizeof (audioRouteOverride),&audioRouteOverride); The first line allows both play and record, whilst the other lines apparently reroute things to make the volume louder. All audio code is voodoo to me.

    Read the article

  • Multiple Application Support Directories for iPhone Simulator?

    - by Alex G
    I am developing an iPhone app with someone else. The app works fine for me, but he is running into a bug. We think this bug is related to the fact that he is getting multiple Application directories for this same app. In my ~/Library/Application Support/iPhone Simulator/User/Applications, I only have one folder at all times. He says that he will get 3 or 4 directories when he is only working on this one app. We think this is our problem because our bug has to do with displaying images that are stored in the app's Documents folder. Does anyone know why he is ending up with multiple directories or how to stop it? Edit: Here is the code for writing the image to a file: NSData *image = [NSData dataWithContentsOfURL:[NSURL URLWithString:[currentArticle articleImage]]]; NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *imagePath = [array objectAtIndex:0]; NSFileManager *NSFM = [NSFileManager defaultManager]; BOOL isDir = YES; if(![NSFM fileExistsAtPath:imagePath isDirectory:&isDir]) if(![NSFM createDirectoryAtPath:imagePath attributes:nil]) NSLog(@"error"); imagePath = [imagePath stringByAppendingFormat:@"/images"]; if(![NSFM fileExistsAtPath:imagePath isDirectory:&isDir]) if(![NSFM createDirectoryAtPath:imagePath attributes:nil]) NSLog(@"error"); imagePath = [imagePath stringByAppendingFormat:@"/%@.jpg", [currentArticle uniqueID]]; [image writeToFile:imagePath atomically:NO]; And here is the code for getting the path when I need the image: - (NSString *)imagePath { NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *imagePath = [array objectAtIndex:0]; return [imagePath stringByAppendingFormat:@"/images/%@.jpg", [self uniqueID]]; } The app works great for me, but my partner says that the images don't show up intermittently, and he notices that he gets multiple directories in his Applications folder.

    Read the article

  • Stack Overflow when debugging application in iPhone simulator

    - by mjdth
    I'm getting this every time I attempt to debug my app in the simulator: [Session started at 2010-05-11 16:16:52 -0500.] GNU gdb 6.3.50-20050815 (Apple version gdb-1467) (Wed Apr 21 06:57:21 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all Attaching to process 51573. Program received signal: “EXC_BAD_ACCESS”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.) I've looked around and found a few similar cases, but they all seem to be related to a missing file and an extra necessary build phase. I'm getting no notification of a missing file here so I'm not sure where to start to fix this and get the app running again. Thanks for any insight!

    Read the article

  • Trouble when changing pixel data with alpha on png on iphone --okay on simulator

    - by Ted
    I'm trying to change the color of the pixels (lighten or darken) without changing the value of the alpha channel using CGDataProviderCopyData. I leave every 4th databyte untouched. It work fine of the iphone simulator, however on the real thing the alpha goes white as I increase the values of the other pixels. I've tried changing just the first byte, or the second, or the third. Does anybody have any idea what is going on? The basic code is borrowed from Jorge. I like this simple approach --I'm new to this. But I want to make it work with png images with some transparency. here is most of the code by Jorge : CFDataRef CopyImagePixels(CGImageRef inImage){ return CGDataProviderCopyData(CGImageGetDataProvider(inImage)); } CGImageRef img=originalImage.CGImage; CFDataRef dataref=CopyImagePixels(img); UInt8 *data=(UInt8 *)CFDataGetBytePtr(dataref); int length=CFDataGetLength(dataref); for(int index=0;index255){ data[index+i]=255; }else{ data[index+i]+=value; } } } } size_t width=CGImageGetWidth(img); size_t height=CGImageGetHeight(img); size_t bitsPerComponent=CGImageGetBitsPerComponent(img); size_t bitsPerPixel=CGImageGetBitsPerPixel(img); size_t bytesPerRow=CGImageGetBytesPerRow(img); CGColorSpaceRef colorspace=CGImageGetColorSpace(img); CGBitmapInfo bitmapInfo=CGImageGetBitmapInfo(img); CGImageAlphaInfo alphaInfo = kCGBitmapAlphaInfoMask(img); NSLog(@"bitmapinfo: %d",bitmapInfo); CFDataRef newData=CFDataCreate(NULL,data,length); CGDataProviderRef provider=CGDataProviderCreateWithCFData(newData); CGImageRef newImg=CGImageCreate(width,height,bitsPerComponent,bitsPerPixel,bytesPerRow,colorspace,bitmapInfo,provider,NULL,true,kCGRenderingIntentDefault); [iv setImage:[UIImage imageWithCGImage:newImg]]; CGImageRelease(newImg); CGDataProviderRelease(provider);

    Read the article

  • iPhone: AppStore InAppPurchase Connects in Simulator but Not on Device

    - by riteshkumar1905
    I am having trouble connecting to the AppStore from within my application. Everything runs fine in the Simulator but when I run on device the app cannot connect to the Appstore. Here is the code that connects to the Appstore #import "BuyController.h"#import "InAppPurchaseManager.h" #import "SKProducts.h" #define kInAppPurchaseProUpgradeProductId @"com.vigyaapan.iWorkOut1" @implementation BuyController - (IBAction)buy:(id)sender{ /* get the product description (defined in early sections)*/ //[self requestProUpgradeProductData]; if ([SKPaymentQueue canMakePayments]) { InAppPurchaseManager *Observer = [[InAppPurchaseManager alloc] init]; [[SKPaymentQueue defaultQueue] addTransactionObserver:Observer]; //NSURL *sandboxStoreURL = [[NSURL alloc]initWithString:@"http://sandbox.itunes.apple.com/verifyReceipt"]; //[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"http://sandbox.itunes.apple.com"]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/ com.vigyaapan.iWorkOut1?id=9820091347&;amp;amp;amp;amp;mt=8"]]; //[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=301349397&;amp;amp;amp;amp;mt=8"]]; SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.vigyaapan.iWorkOut1"]; [[SKPaymentQueue defaultQueue] addPayment:payment]; } else { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"MyApp" message:@"You are not authorized to purchase from AppStore" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; [alert show]; [alert release]; } //return [SKPaymentQueue canMakePayments];} SKPayment *payment = [SKPayment paymentWithProductIdentifier:kInAppPurchaseProUpgradeProductId]; [[SKPaymentQueue defaultQueue] addPayment:payment]; //[self requestProUpgradeProductData]; /* get the product description (defined in early sections)*/ } @end

    Read the article

  • Plist data OK in iPhone simulator but disappears after installation onto device

    - by user183804
    I am testing an application on a first-generation iPod running OS 3.1.3 with a tableview populated from a plist. The application works well on the simulator. Initially after installation onto the iPod for testing, the tableview was blank (scrollable lines present, but empty rows). After searching this site, I found one issue to be a case-sensitive problem in the name of the plist file ("Data.plist in resources; "data.plist" in code). When the problem persisted, I again found on this site the advice to "Clean all Targets" prior to installation. I now have found that after performing a "Clean all Targets" operation twice, quitting XCode in between operations, the problem resolves, and the tableview appears properly populated after installation. I am wondering whether this issue signifies a corrupted plist file, prior to making the application available on the App store. Re-creating the plist file from scratch and then testing it likely would take several hours of work, so I do not want to do so unless absolutely necessary. Thanks in advance for any help.

    Read the article

  • Bug on submitted app binary but not in the simulator - CALayer position contains NaN

    - by Jonathan Thurft
    I submitted my app to the App Store where is ready to download. I've since then received some interesting crash reports when people select an image from the ImagePicker in one of my views. This bug (see below) makes the app crash. I was wondering 2 things. Can anyone spot the problem in the code below? How do you deal with bugs that are only in the App Binary but do not show up when trying to recreate them on the dev environment? - I can make the app crash with the Binary that is on the app store but when I do the same on the simulator or on my test phone the app works perfectly.. The Crash report in BugSense CALayer position contains NaN: [798 nan] Class: CALayerInvalidGeometry 0x00120e99 -[imageCroppingViewController imagePickerController:didFinishPickingMediaWithInfo:] (imageCroppingViewController.m:126) + 163481 The Code - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; imageView.image = image; CGRect rect; rect.size.width = image.size.width; rect.size.height = image.size.height; imageView.center = scrollView.center; [imageView setFrame:rect]; scrollView.contentSize = imageView.frame.size; self.navigationController.navigationBar.hidden = NO; [myPicker.view removeFromSuperview]; }

    Read the article

  • Simple gradient issue with OpenGL on iphone simulator

    - by Paul
    i was following the tutorial from raywenderlich website, the gradient seems not to work perfectly, is it only because of the iphone simulator, or is it something else? I can't try myself with an iphone. Here is the image : And the code : -(CCSprite *)spriteWithColor:(ccColor4F)bgColor textureSize:(float)textureSize { // 1: Create new CCRenderTexture CCRenderTexture *rt = [CCRenderTexture renderTextureWithWidth:textureSize height:screenSize.height]; // 2: Call CCRenderTexture:begin [rt beginWithClear:bgColor.r g:bgColor.g b:bgColor.b a:bgColor.a]; // 3: Draw into the texture glDisable(GL_TEXTURE_2D); glDisableClientState(GL_TEXTURE_COORD_ARRAY); float gradientAlpha = 0.5; CGPoint vertices[4]; ccColor4F colors[4]; int nVertices = 0; vertices[nVertices] = CGPointMake(0, 0); colors[nVertices++] = (ccColor4F){0, 0, 0, 0}; vertices[nVertices] = CGPointMake(textureSize, 0); colors[nVertices++] = (ccColor4F){0, 0, 0, gradientAlpha}; vertices[nVertices] = CGPointMake(0, screenSize.height); colors[nVertices++] = (ccColor4F){0, 0, 0, 0}; vertices[nVertices] = CGPointMake(textureSize, screenSize.height); colors[nVertices++] = (ccColor4F){0, 0, 0, gradientAlpha}; glVertexPointer(2, GL_FLOAT, 0, vertices); glColorPointer(4, GL_FLOAT, 0, colors); glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)nVertices); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_TEXTURE_2D); // 4: Call CCRenderTexture:end [rt end]; // 5: Create a new Sprite from the texture return [CCSprite spriteWithTexture:rt.sprite.texture]; } Thanks

    Read the article

  • RADIUS authentication on Cisco switches: how to assign privilege levels?

    - by Massimo
    I need to configure some Cisco switches (IOS 12.x) to authenticate against a RADIUS server; the server is Windows Server 2003's IAS, and it validates users against his Active Directory domain. I know how to configure the switches to validate usernames/passwords against the RADIUS server, and I can succesfully login using an AD account; the question is: how can I set privilege level 15 for users, in order to not have to use enable each time?

    Read the article

  • Junk files appeared in my OSX root folder?

    - by user68732
    I see a bunch of junk files in the root folder of my hard drive running Snow Leopard. Here is a screen shot of the files: If I inspect these files, they appear to contain XML with DeviceCertificate, DevicePublicKey, and SystemBUID information, among other XML elements. I do iOS development on this machine. Can anyone explain from where these files came, and if they are an indication of anything serious, such as malware or spyware?

    Read the article

  • Streaming Video with Blackberry Simulator

    - by Jenny
    So, I wrote a quick little app for the iphone that takes in an http URL, and plays the .mp4 video located at that URL (it does more than that, of course, but that's the meat of it). Naturally, I wanted to have it on more than just a single mobile platform, so I decided to target Blackberry next. However, I'm running into a lot of problems with the Blackberry Environment. First of all, I learn that I can only download 256k files! I learn how to set that variable in my MDS simulator (and learn that this is NOT a production solution, because any end users will have to have their BES or MDS admin change the setting there). Then, I find a video less than 2 MB I can practice with. Going to the browser prompts me to save the video (rather than it playing in the browser like I expected). After saving the video, it refuses to play, saying it's the wrong format. So. I can't find a reference to IF Blackberry can stream with HTTP (i"ve heard it CAN use RTSP, though, and heard some rumors that it can't use HTTP, which would really suck). I also can't find a reference to what format blackberry uses (although I can find a million programs that will convert one file to the 'blackberry' format). Surely SOMEONE must have tried to stream video with the blackberry before. How did they go about doing so? Is it just a hopeless pipedream? Will I have to go with RTSP? Sorry for the lack of a concrete question...I'm just really lost, and I hate how so many tutorials or forum posts seem to assume I know the capabilities of the Blackberry... Edit: I finally found out that the .3gp (which I'd never heard of ) format is what Blackberry uses. Still have no idea how to stream videos off the web, though. I found a tutorial: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How%5FTo%5F-%5FPlay%5Fvideo%5Fwithin%5Fa%5FBlackBerry%5Fsmartphone%5Fapplication.html?nodeid=1383173&vernum=0 That seemed to be useful, but the code doesn't work if you give it a URL (even though it claims it does).

    Read the article

  • Multiple View App shows Blank Screen in Simulator

    - by Brett Coburn
    Hello; I am developing a simple app that first shows a menu screen, and when a button is pressed, a game screen appears. I was able to develop the game screen without any issues, but when I changed the code to first display the menu, the simulator showed a blank screen. I've read all the articles on connecting views with IB but I can't figure this out. Any help would be appreciated. This is my code: // Pong_Multiple_ViewAppDelegate.h // Pong Multiple View // // Created by Brett on 10-05-19. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @class MenuViewController; @interface Pong_Multiple_ViewAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; MenuViewController *navigationController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet MenuViewController *navigationController; @end // // Pong_Multiple_ViewAppDelegate.m // Pong Multiple View // // Created by Brett on 10-05-19. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "Pong_Multiple_ViewAppDelegate.h" #import "MenuViewController.h" @implementation Pong_Multiple_ViewAppDelegate @synthesize window; @synthesize navigationController; - (void)application:(UIApplication *)application{ // Override point for customization after application launch [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; } - (void)dealloc { [navigationController release]; [window release]; [super dealloc]; } @end // // MenuViewController.h // Pong Multiple View // // Created by Brett on 10-05-19. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> #import "GameViewController.h" @interface MenuViewController : UIViewController { GameViewController *gameViewController; IBOutlet UIButton *gameButton; } @property(nonatomic, retain) GameViewController *gameViewController; @property(nonatomic, retain) UIButton *gameButton; -(IBAction)switchPage:(id)sender; @end // // MenuViewController.m // Pong Multiple View // // Created by Brett on 10-05-19. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "MenuViewController.h" #import "GameViewController.h" @implementation MenuViewController @synthesize gameViewController; @synthesize gameButton; -(IBAction)switchPage:(id)sender{ if (self.gameViewController==nil) { GameViewController *gameView = [[GameViewController alloc]initWithNibName:@"GameView" bundle:[NSBundle mainBundle]]; self.gameViewController= gameView; [gameView release]; } [self.navigationController pushViewController:self.gameViewController animated:YES]; } .... @end My code also includes classes: GameViewController.h, GameViewController.m, and nib files: MenuView.xib, and GameView.xib Thanks, B

    Read the article

  • Robots &amp; Pencils Bring iOS Dev Camp/Dev School to Winnipeg

    - by D'Arcy Lussier
    My buddy Paul Thorsteinson from Robots and Pencils has come up with an elaborate way to collect his Mac power adaptor that I keep forgetting to mail to him – he’s coming to town with Jonathan Rasmusson to run an iPhone Dev Camp and two-day Dev School here in Winnipeg! From the email he sent me: We are going to be bringing our successful iOS dev school out to the 'Peg in October as well has hosting a dev camp on the Friday night (comparable to a .net user group type deal).  If you know any peeps in Manitoba who are interested in these, please pass along!  .Net developers are welcome to come and heckle as well ;) Winnipeg iPhone Dev Camp October 26th Marlborough Hotel, 5:30pm Cost: $10 http://ios-dev-camp-winnipeg-eorg.eventbrite.com/ ^for devs of any level interested in meeting other devs hearing talks of all levels.  Food and networking Winnipeg iPhone Dev School October 27th, 28th, Marlborough Hotel Cost: $899 + GST http://academy.robotsandpencils.com/training ^For devs looking to get their feet wet in iOS dev Paul has spoken at Prairie Dev Con before and is vastly knowledgeable in mobile development. You can see his work in Spy vs Spy, Catch the Princess, World Explorer for Minecraft, Deco Windshield (yes they run their entire business on their iPad), Anthm, Own This World and too many other apps. If you’re into iOS development, looking to get in, or wanting to improve your skills, consider these great professional development opportunities! D

    Read the article

  • EKCalendar not added to iCal

    - by Alex75
    I have a strange behavior on my iPhone. I'm creating an application that uses calendar events (EventKit). The class that use is as follows: the .h one #import "GenericManager.h" #import <EventKit/EventKit.h> #define oneDay 60*60*24 #define oneHour 60*60 @protocol CalendarManagerDelegate; @interface CalendarManager : GenericManager /* * metodo che aggiunge un evento ad un calendario di nome Name nel giorno onDate. * L'evento da aggiungere viene recuperato tramite il dataSource che è quindi * OBBLIGATORIO (!= nil). * * Restituisce YES solo se il delegate è conforme al protocollo CalendarManagerDataSource. * NO altrimenti */ + (BOOL) addEventForCalendarWithName:(NSString *) name fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate withDelegate:(id<CalendarManagerDelegate>) delegate; /* * metodo che aggiunge un evento per giorno compreso tra fromDate e toDate ad un * calendario di nome Name. L'evento da aggiungere viene recuperato tramite il dataSource * che è quindi OBBLIGATORIO (!= nil). * * Restituisce YES solo se il delegate è conforme al protocollo CalendarManagerDataSource. * NO altrimenti */ + (BOOL) addEventsForCalendarWithName:(NSString *) name fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate withDelegate:(id<CalendarManagerDelegate>) delegate; @end @protocol CalendarManagerDelegate <NSObject> // viene inviato quando il calendario necessita informazioni sull' evento da aggiungere - (void) calendarManagerDidCreateEvent:(EKEvent *) event; @end the .m one // // CalendarManager.m // AppCampeggioSingolo // // Created by CreatiWeb Srl on 12/17/12. // Copyright (c) 2012 CreatiWeb Srl. All rights reserved. // #import "CalendarManager.h" #import "Commons.h" #import <objc/message.h> @interface CalendarManager () @end @implementation CalendarManager + (void)requestToEventStore:(EKEventStore *)eventStore delegate:(id)delegate fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate name:(NSString *)name { if([eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) { // ios >= 6.0 [eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) { if (granted) { [self addEventForCalendarWithName:name fromDate: fromDate toDate: toDate inEventStore:eventStore withDelegate:delegate]; } else { } }]; } else if (class_getClassMethod([EKCalendar class], @selector(calendarIdentifier)) != nil) { // ios >= 5.0 && ios < 6.0 [self addEventForCalendarWithName:name fromDate:fromDate toDate:toDate inEventStore:eventStore withDelegate:delegate]; } else { // ios < 5.0 EKCalendar *myCalendar = [eventStore defaultCalendarForNewEvents]; EKEvent *event = [self generateEventForCalendar:myCalendar fromDate: fromDate toDate: toDate inEventStore:eventStore withDelegate:delegate]; [eventStore saveEvent:event span:EKSpanThisEvent error:nil]; } } /* * metodo che recupera l'identificativo del calendario associato all'app o nil se non è mai stato creato. */ + (NSString *) identifierForCalendarName: (NSString *) name { NSString * confFileName = [self pathForFile:kCurrentCalendarFileName]; NSDictionary *confCalendar = [NSDictionary dictionaryWithContentsOfFile:confFileName]; NSString *currentIdentifier = [confCalendar objectForKey:name]; return currentIdentifier; } /* * memorizza l'identifier del calendario */ + (void) saveCalendarIdentifier:(NSString *) identifier andName: (NSString *) name { if (identifier != nil) { NSString * confFileName = [self pathForFile:kCurrentCalendarFileName]; NSMutableDictionary *confCalendar = [NSMutableDictionary dictionaryWithContentsOfFile:confFileName]; if (confCalendar == nil) { confCalendar = [NSMutableDictionary dictionaryWithCapacity:1]; } [confCalendar setObject:identifier forKey:name]; [confCalendar writeToFile:confFileName atomically:YES]; } } + (EKCalendar *)getCalendarWithName:(NSString *)name inEventStore:(EKEventStore *)eventStore withLocalSource: (EKSource *)localSource forceCreation:(BOOL) force { EKCalendar *myCalendar; NSString *identifier = [self identifierForCalendarName:name]; if (force || identifier == nil) { NSLog(@"create new calendar"); if (class_getClassMethod([EKCalendar class], @selector(calendarForEntityType:eventStore:)) != nil) { // da ios 6.0 in avanti myCalendar = [EKCalendar calendarForEntityType:EKEntityTypeEvent eventStore:eventStore]; } else { myCalendar = [EKCalendar calendarWithEventStore:eventStore]; } myCalendar.title = name; myCalendar.source = localSource; NSError *error = nil; BOOL result = [eventStore saveCalendar:myCalendar commit:YES error:&error]; if (result) { NSLog(@"Saved calendar %@ to event store. %@",myCalendar,eventStore); } else { NSLog(@"Error saving calendar: %@.", error); } [self saveCalendarIdentifier:myCalendar.calendarIdentifier andName:name]; } // You can also configure properties like the calendar color etc. The important part is to store the identifier for later use. On the other hand if you already have the identifier, you can just fetch the calendar: else { myCalendar = [eventStore calendarWithIdentifier:identifier]; NSLog(@"fetch an old-one = %@",myCalendar); } return myCalendar; } + (EKCalendar *)addEventForCalendarWithName: (NSString *) name fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate inEventStore:(EKEventStore *)eventStore withDelegate: (id<CalendarManagerDelegate>) delegate { // da ios 5.0 in avanti EKCalendar *myCalendar; EKSource *localSource = nil; for (EKSource *source in eventStore.sources) { if (source.sourceType == EKSourceTypeLocal) { localSource = source; break; } } @synchronized(self) { myCalendar = [self getCalendarWithName:name inEventStore:eventStore withLocalSource:localSource forceCreation:NO]; if (myCalendar == nil) myCalendar = [self getCalendarWithName:name inEventStore:eventStore withLocalSource:localSource forceCreation:YES]; NSLog(@"End synchronized block %@",myCalendar); } EKEvent *event = [self generateEventForCalendar:myCalendar fromDate:fromDate toDate:toDate inEventStore:eventStore withDelegate:delegate]; [eventStore saveEvent:event span:EKSpanThisEvent error:nil]; return myCalendar; } + (EKEvent *) generateEventForCalendar: (EKCalendar *) calendar fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate inEventStore:(EKEventStore *) eventStore withDelegate:(id<CalendarManagerDelegate>) delegate { EKEvent *event = [EKEvent eventWithEventStore:eventStore]; event.startDate=fromDate; event.endDate=toDate; [delegate calendarManagerDidCreateEvent:event]; [event setCalendar:calendar]; // ricerca dell'evento nel calendario, se ne trovo uno uguale non lo inserisco NSPredicate *predicate = [eventStore predicateForEventsWithStartDate:fromDate endDate:toDate calendars:[NSArray arrayWithObject:calendar]]; NSArray *matchEvents = [eventStore eventsMatchingPredicate:predicate]; if ([matchEvents count] > 0) { // ne ho trovati di gia' presenti, vediamo se uno e' quello che vogliamo inserire BOOL found = NO; for (EKEvent *fetchEvent in matchEvents) { if ([fetchEvent.title isEqualToString:event.title] && [fetchEvent.notes isEqualToString:event.notes]) { found = YES; break; } } if (found) { // esiste già e quindi non lo inserisco NSLog(@"OH NOOOOOO!!"); event = nil; } } return event; } #pragma mark - Public Methods + (BOOL) addEventForCalendarWithName:(NSString *) name fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate withDelegate:(id<CalendarManagerDelegate>) delegate { BOOL retVal = YES; EKEventStore *eventStore=[[EKEventStore alloc] init]; if ([delegate conformsToProtocol:@protocol(CalendarManagerDelegate)]) { [self requestToEventStore:eventStore delegate:delegate fromDate:fromDate toDate: toDate name:name]; } else { retVal = NO; } return retVal; } + (BOOL) addEventsForCalendarWithName:(NSString *) name fromDate:(NSDate *)fromDate toDate: (NSDate *) toDate withDelegate:(id<CalendarManagerDelegate>) delegate { BOOL retVal = YES; NSDate *dateCursor = fromDate; EKEventStore *eventStore=[[EKEventStore alloc] init]; if ([delegate conformsToProtocol:@protocol(CalendarManagerDelegate)]) { while (retVal && ([dateCursor compare:toDate] == NSOrderedAscending)) { NSDate *finish = [dateCursor dateByAddingTimeInterval:oneDay]; [self requestToEventStore:eventStore delegate:delegate fromDate: dateCursor toDate: finish name:name]; dateCursor = [dateCursor dateByAddingTimeInterval:oneDay]; } } else { retVal = NO; } return retVal; } @end In practice, on my iphone I get the log: fetch an old-one = (null) 19/12/2012 11:33:09.520 AppCampeggioSingolo [730:8 b1b] create new calendar 19/12/2012 11:33:09.558 AppCampeggioSingolo [730:8 b1b] Saved calendar EKCalendar every time I add an event, then I look and I can not find it on iCal calendar event he added. On the iPhone of a friend of mine, however, everything is working correctly. I doubt that the problem stems from the code, but just do not understand what it could be. I searched all day yesterday and part of today on google but have not found anything yet. Any help will be greatly appreciated EDIT: I forgot the call wich is [CalendarManager addEventForCalendarWithName: @"myCalendar" fromDate:fromDate toDate: toDate withDelegate:self]; in the delegate method simply set title and notes of the event like this - (void) calendarManagerDidCreateEvent:(EKEvent *) event { event.title = @"the title"; event.notes = @"some notes"; }

    Read the article

  • Add 1.6.0 Cordova plugin to 2.2.0 Cordova project

    - by BlackFlam3
    How do I add a cordova plugin made on 1.6.0 to a 2.2.0 cordova project for iOS? Upgrade the 1.6.0 project to 1.7.0, then 1.8.0 and so on (doesn't feel right)? Or how do I resolve the current callback signature on the new Cordova(2.2.0) that uses "(CDInvokedURL *)command" as parameter instead of (NSDictionary *)options? More specifically, I am trying to add the Calendar Plugin for iOS to a Cordova 2.2.0 project.

    Read the article

  • IOS4 UISplitViewController in Portrait Orientation with RootViewController showing like Landscape

    - by magic-c0d3r
    In IOS 3.2 I was able to display my UISplitViewController side by side like in landscape mode. In IOS 4.2 the RootViewController (MasterView) is not showing up in portrait mode. Does anyone know if we need to display the rootviewcontroll in a popover? Can we display it side by side like how it is in landscape mode? I want to avoid having to click on a button to show the masterview (when in portrait mode)

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >