magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.8k forks source link

Swift 3.0 .save #1260

Closed ignotusverum closed 7 years ago

ignotusverum commented 7 years ago

After migrating project to Swift 3.0, i'm having following issues with .save method:

// Previously .saveWithBlock
    MagicalRecord.save { context in 
    // Save some changes here
 }

"Ambiguous use of 'save' ", any ideas how to fix it ?

Thanks

JbDenoual commented 7 years ago

Yes, just add "(" and ")" around your block : MagicalRecord.save({ (context) in // Save some changes here })