Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to remove warnings after updating project to recommended settings #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions STTwitter/STTwitterAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ authenticateInsteadOfAuthorize:(BOOL)authenticateInsteadOfAuthorize // use NO if
- (void)verifyCredentialsWithSuccessBlock:(void(^)(NSString *username))successBlock
errorBlock:(void(^)(NSError *error))errorBlock __deprecated_msg("use verifyCredentialsWithUserSuccessBlock:errorBlock: instead");

- (void)invalidateBearerTokenWithSuccessBlock:(void(^)())successBlock
- (void)invalidateBearerTokenWithSuccessBlock:(void(^)(void))successBlock
errorBlock:(void(^)(NSError *error))errorBlock;

- (NSString *)prettyDescription;
Expand Down Expand Up @@ -1455,7 +1455,7 @@ authenticateInsteadOfAuthorize:(BOOL)authenticateInsteadOfAuthorize // use NO if
screenName:(NSString *)screenName
ownerScreenName:(NSString *)ownerScreenName
ownerID:(NSString *)ownerID
successBlock:(void(^)())successBlock
successBlock:(void(^)(void))successBlock
errorBlock:(void(^)(NSError *error))errorBlock;

/*
Expand Down
4 changes: 2 additions & 2 deletions STTwitter/STTwitterAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ - (void)verifyCredentialsWithSuccessBlock:(void(^)(NSString *username))successBl
} errorBlock:errorBlock];
}

- (void)invalidateBearerTokenWithSuccessBlock:(void(^)())successBlock
- (void)invalidateBearerTokenWithSuccessBlock:(void(^)(void))successBlock
errorBlock:(void(^)(NSError *error))errorBlock {

if([self.oauth respondsToSelector:@selector(invalidateBearerTokenWithSuccessBlock:errorBlock:)]) {
Expand Down Expand Up @@ -3209,7 +3209,7 @@ + (NSDictionary *)stallWarningDictionaryFromJSON:(NSString *)json {
screenName:(NSString *)screenName
ownerScreenName:(NSString *)ownerScreenName
ownerID:(NSString *)ownerID
successBlock:(void(^)())successBlock
successBlock:(void(^)(void))successBlock
errorBlock:(void(^)(NSError *error))errorBlock {

NSAssert((ownerScreenName || ownerID), @"missing ownerScreenName or ownerID");
Expand Down
2 changes: 1 addition & 1 deletion STTwitter/STTwitterAppOnly.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern NS_ENUM(NSUInteger, STTwitterAppOnlyErrorCode) {

+ (NSString *)base64EncodedBearerTokenCredentialsWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret;

- (void)invalidateBearerTokenWithSuccessBlock:(void(^)())successBlock
- (void)invalidateBearerTokenWithSuccessBlock:(void(^)(id response))successBlock
errorBlock:(void(^)(NSError *error))errorBlock;

@end
2 changes: 1 addition & 1 deletion STTwitter/STTwitterAppOnly.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (NSString *)oauthAccessTokenSecret {
return nil;
}

- (void)invalidateBearerTokenWithSuccessBlock:(void(^)())successBlock
- (void)invalidateBearerTokenWithSuccessBlock:(void(^)(id response))successBlock
errorBlock:(void(^)(NSError *error))errorBlock {

if(_bearerToken == nil) {
Expand Down
2 changes: 1 addition & 1 deletion STTwitter/STTwitterProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ authenticateInsteadOfAuthorize:(BOOL)authenticateInsteadOfAuthorize
successBlock:(void(^)(NSString *oauthToken, NSString *oauthTokenSecret, NSString *userID, NSString *screenName))successBlock
errorBlock:(void(^)(NSError *error))errorBlock;

- (void)invalidateBearerTokenWithSuccessBlock:(void(^)(id response))successBlock
- (void)invalidateBearerTokenWithSuccessBlock:(void(^)(void))successBlock
errorBlock:(void(^)(NSError *error))errorBlock;

// access tokens are available only with plain OAuth authentication
Expand Down
4 changes: 2 additions & 2 deletions STTwitter/Vendor/STHTTPRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ typedef NS_ENUM(NSUInteger, STHTTPRequestCookiesStorage) {
@property (nonatomic) BOOL preventRedirections;
@property (nonatomic) BOOL useUploadTaskInBackground;
@property (nonatomic) STHTTPRequestCookiesStorage cookieStoragePolicyForInstance; // overrides globalCookiesStoragePolicy
@property (nonatomic) NSString *sharedContainerIdentifier;
@property (nonatomic, strong) NSString *sharedContainerIdentifier;

+ (void)setBackgroundCompletionHandler:(void(^)())completionHandler forSessionIdentifier:(NSString *)sessionIdentifier;
+ (void)setBackgroundCompletionHandler:(void(^)(void))completionHandler forSessionIdentifier:(NSString *)sessionIdentifier;
//+ (void(^)())backgroundCompletionHandlerForSessionIdentifier:(NSString *)sessionIdentifier;

// response
Expand Down
4 changes: 2 additions & 2 deletions STTwitter/Vendor/STHTTPRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ - (void)cancel {
self.errorBlock(self.error);
}

+ (void)setBackgroundCompletionHandler:(void(^)())completionHandler forSessionIdentifier:(NSString *)sessionIdentifier {
+ (void)setBackgroundCompletionHandler:(void(^)(void))completionHandler forSessionIdentifier:(NSString *)sessionIdentifier {
if(sessionCompletionHandlersForIdentifier == nil) {
sessionCompletionHandlersForIdentifier = [NSMutableDictionary dictionary];
}
Expand Down Expand Up @@ -970,7 +970,7 @@ - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session

dispatch_async(dispatch_get_main_queue(), ^{

void (^completionHandler)() = sessionCompletionHandlersForIdentifier[session.configuration.identifier];
void (^completionHandler)(void) = sessionCompletionHandlersForIdentifier[session.configuration.identifier];

if(completionHandler) {
completionHandler();
Expand Down
33 changes: 28 additions & 5 deletions demo_ios/STTwitterDemoIOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
03144B3717FB608C007812DC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "Nicolas Seriot";
};
buildConfigurationList = 03144B3A17FB608C007812DC /* Build configuration list for PBXProject "STTwitterDemoIOS" */;
Expand Down Expand Up @@ -311,23 +311,34 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -340,7 +351,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand All @@ -350,30 +361,40 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -387,6 +408,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "STTwitterDemoiOS/STTwitterDemoiOS-Prefix.pch";
INFOPLIST_FILE = "STTwitterDemoiOS/STTwitterDemoiOS-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "ch.seriot.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -400,6 +422,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "STTwitterDemoiOS/STTwitterDemoiOS-Prefix.pch";
INFOPLIST_FILE = "STTwitterDemoiOS/STTwitterDemoiOS-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "ch.seriot.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down
36 changes: 18 additions & 18 deletions demo_ios/STTwitterDemoIOS/STTwitterDemoIOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>ch.seriot.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -20,16 +20,29 @@
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLName</key>
<string>ch.seriot.STTwitterDemoiOSSafari</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>myapp</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
Expand All @@ -40,18 +53,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLName</key>
<string>ch.seriot.STTwitterDemoiOSSafari</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
</array>
</dict>
</array>
</dict>
</plist>