'NSInternalInconsistencyException', reason: 'Error while inserting data. 'not an error''
from iPhone Programming 2010/04/07 15:05해결법: DB 스키마 중 Primary 키 옵션이 있는 필드에 autoincrease 옵션을 On으로 설정하면 됨.
'iPhone Programming'에 해당되는 글 14건
'NSInternalInconsistencyException', reason: 'Error while inserting data. 'not an error''from iPhone Programming 2010/04/07 15:05
아이폰 SQLite 사용할 때 하기와 다음과 같은 메세지가 나올 때가 있다.
'NSInternalInconsistencyException', reason: 'Error
while inserting data. 'not an error'' 해결법: DB 스키마 중 Primary 키 옵션이 있는 필드에 autoincrease 옵션을 On으로 설정하면 됨. ![]() #1. 앱스토어 수익금 2차기부 하였습니다. 이번에는 철철이오빠입니다. 감사합니다. 댓글을 달아 주세요
UIWebView 클래스를 이용하다보면,
가끔 로딩한 웹뷰 컨텐츠 내에서 어떤 이벤트가 일어나는지 가로채고 싶을 때가 있습니다. 예를 들면, Resource 폴더 내에 내가 원하는 .html 파일을 넣고, 그 폴더에서 Get 방식으로 파라미터를 특정 서버에 전달하는 경우에 정작 사용자가 만든 프로그램 내에서는 이 이벤트가 어떻게 서버로 흘러 들어가는지를 포착하기가 어려운 것이 현실입니다. UIWebView는 로딩만 할뿐, 안에 로딩된 컨텐츠가 어떻게 전달되는지는 미궁이겟죠.. 그러나 역시나 이러한 이벤트에 대한 사용 가능한 함수가 있었네요. 이용법은 다음과 같습니다. @interface WebBrowserTutorialAppDelegate : NSObject <UIWebViewDelegate> { 댓글을 달아 주세요
#1. Including below classes
@interface UIProgressIndicator : UIActivityIndicatorView { } + (struct CGSize)size; - (int)progressIndicatorStyle; - (void)setProgressIndicatorStyle:(int)fp8; - (void)setStyle:(int)fp8; - (void)setAnimating:(BOOL)fp8; - (void)startAnimation; - (void)stopAnimation; @end @interface UIProgressHUD : UIView { UIProgressIndicator *_progressIndicator; UILabel *_progressMessage; UIImageView *_doneView; UIWindow *_parentWindow; struct { unsigned int isShowing:1; unsigned int isShowingText:1; unsigned int fixedFrame:1; unsigned int reserved:30; } _progressHUDFlags; } - (id)_progressIndicator; - (id)initWithFrame:(struct CGRect)fp8; - (void)setText:(id)fp8; - (void)setShowsText:(BOOL)fp8; - (void)setFontSize:(int)fp8; - (void)drawRect:(struct CGRect)fp8; - (void)layoutSubviews; - (void)showInView:(id)fp8; - (void)hide; - (void)done; - (void)dealloc; @end #2. Declaration of an instance UIProgressHUD *progressHUD; #3. Using method in UIViewController [self showProgressIndicator:@"Detecting"]; #4. Showing and hiding method - (void)showProgressIndicator:(NSString *)text { //[UIApplication sharedApplication].networkActivityIndicatorVisible = YES; self.view.userInteractionEnabled = FALSE; if(!progressHUD) { CGFloat w = 160.0f, h = 120.0f; progressHUD = [[UIProgressHUD alloc] initWithFrame:CGRectMake((self.view.frame.size.width-w)/2, (self.view.frame.size.height-h)/2, w, h)]; [progressHUD setText:text]; [progressHUD showInView:self.view]; } } - (void)hideProgressIndicator { //[UIApplication sharedApplication].networkActivityIndicatorVisible = NO; self.view.userInteractionEnabled = TRUE; if(progressHUD) { [progressHUD hide]; [progressHUD release]; progressHUD = nil; AudioServicesPlaySystemSound(alertSoundID); } } 댓글을 달아 주세요![]() #1. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=325898952&mt=8 #2. 두번째 앱스토어 등록프로그램이 금일부로 Ready in sales 상태로 전환이 되었습니다. 애플의 QA 기간이 다소 길었고, 유료 어플이였는지 다소 신중한 것 같은 느낌이랄까. #3. 프로그램 개요 본 프로그램은 네트워크 카메라 마켓 쉐어 1위인 Axis사의 카메라를 아이폰을 통해 원격지에서 볼 수 있는 프로그램이고, 아이폰에 빌트인 되어있는 터치 센서, 가속도 센서를 통해서 원격지 카메라를 PTZ(panning, tilting, zooming)할 수 있는 기능을 담고 있습니다. 계정은 프로그램당 한개의 카메라를 붙일 수 있고, 기회가 되면 가격을 더 올려 멀티 카메라를 볼 수 있도록 할 생각만(?) 가지고 있습니다. 사실상 하드웨어 디펜던트한 프로그램이기 때문에 개인들의 수요는 고려하지 않은 상태입니다. #4. 카테고리는 Utility, 유료 어플 $3.9. #5. seller의 이름은 센터장님입니다;;;; #6. 개발 모듈은 사파리 객체, axis 카메라 http api, 아이폰 가속도 센서 클래스, 터치 센서 클래스를 이용하였고, 자세한 테크니컬 이슈는 비밀입니다.;;;;;;;;; 댓글을 달아 주세요
출처: http://www.technolosophy.com/2009/08/xcode-iphone-os-301-error-in-o.html
the solution: 1) open a terminal window as administrator. 2) change to the directory in question to minimize errors when typing long paths in commands: cd /Developer/Platforms/iPhoneOS. 3) once in the directory /DeviceSupport check for a pre-existing link for 3.0.1. type ls -l to list the contents of /DeviceSupport. if a link for 3.0.1 is present and you're still getting the error in Xcode/Organizer then the 3.0.1 link was not correctly created and must be removed and recreated. example of incorrect 3.0.1 link: lrwxr-xr-x 1 user admin date 5 11:27 3.0.1 -> 3.0 remove the incorrect link: rm 3.0.1 ls -l to double check that you really removed 3.0.1. 4) now we need to create the link for the new OS 3.0.1 to point back to the root OS 3.0 (7A341). ln is the link command, so type: ln -s 3.0\ \(7A341\) 3.0.1 after you hit return the command line prompt should show no message. simply list the directory contents onece more to ensure that we created the link properly. you should see the following entry in the directory listing when you enter ls -l: lrwxr-xr-x 1 user admin date time 3.0.1 -> 3.0 (7A341) 5) restart Xcode and *BANG* your iPhone will appear as normal sans error and is ready to install your provisioning apps.
Tag // XCODE
댓글을 달아 주세요
#1. NSString의 비교
비교 연산자로 해보니 이상하게 안됨;;;;; NSString *testString; if(testString ==@"YES") NSString *testString; if([testString isEqualToString:@"YES"]) 댓글을 달아 주세요Creating an universal static OpenCV library with iPhone supportfrom iPhone Programming 2009/07/03 15:29
출처: http://ildan.blogspot.com/2008/07/creating-universal-static-opencv.html
We will create a minimal static universal OpenCV library with 3 architectures: Intel, PowerPC and Arm for the iPhone. I've been testing it on Leopard but it should work on any Mac OS X version. First checkout or untar the OpenCV sources in the opencv directory. Then, on the same level (not inside) create a build directory with 3 subdirectories: ppc, i686 and armv6. (Download the code from Sourceforge) Then set the global configure settings: $ export CONFFLAGS="--without-imageio --without-python --without-swig --disable-apps --disable-dependency-tracking --without-carbon --without-quicktime --enable-shared=no --without-gtk"in the ppc dir: $ ../../opencv/configure ${CONFFLAGS} --host=ppc-apple-darwin9in the i686 dir: $ ../../opencv/configure ${CONFFLAGS} --host=i686-apple-darwin9in the arm dir: $ ../../opencv/configure ${CONFFLAGS} --host=arm-apple-darwin9 CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-g++-4.0.1 CXXFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" CXXCPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cppthe last one is tough, so let's see the variables one by one: CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-g++-4.0.1Ok. Now for the universal static libs: $ lipo -create i686/cv/src/.libs/libcv.a ppc/cv/src/.libs/libcv.a armv6/cv/src/.libs/libcv.a -output libcv.a That's all. Oh, try $ make -j 2 댓글을 달아 주세요출처: http://knol.google.com/k/usman-ismail/iphone-sdk-application-preferences/34oprzanmpe7q/8#Step 1: Create a Sample Application I have used an application similar to the one created in the tutorial presented here (IPhone SDK Hello World). Step 2: Create a Settings BundleCreate a new File Command + N and then select Settings from the side menu and Settings Bundle. The file must be named Settings.bundle to work correctly. This will create two new files Root.strings and Root.plist. Open the Root.plist file and you should see the following screen listing some sample settings. This is actually a graphical representation of an XML file which defines the settings and how they are displayed. (You can see the xml code by right clicking the file and selecting Open as Plain Text) Step 3: Define Settings SchemaThe Root element has three child elements (1) Title; which defines the title of this settings view and is set to the name of the application. (2) StringTable; which is not covered in this tutorial. (3) PreferenceSpecifiers which contains all the settings we wish to elicit from the user. PreferenceSpecifiers has type Array and has a child element of type Dictionary for each setting: Item 1, item2 and so forth. We can add items by selecting PreferenceSpecifiers and clicking the Grey button at the end of the row. Each setting has several properties of type string including the common required properties; Title and Type (Note all strings are case sensitive). The title defines the label displayed beside the control used to modify the setting and type defines the type of control used. There are seven possible controls which can be selected using the Type property: PSGroupSpecifierThis is the simplest control and has only the two properties defined described above. It is used as a separator to break-up groups of similar settings. It cannot accept any input from the user.PSTitleValueSpecifierThis displays a "Read Only" setting it cannot accept input from the user but can be used to display settings changed elsewhere.Key:This
is a String property which can be set to any text, the text is used as
a key to map to the value that a user will enter into the control. DefaultValue:Another String property which can store any text, this defines the Text that will be displayed in the specifier.PSTextFieldSpecifierThe next type of control is the TextField, it has some additional properties which are listed belowKey:This
is a String property which can be set to any text, the text is used as
a key to map to the value that a user will enter into the text field.
DefaultValue:Another String property which can store any text this defines the initial Text that will be entered into the TextField when it is first loaded.IsSecureThis is a boolean property which defines if the charecters of the text field will be hidden, set to enabled for password fields.KeyboardTypeA String property which can have one of the following values: Alphabet, NumbersAndPunctuati on, NumberPad, URL, EmailAddress. This property specifies which type of keyboard to display when text field is selectedAutocapitalizationTypeA String property which can have one of the following values: None, Sentences, Words, AllCharactersAutoCorrectionTypeA String property which can have one of the following values: Default, No, YesPSSliderSpecifierThis displays a slider on a bar which allows the user to select a number in a specified range. In addition to the standard Title and Type specifiers the Slider has the following properties.Key:This
is a String property which can be set to any text, the text is used as
a key to map to the value that a user will enter into the control. MinimumValueA property storing a numerical value which corresponds to the slider being on the left end of the bar.MaximumValueA property storing a numerical value which corresponds to the slider being on the right end of the bar.DefaultValue:A numerical property which defines the original position of the slider.PSToggleSwitchSpecifierDisplays a toggle switch which can be either On or Off. Key:This
is a String property which can be set to any text, the text is used as
a key to map to the value that a user will enter into the control. TrueValue:A boolean property which defines the value of the control of the toggle button is in the On position.FalseValue:DefaultValue:A boolean property which defines the position of the Toggle button the first time it is loaded.PSMultiValueSpecifier
Key:This is a String property which can be set to any text, the text is used as a key to map to the value that a user will enter into the control.Values:A property of type Array which stores sub-elements of type String, each element provides a a pos sible value for the control to take.Titles:A property of type array which stores sub-elements of type String, each element provides a textual representation of one of the values specified in the previous property. For example if the first element of the values array is "01" and the first element of the titles array is "January" then the user is shown January but if January is selected the value stored for the control is 01.DefaultValue:Another String property that defines the initial value of the control, should be one of the elements of the Values list.PSChildPaneSpecifierKey:This is a String property which can be set to any text, the text is used as a key to map to the value that a user will enter into the control.File:The name of another plist file without the extension.Step 4: Retrieving Values of SettingsYou can retrieve the value of a setting by using the command given below; Replace the hilighted text with the name of the setting you want to get the value of.NSString* settingValue = [[NSUserDefaults standardUserDefaults] stringForKey:@"<Setting Key>"] Step 5: Loading a Child PaneThe final of the Seven Controls allows you to add a sub view. The procedure to do so is to add a new file Command + N and select Other from the menu on the right Property List from the list of fle types. Create a child prefernces schema exactly as you created the original schema. No in the original schema add a PSChildPaneSpecifier and add a File item to the specifier with the file name of the child view (less the extension). Technically this should be enough but as you will see if you run your code now the child view will not load. To load your child view the child plist file has to be inside the settings bundle but I can't find a way of doing this from within XCode (after half an our of random tinkering). So just open a terminal and move the file into the bundle manually. To do this browse to the directory containing your xcode project, and find child.plist file (or whatever you named it). Use mv child.plist Settings.bundle/child.plist to move your file and then click Build and Go in XCode. If there is some way of moving files into the bundle through XCode that you know of please leave a coment and I will update this document. Concluding NoteThis document is a bit raw please leave feedback in case anything is not clear, you have some suggestions or if you spot any mistakes. You can find the source code of the example at my website; Source Code Appendix A: NSLogsTo see the NSLog output generated by clicking the "Load Preferences" button in the sample code click the highlighted button in shown in the figure. It will open the log output window. 댓글을 달아 주세요![]() #1. 상용 아이폰 어플리케이션 제작을 위해 킥오프 식으로 개발해본 아주대학교 정보를 제공하는 어플리케이션을 개발하였습니다. 개발기간은 개발에 든 시간이 약 4일 정도, 디자인 작업 및 itunes 커넥션 행정 처리가 조금 오래걸렸구요. 지금 다니는 직장 계정으로 등록을 한 상태라 Seller 정보는 제 명의가 아닌 회사 명의로 들어갔습니다..ㅡㅡ #2. 우선 메뉴 구성은 기존의 xcode에서 제공하는 기본 메뉴 타입인 탭바 타입을 이용하였고 크게 5개의 구성으로 이루어져있습니다. 가장 좌측의 about 메뉴는 아주대학교에 대한 정보를 담고 있습니다. 연혁, 교가듣기(;;;;;), 건학 이념, 심볼 등을 담고 있구요. 다음 bus 메뉴는 야심차게 크로울링한 메뉴인데 학교앞 버스 정류장에 현재 도착 예정인 버스의 실시간 정보를 알려주는 아주 야심차게 기획된 메뉴입니다;;;;다음은 레스토랑 메뉴로 학교내 구내 식당의 오늘의 메뉴를 긁어와서 구내에서 밥먹을때 오늘의 메뉴가 뭔지를 보여주는 메뉴입니다. Library 메뉴는 학교 도서관 열람실의 빈자리 좌석수에 대한 정보를 긁어오는 메뉴입니다. 마찬가지로 웹 크로울링이 주를 이루구요. 마지막 Visiting은 아주대에 오는 방법에 대한 버스 정보등을 담은 메뉴입니다. #3. 어플리케이션 타겟은 주로 아주대 재학생, 방문객을 위한 정보입니다. #4. Of course it's free #5. 스킴은 주로 웹크로울링이고 인터넷 연결이 안될때에는 어플이 실행이 안되는 단점이 있지효. 그리고 네트웍 상황이 안좋을시에는 어플이 자주 돼집니다..꿀꿀 #6. 앱스토어에 올리자마자 구글링을 해봤는데 벌써 10건이 걸리네요. 로봇이 있어서 실시간으로 애플 사이트를 긁나봅니다;;;;; http://www.google.com/search?client=safari&rls=ko-kr&q=iajoulife&ie=UTF-8&oe=UTF-8 #7. Down URL: http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=314166026&mt=8 #8. 자...이제 유료 어플로 점프-업 해볼까욤?;;;; 댓글을 달아 주세요
|
||||||
댓글을 달아 주세요