@property(nonatomic,readwrite) int count;
_count = 0; count++;
var audioSwift: audio?
Don't post answers in comments.
Here is a complete answer:
The problem is that you never create an audio object, so your
audioSwift variable is indeed nil.
Change your Swift code like this:
var audioSwift = audio() //Create a new audio object. print(audioSwift.count)
Since the code above creates an audio object right away, it doesn't need to be an Optional any more.
Note that in both Swift and Objective-C class names should start with an upper-case letter, so your
audio class should be named