0

I have recently purchased an app and while trying to make edits in Xcode, I am getting a compiler error with the error saying:

cannot create __weak static in file using manual reference

Snippet of code

Cœur
  • 37,241
  • 25
  • 195
  • 267
Dan Ashby
  • 3
  • 2
  • Please consider adding code as text with appropriate formatting to your question instead of providing a screenshot. – edwinksl Aug 30 '16 at 21:40

1 Answers1

0

This means that you are not using ARC in that file and so you cannot use weak, strong and so on. Therefore you have to remove the keyword __weak.

Marco Santarossa
  • 4,058
  • 1
  • 29
  • 49
  • Thanks for that, again i am new to Objective C, how can I add ARC into the file in order to let me use the keywords – Dan Ashby Aug 30 '16 at 21:18
  • This shows you how add arc to a single file: http://stackoverflow.com/a/32664413/5109911 , If my answer fix your problem please mark as right and then you can rise other questions if you don't find the solution by yourself – Marco Santarossa Aug 30 '16 at 21:20
  • Thanks again Marco, where do I find the Target> Build Phases> in Xcode? – Dan Ashby Aug 30 '16 at 21:48
  • @DanAshby https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/EditingBasicSettings.html – Marco Santarossa Aug 30 '16 at 21:52