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
  • 630
  • 1
  • 7
  • 22

1 Answers1

5

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

Linked frameworks and libraries xcode

jefflovejapan
  • 2,047
  • 3
  • 20
  • 34