Closed pinkal closed 8 years ago
Yes I have same error :
__weak typeof(self) weakSelf = self; STTwitter/STTwitterAppOnly.m:116:19: A parameter list without types is only allowed in a function definition
I have resolved this by replacing typeof with __typeof.
cool anyway I also fix that by settings this in my XCode :
To change this: open the Project Navigator > click the project > click the target > Select the C Language Dialect > Hit backspace to set the default value.
Thanks Alot softmixt :+1: its perfect solution for me.
In STHttpRequest.m, STTwitterOSRequest.m files having lots of arc errors, I have set -fobjc-arc flag for both the files. My project is non arc.
Error list: Twitter/STTwitter/STTwitterOSRequest.m:188:26: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] block strong typeof(weakSelf) strongSelf = weakSelf; ^ Twitter/STTwitter/STTwitterOSRequest.m:188:17: warning: 'strong' only applies to Objective-C object or block pointer types; type here is 'int' [-Wignored-attributes] block strong typeof(weakSelf) strongSelf = weakSelf; ^ Twitter/STTwitter/STTwitterOSRequest.m:188:33: error: a parameter list without types is only allowed in a function definition block strong typeof(weakSelf) strongSelf = weakSelf; ^ Twitter/STTwitter/STTwitterOSRequest.m:188:42: error: expected ';' at end of declaration block strong typeof(weakSelf) strongSelf = weakSelf; ^ ; Twitter/STTwitter/STTwitterOSRequest.m:189:12: error: use of undeclared identifier 'strongSelf' if(strongSelf == nil) { ^ Twitter/STTwitter/STTwitterOSRequest.m:194:13: error: use of undeclared identifier 'strongSelf' strongSelf.streamBlock(strongSelf, data); ^ Twitter/STTwitter/STTwitterOSRequest.m:194:36: error: use of undeclared identifier 'strongSelf' strongSelf.streamBlock(strongSelf, data); ^ Twitter/STTwitter/STTwitterOSRequest.m:196:14: error: use of undeclared identifier 'strongSelf' [strongSelf.data appendData:data]; ^ Twitter/STTwitter/STTwitterOSRequest.m:209:20: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] block weak typeof(self) weakSelf = self; ^ Twitter/STTwitter/STTwitterOSRequest.m:209:13: warning: 'weak' only applies to Objective-C object or block pointer types; type here is 'int' [-Wignored-attributes] block weak typeof(self) weakSelf = self; ^ Twitter/STTwitter/STTwitterOSRequest.m:209:27: error: a parameter list without types is only allowed in a function definition block weak typeof(self) weakSelf = self; ^ Twitter/STTwitter/STTwitterOSRequest.m:209:32: error: expected ';' at end of declaration block weak typeof(self) weakSelf = self; ^ ; Twitter/STTwitter/STTwitterOSRequest.m:213:26: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] block strong typeof(weakSelf) strongSelf = weakSelf; ^ Twitter/STTwitter/STTwitterOSRequest.m:213:17: warning: 'strong' only applies to Objective-C object or block pointer types; type here is 'int' [-Wignored-attributes] block strong typeof(weakSelf) strongSelf = weakSelf; ^ Twitter/STTwitter/STTwitterOSRequest.m:213:33: error: a parameter list without types is only allowed in a function definition block strong typeof(weakSelf) strongSelf = weakSelf; ^ Twitter/STTwitter/STTwitterOSRequest.m:213:42: error: expected ';' at end of declaration block __strong typeof(weakSelf) strongSelf = weakSelf; ^ ; fatal error: too many errors emitted, stopping now [-ferror-limit=] 12 warnings and 20 errors generated.