Post

Replies

Boosts

Views

Activity

Xcode, ObjC, properties and linker
Either I am going crazy or Xcode behaves at least very different from the previous versions. Checked with Xcode 12.2 and 12.3 beta. Issue 1 You can do something like this without @implementation @interface Bar : NSObject (void)foo; @end and project compiles Issue 2 (or part of issue 1). Foo is just an empty object with one no-op method -(void)bar. Foo.m is not included in compiled sources. #import "ViewController.h" #import "Foo.h" @interface ViewController () @property (nonatomic, strong) Foo *fooProperty; @end @implementation ViewController (void)viewDidLoad { 		[super viewDidLoad]; /** Issue #2 (or maybe 1 part deux) The star of the show is Foo *fooProperty. Foo.m is not included in compiled sources. But for some reason, there is no mention of it during the linking stage. Uncomment next two lines and compilation fails Foo *fooInstance = [Foo new]; [fooInstance bar]; Or you can uncomment this self.fooProperty = [Foo new];*/ 		[self.fooProperty bar]; }
1
0
558
Nov ’20