2

I'm trying to use the new shuffledArray method to shuffle the elements in an NSMutableArray. I have the Array declared:

@property (strong, nonatomic) NSMutableArray *mArray;

Then I call the method

mArray = [[self.mArray shuffledArray] mutableCopy];

But I'm getting the exception:

-[__NSArrayM shuffledArray]: unrecognized selector sent to instance 0x1c4451340

I've imported the GameplayKit Framework as well, and my app's target is iOS 10.0 so I'm not sure what's wrong.

Fourth
  • 619
  • 7
  • 19

1 Answers1

5

You need to link the framework to your project as well, not just import it.

Linked frameworks and libraries xcode

jefflovejapan
  • 1,987
  • 3
  • 19
  • 34