2012-01-31 13 views
3

iTunesは私のアプリケーションを拒否しましたので、私はそれを変更する必要があります。私はそれをやっているし、今私はエミュレータでアプリを起動することはできません。ビルドに失敗しました:シンボルが見つかりません

Ld /Users/user/Library/Developer/Xcode/DerivedData/emars-hgjxnbewvbrekiepjbfkvodcrvtk/Build/Products/Debug-iphonesimulator/emars.app/emars normal i386 
    cd "/Users/user/TRAVAIL/MMW/iphone application V1.0/e-mars" 
    setenv MACOSX_DEPLOYMENT_TARGET 10.6 
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/emars-hgjxnbewvbrekiepjbfkvodcrvtk/Build/Products/Debug-iphonesimulator -F/Users/user/Library/Developer/Xcode/DerivedData/emars-hgjxnbewvbrekiepjbfkvodcrvtk/Build/Products/Debug-iphonesimulator -filelist /Users/user/Library/Developer/Xcode/DerivedData/emars-hgjxnbewvbrekiepjbfkvodcrvtk/Build/Intermediates/emars.build/Debug-iphonesimulator/emars.build/Objects-normal/i386/emars.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Objc -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework SystemConfiguration -lz.1.1.3 -o /Users/user/Library/Developer/Xcode/DerivedData/emars-hgjxnbewvbrekiepjbfkvodcrvtk/Build/Products/Debug-iphonesimulator/emars.app/emars 

そして、ここが最後です:

Undefined symbols for architecture i386: 
    "_OBJC_IVAR_$_UIViewController._title", referenced from: 
     -[FirstViewController viewDidLoad] in FirstViewController.o 
ld: symbol(s) not found for architecture i386 
collect2: ld returned 1 exit status 

多分それは私が含まれていない1つのライブラリが必要です(私は停止しました...たくさん以来のライブラリ)について

EDITを扱う:エラーが新しいコードから来ている私は変更しましたので、ストアでアプリを拒否した場合

は、この(実行しているが、ItunesConnectによって拒否された)私のコードWAS

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Login et mot de passe" message:@"" delegate:self cancelButtonTitle:@"Annuler" otherButtonTitles:@"Sauvegarder", nil]; 
     [alertView addTextFieldWithValue:@"" label:@"Login"]; 
     [alertView addTextFieldWithValue:@"" label:@"Mot de passe"]; 
     // Username 
     textfieldName = [alertView textFieldAtIndex:0]; 
     textfieldName.keyboardType = UIKeyboardTypeAlphabet; 
     textfieldName.keyboardAppearance = UIKeyboardAppearanceAlert; 
     textfieldName.autocorrectionType = UITextAutocorrectionTypeNo; 
     // Password 
     textfieldPassword = [alertView textFieldAtIndex:1]; 
     textfieldPassword.clearButtonMode = UITextFieldViewModeWhileEditing; 
     textfieldPassword.keyboardType = UIKeyboardTypeNumbersAndPunctuation; 
     textfieldPassword.keyboardAppearance = UIKeyboardAppearanceAlert; 
     textfieldPassword.autocorrectionType = UITextAutocorrectionTypeNo; 
     textfieldPassword.secureTextEntry = YES; 
     [alertView show]; 

そして、これは、このエラーを取得するコードです:用

// Ask for Username and password. 
     UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:_title message:@"\n \n \n" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil]; 

     // Adds a username Field 
     textfieldName = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)]; 
     textfieldName.placeholder = @"Login"; 
     [textfieldName setBackgroundColor:[UIColor whiteColor]]; 
     textfieldName.enablesReturnKeyAutomatically = YES; 
     [textfieldName setReturnKeyType:UIReturnKeyDone]; 
     [textfieldName setDelegate:self]; 
     [alertView addSubview:textfieldName]; 


     Show alert on screen. 
     [alertView show]; 
     [alertView release]; 

おかげで私を助けて!

+0

なぜAppleはあなたのアプリを拒否しましたか?そしてなぜあなたは 'UIViewController'の' ._title'プロパティにアクセスしようとしていますか?それはおそらくプライベート/非サポートのものです。サブクラス化されたView Controllerに 'title'プロパティを追加する(そしてアクセスする)方が良いでしょう。 –

+0

@マイケル:素早く尋ねてくれてありがとう。 「私たちはあなたのアプリで次の非公開のAPIを見つけました:addTextFieldWithValue:label: "Sonそのコードを試しています:http://stackoverflow.com/questions/3784134/any-non-private-api-alternative -for-this – clement

+0

@Michael:私が編集したコードにコメントすると、アプリがビルドされるので、最初の投稿を編集します;-) – clement

答えて

5

_titleは有効なivarではありません。 UIViewControllerで定義されているため、未定義のエラーは発生しませんが、内部であることを意味する@packageと宣言されています。要するに、_titleを使用しないでください。

+0

'_view'を使うと同じです – aledalgrande

関連する問題