xcode4

How do I expand stack traces in XCode 4

两盒软妹~` 提交于 2019-12-03 23:03:52
XCode 4 has a really stupid feature that "summarizes" stack traces in the debugger by showing the first and last two items in the call stack. Does anyone know how to eliminate the dotted line and show the useful information? If you want to see the entire stack trace, drag the slider at the bottom left of the debug navigator (below the stack traces) all the way to the right. It's not simply showing the first two and the last one, though. Rather, it's showing the top and bottom of the stack, as well as any code that comes from your application. The assumption is that you often don't care about

How to get date and time of selected time zone from uipicker in Xcode

随声附和 提交于 2019-12-03 22:36:32
问题 I'm trying to display date and time of selected time zone from uipicker in a label or text field I'm not getting any way to solve this problem, so please any one help me Thanks in advance. SelectedTimeZone= [Weight objectAtIndex:[pickerView selectedRowInComponent:0]]; NSString *selectedzone = SelectedTimeZone; NSCalendar *gregorian=[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; [gregorian setTimeZone:[NSTimeZone timeZoneWithName:selectedzone]]; NSDateComponents

Mix Objective-C and C++ and OpenCV

情到浓时终转凉″ 提交于 2019-12-03 22:21:35
I'm coding an iPhone app and I'm using OpenCV for some image processing. I have only used it in plain C so far but now I need to use C++ to create some basic OCR. I first created a .h/.cpp file and it seems to compile fine. But I need to mix this with some Objective-C to open images and so on. I then renamed the file to .mm instead for .cpp but it won't compile! I get this error: "Statement-expressions are allowed only inside functions" in OpenCV core.hpp line 432 Line 432 is this line: typedef Matx<_Tp, MIN(m, n), 1> diag_type; Any ideas why this might happen? I had the same issue. I imported

Apple Mach-O Linker errors and I don't know what to do

天涯浪子 提交于 2019-12-03 19:11:07
问题 I cannot compile my project for the device or simulator anymore. I get 13 Apple Mach-O-Linker errors. It all started after I failed attempt to use sharekit. Here is the log from the error: ld: warning: directory not found for option '-F/Users/bbrandy95/Documents/Broken Brandsonic Web Projects/Brandsonic Web mobile/../../Downloads/0.2.1gm1/iphoneos4.0/System/Library/Frameworks' Undefined symbols for architecture armv7: "_OBJC_CLASS_$_NSURLRequest", referenced from: objc-class-ref in Brandsonic

How to create dSYM file in XCode 4?

天涯浪子 提交于 2019-12-03 18:26:32
问题 Can you please let me know how can I create .dSYM file using XCode 4? Thanks! 回答1: If you archive the application the dsym file is in the xarchive. Right-click on the entry in the organizer, do "show in finder", right click on the xarchive and choose "show package contents". The dsym is in the dSYMs directory. 回答2: Update for Xcode 4.3.1 For me there was 2 build settings I had to edit and I had to edit them in the PROJECT and in the TARGETS sections before XCODE would generate dSYMs. 1) Build

Remove default code snippets in XCode 4

两盒软妹~` 提交于 2019-12-03 17:47:31
问题 I want to delete some of the default code snippets in XCode 4 because I want the beginning curly brace to start on a new line. I tried the following but XCode 4 does not seem to adhere to the rule. defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict BlockSeparator "\\n" Any suggestions? Thanks. 回答1: The following has worked with my XCode 4 installation: defaults write com.apple.Xcode XCCodeSenseFormattingOptions '{ "BlockSeparator" = "\n" ; }' 回答2: The "defaults write" commands

XCode 4 User Script

青春壹個敷衍的年華 提交于 2019-12-03 17:24:19
I use XCode for one year, and I made a user script in Python. This script gets the all document, gets the cursor position thanks to %%%{PBXSelectionStart}%%%, does some very useful stuff, and replaces all the current document, without moving the cursor. It works fine. But I upgraded to XCode 4 and it's seems that the user scripts are not supported! How can I continue to use my script ? (I try with automator but I can't use the %%%{PBXSelectionStart}%%% variable for the cursor position and I must select all the document in XCode...) Thanks in advance! Yes, it seems like Apple dropped user

managedObjectContext is nil

喜你入骨 提交于 2019-12-03 17:20:27
I'm trying to add Core Data to an existing project. I've: 1)added the Core Data framework 2)added the accessors and properties to the AppDelegate 3)created the data model file Now when I try to call NSManagedObjectContext *context = [self managedObjectContext]; from a view controller the context is nil and the managedObjectContext never fires. Here is the AppDelegate: #import "XXXAppDelegate.h" #import <CoreData/CoreData.h> @implementation XXXAppDelegate @synthesize window=_window; @synthesize navigationController=_navigationController; @synthesize managedObjectContext = _managedObjectContext;

“Test After Build” option in XCode 4 not working

谁说胖子不能爱 提交于 2019-12-03 16:08:53
问题 So, I am having a bear of a time figuring this one out. I have looked around, and cannot seem to find any information on this. What I want to do is have my unit tests ALWAYS run EVERY time I build my code in XCode. I have read a number of posts, including this question here. I have followed the instructions to the letter, and the build will not run the tests. What I have done: My Test suite is a target dependency of my main build My main build has "Test After Build" set to Yes All of the

Use database (such as sqlite) with cocos2d-x

こ雲淡風輕ζ 提交于 2019-12-03 16:06:43
I am starting to build a gaming application on iphone. I am using cocos2d-x game engine, since it is easy to port to android from there. Also the coding is in C++, which I am very much familiar with. I want to know if there is a way to use any database with cocos2d-x. Although sqlite is preferred but not mandatory. I will have about 1/2 mb of data in the database. So, yes I have thought about keeping/using an in-memory database too, but I want my read/write queries to be time efficient. I have looked up at some of blogs, which suggest that I may need to use a C++ wrapper for sqlite. The