w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
App is giving SIGABRT when running on already running simulator
This is XCode issue. Sometimes the bootstrap fails to register the application. Usually giving an error on console as Couldn't register com.compname.yourapp with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”. Solution If running on device, switch off and restart device. If running on simulator, restart your Mac.

Categories : IOS

XCode: App Won't Run on Simulator
Recently,i find out that if you have modified you /etc/hosts files and change 127.0.0.1 to another domain rather than localhost,XCode will fail to attatch the process on your simulator. Restore you /etc/hosts file may fix your problem.

Categories : IOS

Can't run app in simulator :: XCODE 5
As Michael D suggested, I got an instant answer from Dev forum. Here is the answer: Delete the app from simulator or reset the simulator. Later I got Similar issue in iPhone too. Deleting the app from iPhone will solve that issue also. This works.

Categories : IOS

iOS - Can't Build on Device but Simulator on Xcode 4.6
How are you trying to link your library in? A "-lxml2" line in your build settings? When I add my dylibs to my project, I usually do it the way you see in my screenshot. Try this and see if it works for you also:

Categories : IOS

iOS Simulator for Xcode 4.5 not copying Resources over
Go to build phases under your target and go to "copy Bundle Resources" and click the plus button and add the file, clean your build, delete the app, and run it in xcode and the file should be there.

Categories : IOS

simulator not showing after successfull build in xcode 4.6.1
ok does the simulator appear.if yes please select IOS simulator in toolbar and then 'Reset Content and Settings'.I suppose this should work and if there is the case that simulator is itself not appearing then please quit xcode and work. I suppose it will work.

Categories : IOS

Rotation of element in file on simulator in Xcode
You can fix it using - (NSUInteger)supportedInterfaceOrientations //ios 6 { return UIInterfaceOrientationMaskLandscape; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation //ios 5 { if (UIInterfaceOrientationIsLandscape( interfaceOrientation)) { return YES; } return NO; }

Categories : Iphone

Xcode: Storyboard and simulator image are different colors
On simulator menu bar from tab Debug uncheck all options and you can reset the content and settings of simulator. May it can change the color schema of simulator.

Categories : Iphone

Is there a method which runs when the simulator is closed from XCode?
I think this Apple Q&A will be interesting: Detecting the Debugger I found it mid-way through this article: Apple provided a little function to determine whether the debugger is attached here. So as soon as my application starts in the Simulator, I'll let it wait: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { #if DEBUG // Wait max. 10 secs for debugger to attach again: double waitTime = 0.0; while (AmIBeingDebugged() == NO && waitTime < 15.0) { [NSThread sleepForTimeInterval:0.25]; waitTime += 0.25; } #endif

Categories : Objective C

Run iOS 6.1 Simulator from Xcode and after launch images get a black screen
First of all check whether you have added any view controller in Tab controller. Next see if you have mentioned your ViewController class properly in the storyboard properties. Let me know if my answer is not clear

Categories : IOS

Can you install an Android Device Simulator in xcode when using Apportable
Note that it is generally much easier to work with an Android device than the emulator, but it is possible to use the emulator: ~/.apportable/SDK/toolchain/macosx/android-sdk/tools/android will launch the android tool which can create AVD's. Make sure to install the ARM EABI v7a System Image, then create an AVD with a Target of API level 17, CPU/ABI of ARM (armeabi-v7a), the SD card size of around 500 MiB, I usually choose a builtin skin of WVGA800, select the Hardware features of Abstracted LCD density of 240, Max VM application heap of 48 and Device ram size of at least 512, internal storage should be at least 500 MiB. And most of all make sure to check the box for Use Host GPU. to run the emulator: DYLD_LIBRARY_PATH=~/.apportable/SDK/toolchain/macosx/android-sdk/tools/lib/ ~/.appor

Categories : Android

Running both Xcode 4.6 and Xcode 5 (DP5) - Homebrew showing an error
You don't need to reinstall Xcode. Go to Xcode preferences menu and click on downloads. You will see option to install "Command Line Tools" under Components. After that's installed homebrew stops complaining.

Categories : Ruby

Xcode project crash in iPhone Simulator without reaching didFinishLaunchingWithOptions
There's a new bug with OSX 10.8.4 and Xcode. It'll crash due to thread race conditions on trying to kill the previous app running. If you don't update to 10.8.4 it's not an issue. It's annoying, and you'll have to wait ~5 seconds after stopping the current app before re-running. https://devforums.apple.com/message/823939#823939

