sharekit gives warnings regarding conforming. Should I ignore it? - ios

I got the sharekit library at :
https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit
I followed all the instructions and now when I run my app, I get the following warning:
GTMMethodCheckMethodChecker: Class UIKeyboardCandidateUtilities does not conform to #protocol(NSObject), so won't be checked
2013-03-25 23:57:42.971 Daily Tamatar[25762:c07] GTMMethodCheckMethodChecker: Class WebMIMETypeRegistry does not conform to #protocol(NSObject), so won't be checked
2013-03-25 23:57:42.973 Daily Tamatar[25762:c07] GTMMethodCheckMethodChecker: Class SLFacebookGraphUtils does not conform to #protocol(NSObject), so won't be checked
should I be worried? I am fairly new to protocols and conformities?
Thanks

Related

Can anyone explain how to obfuscate codebase using Swiftshield?

I have gone through this post but I am still not able to obfuscate full codebase.
I am using this command for the same:
swiftshield -automatic -project-root ../TestApp -automatic-project-file ../TestApp/DemoTestApp.xcworkspace -automatic-project-scheme DemoTestApp
Getting this error:
error: 'CustomButton' is unavailable: cannot find Swift declaration for this class
#IBOutlet weak var customButton: CustomButton!
^~~~~~~~~~
DemoFramework.CustomButton:2:12: note: 'CustomButton' has been explicitly marked unavailable here
I have a CustomButton class that is in the custom framework.
Can anyone walk me step by step methods for how to use swiftshield for code obfuscation?
Thanks in advance. :)

Box iOS SDK - Receiver 'BoxSearchRequestBuilder' for class message is a forward declaration

I am trying to use the BoxSearchRequestBuilder class to be able to perform a search in Box via the iOS SDK (v2). When I try to instantiate a BoxSearchRequestBuilder instance with its initializer, I get a compiler error.
What I am trying to do:
BoxSearchRequestBuilder* builder = [[BoxSearchRequestBuilder alloc] initWithSearch:#"123" queryStringParameters:#{#"content_types" : #"tags"}];
The error:
receiver 'BoxSearchRequestBuilder' for class message is a forward declaration or
receiver type 'BoxSearchRequestBuilder' for instance message is a forward declaration.
Basically the BoxSearchRequestBuilder class is declared via a forward declaration (#BoxSearchRequestBuilder), so I cannot directly access its properties/initializers.
I can fix the error by going to the iOS SDK class BoxSearchResourceManager and changing the forward declaration to an import statement:
#import "BoxSearchRequestBuilder.h"
//#class BoxSearchRequestBuilder;
However, I don't think I should be doing this. Are there any other alternatives? The rest of the API works fine.
Thanks for flagging this.
It has been fixed thanks to your feedback in this change:
https://github.com/box/box-ios-sdk-v2/commit/67064ea1f0c1aff040fba1e249b9f550281c01e2
feel free to file issues on SDK github page.

Thrift in objective-c

I have a .m and .h file that generated with Thrift for objective-c based on this link :
http://wiki.apache.org/thrift/ThriftUsageObjectiveC
but there are a lot of error in .m files like :
1. error: duplicate interface definition for class
2. reimplementation of class 'bitlit_thrift_detect_cover_args'
3. use of undeclared identifier '__claim_id'; did you mean 'claim_id'?
4. use of undeclared identifier '__claim_id_isset'
5. reference to local variable 'claim_id' declared in enclosing context
6. error: use of undeclared identifier '__claim_id_isset'
__claim_id_isset = YES;
.....
7. fatal error: too many errors emitted, stopping now [-ferror-limit=]
would you please give me some hints, what is the problem?, is the error related to the xcode setting? my xCode Version is Version 4.6.1
Thanks in advance!
Here is the errors Picture:

Cannot find protocol declaration for CCTargetTouchDelegate/CCStandardTouchDelegate

I have upgraded my project to the latest beta of cocos2d 2.1 and I am now receiving the errors,
Cannot find protocol declaration for CCTargetTouchDelegate
and
Cannot find protocol declaration for CCStandardTouchDelegate
How do I fix this?
As of cocos2d 2.1 beta 3 the following changes have been made to the touch delegates.
CCTargetedTouchDelegate -> CCTouchOneByOneDelegate
CCStandardTouchDelegate -> CCTouchAllAtOnceDelegate
Simply change the name of the protocol in your class declaration and the error will be fixed.
Reference: CHANGELOG

Unit testing a static library with RestKit

I'm attempting to follow along with the RestKit unit test guide ( https://github.com/RestKit/RestKit/wiki/Unit-Testing-with-RestKit ) except that my project is a static library instead of an app.
Here is the test I've written:
- (void)testMappingOfDate
{
id parsedJSON = [RKTestFixture parsedObjectWithContentsOfFixture:#"plan.json"];
RKMappingTest *test = [RKMappingTest testForMapping:[self planMapping] object:parsedJSON];
[test expectMappingFromKeyPath:#"plan.date" toKeyPath:#"date"];
STAssertNoThrow([test verify], nil);
}
When I attempt to run the test I receive this error on the first line of the test:
error: testMappingOfDate (api_clientTests) failed: -[NSBundle parsedObjectWithContentsOfResource:withExtension:]: unrecognized selector sent to instance 0x1765c40
It seems like its not finding the NSBundle category defined by RestKit, but my test target header search path is set to "$(BUILT_PRODUCTS_DIR)/../../Headers" and I've verified this path includes NSBundle+RKAdditions.h which contains the supposed "unrecognized selector".
Is there something I'm missing here?
You are trying to include a category within your binary that comes from a library. To get that accomplished you will need to add the following to your (Unit-Test-Target's) build settings.
Other Linker Flags: -ObjC
From Apple's QA:
Objective-C does not define linker symbols for each function (or
method, in Objective-C) - instead, linker symbols are only generated
for each class. If you extend a pre-existing class with categories,
the linker does not know to associate the object code of the core
class implementation and the category implementation. This prevents
objects created in the resulting application from responding to a
selector that is defined in the category.
Solution:
To resolve this issue, the static library should pass the -ObjC option
to the linker. This flag causes the linker to load every object file
in the library that defines an Objective-C class or category. While
this option will typically result in a larger executable (due to
additional object code loaded into the application), it will allow the
successful creation of effective Objective-C static libraries that
contain categories on existing classes.
The error means that the "unrecognized selector" issue is at runtime. The compiler and NSBundle+RKAdditions.h do not give this error they would at compile timr.
The issue is that the code that has #implementation NSBundle(RKAdditions) is not linked into your app. So you need to add this to your build

Resources