iphone,objective-c,ios,mpmediaplayercontrollerRelated issues-Collection of common programming errors
db2
vpn sonicwall iphone l2tp ipad
A client has a Sonicwall Pro 2040 running SonicOS 3.0, and they’d like to be able to use the L2TP VPN client from their iPads to connect to internal services (Citrix, etc). I’ve enabled the L2TP VPN server on the Sonicwall, made sure to set AES-128 for phase 2, and set up the configuration on a test iPad with the appropriate username, password, and pre-shared key. When I attempt to connect, I get some rather cryptic error messages in the log on the Sonicwall:2 03/29/2011 12:25:09.096 IKE Respo
Götze
iphone ios xcode git osx
I am setting up one git client on Mac (Using Source Tree). While committing the code it is showing the following error(please check the screen-shot). Any idea to solve this error ?ERROR :
hjon
iphone core-location
Is kCLErrorNetwork “fatal”, i.e. can location still be acquired or should we tell Core Location to stop updating the location?In iOS 3.0, Core Location added an error code, kCLErrorNetwork. It is described as a “general, network-related error”. Does this mean that neither the cell network nor Wi-Fi is available and Core Location can only use GPS? Or something else?
Giffyguy
iphone
how to handle error in an iphone app ? log and exit ? show an alert dialog and exit ? for exemple, if an image is missing from the bundle..even though it should not …
kiran
iphone ipad
/Desktop/aug_9/iOSSample/iOSSample/test.m:11:10: fatal error: ‘nDCAPI.h’ file not found #include <nDCAPI.h>^ 1 error generated.I got this error even i include the file in my project Right click on project and add file to project and selected the file and selected Destination and folders i create folder references for any added folders.for adding the file into the project! I got this error /Desktop/aug_9/iOSSample/iOSSample/test.m:11:10: fatal error: ‘nDCAPI.h’ file not found#include ^1 er
Udi I
iphone monotouch xamarin
I am trying to understand the reason my app crashes, randomly it seems, when trying to present a view. The button click code:if ( d.rootNavigationController.RespondsToSelector(new MonoTouch.ObjCRuntime.Selector(“presentViewController:animated:completion:”))){d.rootNavigationController.PresentViewController(childBroswer, true,null);}else{d.rootNavigationController.PresentModalViewController(childBroswer, true);}This is the stack trace:at MonoTouch.UIKit.UIApplication.Main (string[],string,string)
PeeHaa
iphone fatal-error
Ok, I only made a minor change to a project of mine in Xcode (I just added a new .h, .m, and .xib file, they’re very small), and now it won’t run and gives me this message:”fatal error: error writing to -: Broken pipe”WTF? So I removed all the changes and tried to run it again and it STILL gives me the error, what’s the deal?
Elisabeth
javascript iphone ipad orientation
I’m having the same problem that a couple of others have had with getting the correct behavior in a web app on an orientation change, and there doesn’t seem to be an obvious solution – I’ve seen this question asked a couple of times on Stack Overflow and no one’s yet been able to answer it.When I start the app in portrait mode, it works fine. Then I rotate into landscape and it’s scaled up. To get it to scale correctly for the landscape mode I have to double tap on something twice, first to zoo
Shekhar Gupta
iphone xcode terminal
Is there some way by which I can use Xcode only to organise my code and not display errors at the time of compilation? I want that the error messages and the output get displayed in the Terminal instead. I am a college student and am learning how to program in C. I really want the error messages to be displayed in the Terminal, as they are shown there in a fairly cryptic manner, instead of the user friendly manner which is there is in Xcode.
soshiki
c# iphone mono monotouch monodevelop
I have a project set up in MonoDevelop, it compiles and runs fine for the simulator but when I try to target a device I get a compile error saying:Error 1: mtouch failed with no output (1) (ChicksnVixens-MonoTouch)And this is the last bunch of stuff the build output has (paste bin: http://pastebin.com/Ea8hgaFH):Compiling to native code /Developer/MonoTouch/usr/bin/mtouch -v–nomanifest –nosign -dev”/Users/dev/Documents/Proj/cnv/MyCode/ChicksnVixens/bin/iPhone/Debug/ChicksnVixens-MonoTouch.app””
user1118321
objective-c cocos2d-iphone
What does this error mean ? Following is my code. But I don’t see anything wrong -(id) init {if( (self=[super init] )) {CGSize winSize = [[CCDirector sharedDirector] winSize];CCSprite *player = [CCSprite spriteWithFile:@”Player.png” rect:CGRectMake(0, 0, 27, 40)];player.position = ccp(player.contentSize.width/2, winSize.height/2);[self addChild:player]; }if( (self=[super initWithColor:ccc4(255,255,255,255)] )) {}return self; }
Jim Thio
objective-c xcode4.3 autorelease
from: In which situations do we need to write the __autoreleasing ownership qualifier under ARC?( BOOL )save: ( NSError * __autoreleasing * );The compiler will then have to create a temporary variable, set at __autoreleasing. So:NSError * e = nil; [ database save: &error ];Will be transformed to:NSError __strong * error = nil; NSError __autoreleasing * tmpError = error; [ database save: &tmpError ]; error = tmpError;Okay, now the transformed code seems to work just fine. At the end I exp
Hermann Klecker
objective-c button
I have a problem with my Xcode app, When I push a button, my app crashes.Here is my button’s action, I also declared variables, strings, etc… but it isn’t in this code:{NSLog(@” – Writing Data.plist Labels”);NSString *error;NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];NSString *plistPath = [rootPath stringByAppendingPathComponent:@”Data.plist”];NSDictionary *plistDict = [NSDictionary dictionaryWithObjects:[NSArray arrayW
gadgetmo
objective-c ios xcode exc-bad-access
I have got this code which creates an image:NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; background = [[UIImageView alloc]initWithFrame:CGRectMake(150, 60, 180, 180)]; result = [[UIImageView alloc]initWithFrame:CGRectMake(150, 60, 180, 180)]; [background setImage:[UIImage imageNamed:[defaults objectForKey:@”colour”]]]; [self.view addSubview:background]; [self.view insertSubview:result aboveSubview:background];This is in my viewWillAppear. When I press a button, this happens:
borrrden
objective-c gnustep
I am new to objecive-c, i have ubuntu machine and compiling objective-c using GNUStep. I wrote the following code:#import <objc/objc.h> #import <Foundation/Foundation.h> #import <objc/NSArray.h>int main ( int argc, char ** argv) {int ar[100] = {0};int i;NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];NSArray *arr = [[NSArray alloc] initWithObjects:@”stackOverflow”, @”1″, @”2″, nil]; NSLog (@ “Counts in the array %i”, [arr count]);@try {NSString *str;str = [arr object
Brock Woolf
objective-c cocoa cocoa-touch nsstring
I have an NSString like so:@”200hello”or @”0 something”What I would like to be able to do is take the first occuring number in the NSString and convert it into an int. So that @”200hello” would become int = 200.and @”0 something” would become int = 0.
Bartosz Ciechanowski
objective-c lambda objective-c-blocks continuations structured-programming
When using methods which return blocks they can be very convenient. However, when you have to string a few of them together it gets messy really quicklyfor instance, you have to call 4 URLs in succession:[remoteAPIWithURL:url1 success:^(int status){[remoteAPIWithURL:url2 success:^(int status){[remoteAPIWithURL:url3 success:^(int status){[remoteAPIWithURL:url2 success:^(int status){//succes!!!}];}];}]; }];So for every iteration I go one level deeper, and I don’t even handle errors in the nested
Rakhe Kara
ios iphone objective-c cocoa-touch
Actually this crash is not reproducing every time, even not frequently but we got this crash in our production app. I am not sure where is the problem. It is telling crash is happening in thread 4 in Environments class line number 38.Code:NSBundle* bundle = [NSBundle mainBundle];NSString* envsPListPath = [bundle pathForResource:@”Environment” ofType:@”plist”];Line 38: NSDictionary *environments = [[NSDictionary alloc] initWithContentsOfFile:envsPListPath];But according to exception type:00000020
Musterknabe
ios objective-c
I have the following problem. I have a Model, called User. When the user now logins with Facebook, my app checks if the user exists already in the database. To not freeze the UI (since I’m coming from Android) I thought to use NSURLConnection sendAsynchronousRequest. What worked at first was the following:My User Model had a method to do the whole task of the AsynchronousRequest and then when finished would set a variable to loading. Then other classes, could simply check with while ( !user.loa
Josh Bradley
objective-c sockets bsd-sockets
Ok, I have a problem with building a socket using Objective-C. If you’ll take a look at my code below, through help with example code and other sources, I was able to build a complete socket I believe. The problem is that when I compile it, it builds fine (no syntax problems), but there are no sockets being created. As you’ll notice I’ve commented out a lot of things in Server2.m and have isolated the problem to the very beginning when I create the struct for the listeningSocket. By the way, if
Michael Petrotta
ios xcode ios7
I get this error when building my app in the latest version of Xcode:fatal error: malformed or corrupted AST file: ‘Unable to load module”/Users/me/Library/Developer/Xcode/DerivedData/ModuleCache/XYZYIE6ZV0OP/Darwin.pcm”:file not found’ note: after modifying system headers, please deletethe module cache at’/Users/me/Library/Developer/Xcode/DerivedData/ModuleCache/XYZYIE6ZV0OP’1 error generated.When I navigate to: /Users/me/Library/Developer/Xcode/DerivedData/ModuleCacheI can see that the directo
Broken Heart ?
ios xcode compiler-errors
Building an iPhone app, using:XCode 4.1 Base SDK iOS 4.3 Apple LLVM Compiler 2.1I have started getting the following error:fatal error: file’/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/../lib/clang/2.1/include/stdint.h’has been modified since the precompiled header was builtI have tried reinstalling XCode and OS X – no luck. Anyone know what’s causing this?
Götze
iphone ios xcode git osx
I am setting up one git client on Mac (Using Source Tree). While committing the code it is showing the following error(please check the screen-shot). Any idea to solve this error ?ERROR :
Abdulla
ios ipad dyld
I am building an Xcode project with Unity3D to multiple devices. The app runs fine on an iPhone 3GS, iPhone 4, iPod Touch 5, and iPad 4.Earlier builds ran fine on an iPad 1. However, the current build will not run on the iPad 1, showing the error:dyld: Library not loaded: /System/Library/Frameworks/Social.framework/SocialReferenced from: /var/mobile/Applications/F64896A2-EDCB-458A-9927-B86DF3F06E5A/myapp.app/myappReason: image not foundI have made sure that the Social.framework Framework is bein
Jeff Loughlin
ios error-handling
When something goes so horribly wrong that my app can’t continue and needs to exit, I want to pop up an alert box to the user, and then close the app when they tap the OK button. Sounds simple enough, right?But here’s the problem: my fatal error handler gets called by a 3rd party library (I don’t have their source code). I give them a pointer to my fatal error handler on initialization, and when they encounter a fatal error they simply call that routine and expect it to never return. If it r
gadgetmo
objective-c ios xcode exc-bad-access
I have got this code which creates an image:NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; background = [[UIImageView alloc]initWithFrame:CGRectMake(150, 60, 180, 180)]; result = [[UIImageView alloc]initWithFrame:CGRectMake(150, 60, 180, 180)]; [background setImage:[UIImage imageNamed:[defaults objectForKey:@”colour”]]]; [self.view addSubview:background]; [self.view insertSubview:result aboveSubview:background];This is in my viewWillAppear. When I press a button, this happens:
Daniel
ios memory-management xcode5
I am new to Objective C so this code is probably not written that well. When the app is launched, it calls the following code if it has not been saved into the phone yet. When it starts to loop through the while loop, the app crashes on any phone the is not the iphone 5s. I think this is due to the memory usage. I believe that inside the while loop, when the NSMutableString (movieTitle) is created, is where the memory spike is. I should also add that the amount of times the loop is iterated is a
user2541100
ios audiounit
I am playing sound file(.caf) that play and make sine waves like audiounit and augraph works. It is playing fine and showing sine waves perfectly in simulator. But when i run it on iPad it is not working(no sound and no waves).I have tried many things but nothing works. But i do analyse one thing that when i run it on simulator Bool value is Stereo is Yes.But when it runs on iPad is Stereo becomes NO and number of channels becomes 1 from 2.Any help would be appreciated.My code is -static OSStatu
Kara
ios xcode core-data memory
With my App I have a pre-populated sqlite DB that I created using core data from another app I created so the Data model is the same. I copy it over and everything works great. I tried it on every iOS device that can run iOS 6.0 because that is what I am building for. Even on the early iPod Touches the App works. It takes around 45 secs for the DB to copy over on the older devices. The app works all the data is there and all devices the tests were great and no issues. I released the app on
Ricardo Cerqueira
ios xcode crash cocos2d adhoc
my app runs fine on development mode, but for some reason on ad hoc i get a crash right after loading screen.I really can’t understand what could be wrong, any tips on how to test it better?Apple rejected it with this message:We found that your app failed to launch on an iPhone 5 and iPad 3rd gen running iOS 6.1.3, on both Wi-Fi and cellular networks.We encountered the issue when selecting the application on the Home screen – the app displayed a launch image then quit unexpectedly. This may be b
iDeveloper
ios simulator mpmediaplayercontroller
The simulator crashes when trying to play audio.13:22:14.211 App [2965:5603] <0xb03e7000> Error ‘!obj’ trying to fetch default input device’s sample rate 13:22:14.211 App [2965:5603] <0xb03e7000> Error getting audio input device sample rate: ‘!obj’ 13:22:14.213 App [2965:5603] <0xb03e7000> AQMEIOManager::FindIOUnit: error ‘!dev’
Jomoos
iphone objective-c ios mpmediaplayercontroller
NOTE: See the updates at the bottom.I have an application to play videos one by one from a list. So, to test this functionality, I created a simple application with only one view controller. I referenced this blog before implementing this view controller. The view controller is named TNViewController and its implementation is as follows:#import <UIKit/UIKit.h> #import <MediaPlayer/MediaPlayer.h>@interface TNViewController : UIViewController {@privateNSMutableArray *_videoArray;int _c
Web site is in building