1

After combining an Xcode project that was written in Swift with another Xcode project that was written in Objective C, the error is displayed in reference to a file that worked seamlessly in its native Objective C project. After adding a bridging header to the new project to allow interoperability between Swift and Objective C, the compile process has narrowed down to these 2 warning messages.

ARC forbids explicit message send of 'autorelease'

&

autorelease' is unavailable: not available in automatic reference counting mode

enter image description here

After some research, it seems that one of the solutions is to navigate to the projects

edit > convert > To Objective-C ARC... 

After trying the above, it appears that the window for the arc options that pops up displays a virtually blank window.

enter image description here

enter image description here

Even after explicitly navigating to the target settings in Xcode, the pop-up window appeared blank as well.

The second option included turning off ARC for the project. After trying this, 3 new warnings occurred pertaining to lines of code from the native Objective C project that were not there in the native version.

How can this be fixed?

Aaron Navies
  • 1,213
  • 1
  • 11
  • 16
  • 1
    The window is not showing anything because the target has arc enabled. The convert syntax works for target AFAIK. You have to disable the ARC for your current project (the combine objc/swift) then try this conversion. Or convert the original objc project. The beast would be converting original one. What are the 3 warnings? – Muhammad Zohaib Ehsan Apr 09 '20 at 23:13
  • Thank you for your response. The errors included `attempting to use the forward class as superclass` etc. – Aaron Navies Apr 09 '20 at 23:32
  • 1
    https://stackoverflow.com/questions/11819764/attempting-to-use-the-forward-class-game-as-superclass-of-mathgame-in-coco – Muhammad Zohaib Ehsan Apr 09 '20 at 23:35
  • 2
    May be just delete `autoreleasing` and migrate objc code on ARC? – Cy-4AH Apr 10 '20 at 09:26

0 Answers0