5
func testExample() {
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
// some code ...
}
La funzione di cui sopra in crash sempre e dà questo errore:Impossibile accedere AppDelegate mentre il progetto di test Xcode
Could not cast value of type 'MyAppName.AppDelegate' (0x10dc09e80) to 'MyAppNameTests.AppDelegate' (0x11cc190c0).
scrivendo "MyAppName importazione @testable" nella mia classe di test mi dà questo errore: Unknown attributo 'verificabile' – Mohammed
Allora don usare XCode 7. Prima che XCode 7 rimuova '@testable'. –
che non ha funzionato, anche – Mohammed