Categories : Xcode

How do I force the Xcode compiler to ignore a library when building for the iOS simulator
In XCode, you can configure a separate library list for each iOS/simulator sdk. Here are the step to configure this: Click on your peoject->Target->Build Settings->Linking->Other Linker Flags Click "+" for your build configuration (e.g. Debug) under Other Linker Flags. For the new entry under your build configuration select "Any iOS Simulator SDK" and remove the library that you don't want to link. You can add as many entries as you want by clicking the "+" button on the build configuration and configure the libraries that you want for any particular sdk. Same technique can be applied for other settings in XCode for a target.

Categories : Xcode

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators
Looks like this is a known issue. From the Xcode 5 release notes: After switching the minimum deployment target of an application from iOS 7.0 to a release prior to iOS 7.0, building and running the application may fail with the message “iOS Simulator failed to install the application.” Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023 Another release note: iOS Simulator If an iOS app is detached, relaunching the same app from Xcode will result in a black screen in the Simulator even though the new app is launched. Terminate the app in the Simulator or relaunch it for the second time. 14648784

Categories : Xcode

Put Xcode files into new folder. Since then, I encounter the following errors when building project in simulator
Go into your project settings, check out the field 'Library Search Paths', and edit it so that it reflects where you moved your code/libraries. The error you're running into here is the linker can't find the Google Analytics library that your app is set up to link against (because you moved it).

Categories : IOS

iOS working in simulator, on iphone via xcode but crashes when copying the archive via itunes
Ok, now i did a: I checked the application:didFinishLaunchingWithOptions: in the appDelegate. Not sure, if it matters, but the the name of the initialized Controller did not match exactly the name it was given during the initializiation. So it set them equal. Made a "Clean" Made a "Build for Archive" Archived it and gave it a different name than before Copied it, and it worked Which step solved the problem, i do not know... but, at the moment, i don't care about it ;-) Thanks for your hints.

Categories : IOS

Audio element works fine in Safari but breaks in XCode Simulator (web view)
It seems iOS has some limitations when it comes to HTML5. It appears to be difficult to have more than one audio element and play the second audio element while the first audio element is playing in the background. I have solved the problem by using AVAudioPlayer instead, I use JavaScript to notify the view controller of the web view when I want to play a sound.

Categories : Javascript

Don't launch simulator when running unittests
You can create a Mac OSX Unit Test instead of an iOS unit test. This requires that you not include any iOS specific libraries in the unit tests though. You can do this via the following: Select the project -> the target drop down -> "Add Target..." Select "Mac OSX" -> "Other" -> "Cocoa Unit Testing Bundle" Create the testing bundle as you would a normal project You can now add sources to the unit test and run it like an iOS test without launching the simulator.

Categories : IOS

Running python code with openflow simulator
Finally I figured it out: net.addLink( s2, s3 ) net.start() net.configLinkStatus( 's2', 's3', 'down' ) net.configLinkStatus( 's2', 's3', 'down' ) should be put after net.start(). Also I should pass 's2' 's3' instead of s2 s3 to net.configLinkStatus().

Categories : Python

library not found for -lxml2 Only when running on Device, not Simulator
Try following steps: For your project target, select "Build Phases" tab Under "Link Binary With Libraries", click "+" In the dialog, search "xml" and select "livxml2.dylib" from the result Click "Add" Build your application

Categories : Iphone

Can you check performance of a program running with Qemu Simulator?
Investigation in this issue at our company concluded that Qemu (for the ARM) is not cycle accurate. If I remember correctly cycle accuracy is not a goal of Qemu, instead it aims at fast emulation. Beware also that exact timing is dependent on quite unpredictable things like cache hits and misses. It will also depend on the actual architecture chosen. Note that ARM is merely an instruction set IP and several different implementations exist. If in addition an operating system is emulated, things get even more unpredictable. We use the simulator from ARM to evaluate performance, but even that one is not fully cycle accurate for the latest versions of the ARM architecture.

Categories : C

App crash when running on iPhone 4.3 simulator after calling initWithNibName
FavoritesActivityViewController *favorites = [[FavoritesActivityViewController alloc]initWithNibName:@"FavoritesActivityViewController" bundle:nil]; [self.view addSubview:favorites.view]; Try this code...

