4
'__strong' only applies to objective-c object or block pointer types; type here is 'void *'

this the "__strong" line in my AVAudioPlayer.h file (which is an imported framework)

@interface AVAudioPlayer : NSObject {
@private
    __strong void *_impl;
}

my .h file looks like this

#import <UIKit/UIKit.h>
#import <AVFoundation/AVAudioPlayer.h>

@interface excerViewController : UIViewController <AVAudioPlayerDelegate,UIAccelerometerDelegate>


@property (weak, nonatomic) IBOutlet UILabel *avgLabel;
@property (weak, nonatomic) IBOutlet UILabel *modeLabel;
@property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIButton *playButton;
@property int subScore;
@property int score;
@property int seconds;
@property int moments;
@property NSMutableString *average;
@property double avg;
@property BOOL locked;
@property double delta;
@property UIAccelerometer *accel;
@property AVAudioPlayer *player;
-(void)drawEnergy:(double)energy;
@end

I can't for the life of me figure out why I'm getting this error. One other person on StackOverflow had this issue, and it isn't the reason i'm getting it ( '__strong' only applies to objective-c object or block pointer types; type here is XXX" warning)

Community
  • 1
  • 1
mcornell
  • 768
  • 1
  • 6
  • 15

1 Answers1

1

Because void* is a pointer to an argument with no type, and not a true object, __strong does not apply to it.

CodaFi
  • 43,043
  • 8
  • 107
  • 153
  • 1
    I understood that, I don't understand why pre-generated code would give me that error. Moreover, the exact same code is being used in another one of my projects, which implements AVAudioPlayer in the exact same way. That does not giving me an error at all. The only difference between the two I can think of if that this project also interfaces UIAccerometer. – mcornell Apr 22 '12 at 08:05
  • What does "imported framework" mean? Is it an iOS framework, or some kind of external 3rd party one. – CodaFi Apr 22 '12 at 08:10