MokiMobility / MokiManageSDK

Manage, monitor, and secure your mission critical apps and purposed devices
http://mokimobility.github.io/
6 stars 2 forks source link

Missing NSDate timestampInMiliseconds interface #3

Open acl0056 opened 10 years ago

acl0056 commented 10 years ago

In 1.2.2, the library was built with a missing dependency for an NSDate interface defining an instance method, timestampInMiliseconds. The following is a temporary workaround that seems to keep it from crashing, by adding in the missing interface files:

NSDate+milliseconds.h:

#import <Foundation/Foundation.h>
@interface NSDate (milliseconds)
-(NSUInteger) timestampInMiliseconds;
@end

NSDate+milliseconds.m:

#import "NSDate+milliseconds.h"
@implementation NSDate (milliseconds)
-(NSUInteger) timestampInMiliseconds {
    return (NSUInteger) [self timeIntervalSince1970] * 1000;
}
@end
acl0056 commented 10 years ago

You may also want to mention the added dependencies for the Accelerate and CFNetworking framework dependencies in your readme markdown.

kcalmes commented 10 years ago

That category looks very similar to ours :-) However, the object shows up as included in the library in all 3 architectures with otool. Maybe the instance it was attempting to call the timestamp method on was invalid? Would love to see a little more about the crash if it is available.

acl0056 commented 10 years ago

It looks like the instance is a SimplePing object. From the log:

-[__NSDate timestampInMiliseconds]: unrecognized selector sent to instance 0x17666a60

The instance:

screen shot 2014-04-03 at 8 31 54 am

The stack:

screen shot 2014-04-03 at 8 29 42 am

Not sure what else I can show you.