<html><body><div>Hello,</div><div><br data-mce-bogus="1"></div><div>I'm subclassing NSMutableURLRequest to patch lack of httpBody property. My subclass doesn't implement any initialisers so it inherits all the designated initialisers. From what I understand, since all designated initialisers are implemented(inherited) then I should also inherit convenience initialisers.</div><div><br data-mce-bogus="1"></div><div>My code:</div><div><p class="p1"><span style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;"><span class="s1">class</span><span class="s2"> safe_NSMutableURLRequest: </span><span class="s3">NSMutableURLRequest</span><span class="s2"> {</span></span></p><p class="p2"><span style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;"><span class="s4"><span class="Apple-converted-space"> </span></span><span class="s2">#if</span><span class="s4"> </span><span class="s2">os</span><span class="s4">(</span><span class="s2">Linux</span><span class="s4">)</span></span></p><p class="p1"><span style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;"><span class="s2"><span class="Apple-converted-space"> </span></span><span class="s1">var</span><span class="s2"> httpBody: </span><span class="s3">NSData</span><span class="s2">?</span></span></p><p class="p2"><span style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;"><span class="s4"><span class="Apple-converted-space"> </span></span><span class="s2">#endif</span></span></p><p class="p1"><span class="s2" style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;">}</span></p><p class="p1"><span class="s2"><br data-mce-bogus="1"></span></p><p class="p1"><span class="s2" style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;">let someURL = NSURL(string: "https://google.com")!</span></p><p class="p1"><span class="s2" style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;">let request = <meta charset="utf-8"><span style="color: rgb(0, 0, 0); font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important; background-color: rgb(255, 255, 255);" data-mce-style="color: #000000; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important; background-color: #ffffff;">safe_NSMutableURLRequest(url: someURL)</span></span></p><p class="p1"><span class="s2"><span style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;" data-mce-style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;"><br data-mce-bogus="1"></span></span></p><p class="p1"><span class="s2"><span style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;" data-mce-style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;">the last line produces an error:</span></span></p><p class="p1"><span class="s2" style="font-family: 'courier new', monospace; color: rgb(255, 41, 104);" data-mce-style="font-family: 'courier new', monospace; color: #ff2968;"><span style="font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important; background-color: rgb(255, 255, 255);" data-mce-style="font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important; background-color: #ffffff;">error: incorrect argument label in call (have 'url:', expected 'coder:')</span></span></p><p class="p1"><span class="s2" style="font-family: 'courier new', monospace;" data-mce-style="font-family: 'courier new', monospace;"><span style="color: rgb(0, 0, 0); font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important; background-color: rgb(255, 255, 255);" data-mce-style="color: #000000; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important; background-color: #ffffff;"><br data-mce-bogus="1"></span></span></p><p class="p1"><meta charset="utf-8"><span style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;" data-mce-style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;">Could you please explain me why I'm not inheriting convenience initialiser? </span></p><p class="p1"><span style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;" data-mce-style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;"><br data-mce-bogus="1"></span></p><p class="p1"><span style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;" data-mce-style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;">Regards,</span></p><p class="p1"><span style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;" data-mce-style="color: #000000; font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 22.5px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;">Michal Kalinowski</span></p></div></body></html>