Categories : Iphone

App with UITableView runs on iPad simulator but crashes on the iPhone simulator
Your problem is this piece of code: [cells addObject:[table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:j]]]; especially the part were you try to get a cell from the tableView, cellForRowAtIndexPath:. This method does not guarantee that a cell will be returned. If a cell is not visible this method will return nil. This probably works on iPad because due to the larger screen size all your cells are visible. On iPhone not all cells are visible at the same time so cellForRowAtIndexPath: will return nil for some of your indexPaths. Get your data from the dataSource, not from the tableView. The tableView is a view, it does not store data.

Categories : Iphone

Replace Python object with Mock object when running simulator
For mocking a class, you can use mock.patch: % python ./gmail.py .. Ran 2 tests in 0.033s import unittest class GmailSender(object): def __init__(self): pass def Send(self, title, body): """ Send mail to gmail """ content = "{0} with {1}".format(title, body) return content class testGmail(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_send(self): gs = GmailSender() self.assertEqual("A with B", gs.Send("A", "B")) pass def test_mock_send(self): from mock import patch with patch('__main__.GmailSender') as gsmock: gs = GmailSender() gsmock.return_value.Send.return_value = 'B with A' self.assertEqual("B with

Categories : Python

Xcode stays on "Running" but don't run my app
Have you tried resetting the simulator? iOS Simulator Menu > Reset Content and Settings If that didn't work, change the debugger of your application to none. In Xcode: Your app scheme > Edit Scheme > From the side menu choose "Run yourapp.app" > Info tab > From the debugger menu choose "None" Then try running your application.

Categories : Xcode

Running/Debugging an app on Xcode as root user
I think running things as root is typically not advised, and I think that you wouldn't be able to get special write access on an actual device, but you could try logging in as root on your mac and launching Xcode from there. I have not tried it, but it may enable the "Run as root" option

Categories : IOS

Too many views in storyboard - Xcode running Slow
I faced the same issue when I was working on an Enterprise App. In the Project I had only one storyboard and all views in a single storyboard. Opening the storyboard caused Xcode to get very slow. So I divided the storyboard into multiple storyboards as module-wise and load a separate storyboard per module like in the code below: If I want to push a view controller: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"storyboardName" bundle:nil]; UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"Members_ViewController"]; [self.navigationController pushViewController:viewController animated:YES];

Categories : IOS

Runtime Error Xcode running PARSE
You need to provide a proper data source for your UITableView. Somewhere you have a UITableView and you have pointed it at a data source. That class must implement tableView:cellForRowAtIndexPath: and return a proper UITableViewCell. See https://www.parse.com/docs/ios/api/Classes/PFQueryTableViewController.html#//api/name/tableView:cellForRowAtIndexPath:object:

Categories : Objective C

Running App with Xcode takes long time to launch
When you run app with XCode, debugger (LLVM or GDB) is attached. Debugger definitely cosumes a lot CPU and memory resource. So it may delay threads starting by the apps. Futhermore debugger may open some extra files, resulting in the log telling you that you used up 25 files.

Categories : Xcode

iOS 5.1 App running with xcode 4.6.2 with target iOS 5.1, not able to restrict some views from orientation?
In your view controller(s) where you want to restrict your orientation I would do the following: -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return interfaceOrientation == UIInterfaceOrientationLandscape; } Regarding your iPhone 5 the shouldAutorotateToInterfaceOrientation was deprecated with iOS6 so you're going to have to do an OS check and implement/override the supportedInterfaceOrientations and preferredInterfaceOrientationForPresentation methods instead.

Categories : Iphone

Running PyObjC application (built in Xcode) on previous version of Mac OS?
Good question. I wrestled with this for an embedding problem a few years ago and ended up dynamically linking against a specific version that I knew was available on every platform. I had assumed originally that the Python.framework's Current would be adequate, but it seems to get resolved at link time by Xcode, therefore making the link specific to a particular version. For my purposes, I was able to link directly to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/Python Which works for OS X 10.7 and 10.8. If you need to go back to 10.6, you'll want to try linking to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/

Categories : Python

Team City CI with Xcode workspace - Scheme "My Scheme" is not configured for running
I found solution. The problem was about poor support of SenTestKit with xcodebuild command. To make it works I had to go Edit Scheme menu and set Run step so the test scheme became runnable. Thanks for solution this article. There're few things was actually different, it is a Test After Build setting and macros. In my case it runs test only with YES option and I did not have to write any macros. Mb they fix the issue that was described in the article.

Categories : IOS

How to run an app after running an xcode clean and clean build folder where the app now crashes
First, certain files get cached even with 'Clean Build Folder', especially for simulator. Files (especially derived nibs and images) can be left that have been deleted in the project. Command-Option-Shift-K to clean out the build folder. Quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually. In the simulator, choose iOS Simulator > Reset Content and Settings. Now if it fails, it is because your code was only working because of over-cached build files. If this is the case, check where your rootViewController is pointing.

Categories : Iphone

NSTask launch path not accessible. Works in Xcode. Error shown out of XCode
OK turns out the answer is on stack overflow, but its spread across different questions. The question was asked here -> Commands with NSTask and here -> NSTask launch path not accessible as well But their answers as of this date arent clear as to what the problem was. It's only after reading the question from NSTask not picking up $PATH from the user's environment (the question's title was misleading) and with these two answers NSTask not picking up $PATH from the user's environment and Find out location of an executable file in Cocoa that I realized the solution. It looks like this is about setting up either NS Task or the user's shell (e.g., ~/.bashrc) so that the correct environment ($PATH) is seen by NSTask. Solution: [task setLaunchPath:@"/bin/bash"]; NSArray *ar

Categories : Objective C

Xcode 4.6 doesn't recognize linked frameworks correctly for Xcode 5.0 created project
The link binary with libraries is not the issue here. You have to confirm your Header Search Paths in your build settings. I think Xcode 5 might use a different variable for it, and that is why Xcode 4.6 will get confused (just a guess though). Anyway, confirm that the path to those headers is in your Header Search Path. The Crashlytics app will automatically add it for you, actually.

Categories : IOS

How to open project files with Xcode 4 by default while having Xcode 5 installed alongside
Assuming you don't have any Xcode 5 projects yet, how about manually: Find an existing XCode 4 project (*.xcodeproj) with the Finder Do a Get Info of the file Change Open with: to your desired version of Xcode Click on Change All Repeat for all types of files that you want to open with XCode 4 Or if you want to try something more automatic take a look at: programmatically-script-atically-changing-the-default-open-with-setting Based on the comment below, the problem seems to be with command line builds picking the wrong version of Xcode. In that case I suggest looking at: xcode-build-and-archive-from-command-line, especially the Reid's comment to his own answer which says: Works fine in Xcode 4.4, and I'm sure it was fine in 4.3 as well. Make sure you have selected the corre

Categories : Misc

AppleScriptObjc - Xcode 4.6.3 - Xcode No Longer Recognizes Created Outlets or Actions
I'm usng OS X version 10.8.4 with Xcode 4.6.2. I tried out what you said. I made a new AppleScriptObjC project from the Xcode template with document-based application set to false, so Xcode create a new project for me with an AppDelegate. I got the actions for the AppDelegate class to work both tying menu-items to First Responder and tying them directly to the AppDelegate. I tried changing the name of the app delegate to "ThisIsTheDelegate". This didn't work until I also changed the name of the AppDelegate class to be "ThisIsTheDelegate" in Xcode's identify inspector. I don't know if this is the problem that you are having or not. You wrote in your original question that: tried on different computer - issue resolved So it must be something about your configuration. When I fir

Categories : Misc

Mono + Xcode: How to author a library in C# using Xamarin Studio, and consume it in a CocoaTouch project within Xcode?
No, it is not currently possible to consume a C# library from Objective-C. Note that it is usually possible to do it the other way with some ingenuity - the only real requirement is that the app must be a Xamarin.iOS app and the entry point the managed Main method. In your Main method you can call into native (C/Objective-C) code and have all your logic there.

Categories : Objective C

Undefined Symbols for custom C++ classes in Xcode 4.6.3. Works in Xcode 4.5.2
I had faced similar problem, and here is what I did to solve: 1 - Specify -fobj-arc flag against respective mm file in Build Phases section (this is optional and may not work always) 2 - Ensure that wherever .mm (or it's .h file) is included, that source is also marked as Objective-C++ Source and vice versa. I know it's bit tricky to do trial and error, but the basic principle is to maintain same compilation options for the file tree being included.

Categories : Misc



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.