no message
This commit is contained in:
parent
ce70ebf7fc
commit
22499a85d3
@ -139,9 +139,7 @@
|
|||||||
|
|
||||||
NSLog(@"response : %@",responseObject);
|
NSLog(@"response : %@",responseObject);
|
||||||
|
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
NSLog(@"%@",[User currentUser]);
|
||||||
[responseObject reloadFormServer];
|
|
||||||
});
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
} failure:^(NSError * _Nonnull error) {
|
||||||
NSLog(@"response : %@",error);
|
NSLog(@"response : %@",error);
|
||||||
}];
|
}];
|
||||||
|
|||||||
@ -26,11 +26,11 @@ PODS:
|
|||||||
- Expecta+Snapshots (2.0.0):
|
- Expecta+Snapshots (2.0.0):
|
||||||
- Expecta (~> 1.0)
|
- Expecta (~> 1.0)
|
||||||
- FBSnapshotTestCase/Core (~> 2.0.3)
|
- FBSnapshotTestCase/Core (~> 2.0.3)
|
||||||
- FBSDKCoreKit (4.10.0):
|
- FBSDKCoreKit (4.10.1):
|
||||||
- Bolts (~> 1.5)
|
- Bolts (~> 1.5)
|
||||||
- FBSDKLoginKit (4.10.0):
|
- FBSDKLoginKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKShareKit (4.10.0):
|
- FBSDKShareKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSnapshotTestCase (2.0.7):
|
- FBSnapshotTestCase (2.0.7):
|
||||||
- FBSnapshotTestCase/SwiftSupport (= 2.0.7)
|
- FBSnapshotTestCase/SwiftSupport (= 2.0.7)
|
||||||
@ -44,7 +44,7 @@ PODS:
|
|||||||
- CocoaSecurity (~> 1.2.2)
|
- CocoaSecurity (~> 1.2.2)
|
||||||
- nv-ios-http-status (0.0.1)
|
- nv-ios-http-status (0.0.1)
|
||||||
- PEAR-FileManager-iOS (1.3.1)
|
- PEAR-FileManager-iOS (1.3.1)
|
||||||
- PNObject (0.4.5):
|
- PNObject (0.4.6):
|
||||||
- AFNetworking
|
- AFNetworking
|
||||||
- CodFis-Helper
|
- CodFis-Helper
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
@ -93,9 +93,9 @@ SPEC CHECKSUMS:
|
|||||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||||
Expecta+Snapshots: 29b38dd695bc72a0ed2bea833937d78df41943ba
|
Expecta+Snapshots: 29b38dd695bc72a0ed2bea833937d78df41943ba
|
||||||
FBSDKCoreKit: 13bec8373fb3af94d44daf2aa1e0958687897fbd
|
FBSDKCoreKit: d2aaed5e9ab7d8d6301c533376a1fbff1cf3deb5
|
||||||
FBSDKLoginKit: d3d4a2e9d31954deb00bfea964167a05ca1ea976
|
FBSDKLoginKit: 699ff169080e3072de4b9b0faca90bf23dc36deb
|
||||||
FBSDKShareKit: 54587b4624706ace1e810cf83412a918141f807a
|
FBSDKShareKit: 2fd887cce0056bdda91f99b2021d724a4fed8e88
|
||||||
FBSnapshotTestCase: 7e85180d0d141a0cf472352edda7e80d7eaeb547
|
FBSnapshotTestCase: 7e85180d0d141a0cf472352edda7e80d7eaeb547
|
||||||
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
||||||
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
||||||
@ -103,7 +103,7 @@ SPEC CHECKSUMS:
|
|||||||
NSUserDefaults-AESEncryptor: da02cfef056f1e18ebe2748767915f08b274c9c5
|
NSUserDefaults-AESEncryptor: da02cfef056f1e18ebe2748767915f08b274c9c5
|
||||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||||
PNObject: e3104b38e9aa668a992de191cb4630440cce5cf3
|
PNObject: 20b785cb5cbf88322f2c268a5ba80ca3337dec51
|
||||||
PureLayout: f35f5384c9c4e4479df041dbe33ad7577b71ddfb
|
PureLayout: f35f5384c9c4e4479df041dbe33ad7577b71ddfb
|
||||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||||
|
|||||||
@ -41,5 +41,5 @@
|
|||||||
#import <FBSDKCoreKit/FBSDKProfilePictureView.h>
|
#import <FBSDKCoreKit/FBSDKProfilePictureView.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FBSDK_VERSION_STRING @"4.10.0"
|
#define FBSDK_VERSION_STRING @"4.10.1"
|
||||||
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.5"
|
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.5"
|
||||||
|
|||||||
@ -41,206 +41,226 @@ static const u_int FB_GROUP1_RECHECK_DURATION = 30 * 60; // seconds
|
|||||||
static const u_int FB_GIGABYTE = 1024 * 1024 * 1024; // bytes
|
static const u_int FB_GIGABYTE = 1024 * 1024 * 1024; // bytes
|
||||||
|
|
||||||
@implementation FBSDKAppEventsDeviceInfo
|
@implementation FBSDKAppEventsDeviceInfo
|
||||||
|
{
|
||||||
|
// Ephemeral data, may change during the lifetime of an app. We collect them in different
|
||||||
|
// 'group' frequencies - group1 may gets collected once every 30 minutes.
|
||||||
|
|
||||||
// Ephemeral data, may change during the lifetime of an app. We collect them in different
|
// group1
|
||||||
// 'group' frequencies - group1 may gets collected once every 30 minutes.
|
NSString *_carrierName;
|
||||||
|
NSString *_timeZoneAbbrev;
|
||||||
|
unsigned long long _remainingDiskSpaceGB;
|
||||||
|
NSString *_timeZoneName;
|
||||||
|
|
||||||
// group1
|
// Persistent data, but we maintain it to make rebuilding the device info as fast as possible.
|
||||||
NSString *_carrierName;
|
NSString *_bundleIdentifier;
|
||||||
NSString *_timeZoneAbbrev;
|
NSString *_longVersion;
|
||||||
unsigned long long _remainingDiskSpaceGB;
|
NSString *_shortVersion;
|
||||||
|
NSString *_sysVersion;
|
||||||
|
NSString *_machine;
|
||||||
|
NSString *_language;
|
||||||
|
unsigned long long _totalDiskSpaceGB;
|
||||||
|
unsigned long long _coreCount;
|
||||||
|
CGFloat _width;
|
||||||
|
CGFloat _height;
|
||||||
|
CGFloat _density;
|
||||||
|
|
||||||
// Persistent data, but we maintain it to make rebuilding the device info as fast as possible.
|
// Other state
|
||||||
NSString *_bundleIdentifier;
|
long _lastGroup1CheckTime;
|
||||||
NSString *_longVersion;
|
BOOL _isEncodingDirty;
|
||||||
NSString *_shortVersion;
|
NSString *_encodedDeviceInfo;
|
||||||
NSString *_sysVersion;
|
}
|
||||||
NSString *_machine;
|
|
||||||
NSString *_language;
|
|
||||||
unsigned long long _totalDiskSpaceGB;
|
|
||||||
unsigned long long _coreCount;
|
|
||||||
CGFloat _width;
|
|
||||||
CGFloat _height;
|
|
||||||
CGFloat _density;
|
|
||||||
|
|
||||||
// Other state
|
|
||||||
long _lastGroup1CheckTime;
|
|
||||||
BOOL _isEncodingDirty = YES;
|
|
||||||
NSString *_encodedDeviceInfo;
|
|
||||||
static FBSDKAppEventsDeviceInfo *g_singleton;
|
|
||||||
|
|
||||||
#pragma mark - Public Methods
|
#pragma mark - Public Methods
|
||||||
|
|
||||||
+ (void)extendDictionaryWithDeviceInfo:(NSMutableDictionary *)dictionary
|
+ (void)extendDictionaryWithDeviceInfo:(NSMutableDictionary *)dictionary
|
||||||
{
|
{
|
||||||
dictionary[@"extinfo"] = [g_singleton encodedDeviceInfo];
|
dictionary[@"extinfo"] = [[self sharedDeviceInfo] encodedDeviceInfo];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Internal Methods
|
#pragma mark - Internal Methods
|
||||||
|
|
||||||
+ (void)initialize
|
+ (void)initialize
|
||||||
{
|
{
|
||||||
if (self == [FBSDKAppEventsDeviceInfo class]) {
|
if (self == [FBSDKAppEventsDeviceInfo class]) {
|
||||||
g_singleton = [[FBSDKAppEventsDeviceInfo alloc] init];
|
[[self sharedDeviceInfo] _collectPersistentData];
|
||||||
[g_singleton _collectPersistentData];
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (instancetype)sharedDeviceInfo
|
||||||
|
{
|
||||||
|
static FBSDKAppEventsDeviceInfo *_sharedDeviceInfo = nil;
|
||||||
|
if (_sharedDeviceInfo == nil) {
|
||||||
|
_sharedDeviceInfo = [[FBSDKAppEventsDeviceInfo alloc] init];
|
||||||
|
}
|
||||||
|
return _sharedDeviceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)init
|
||||||
|
{
|
||||||
|
if ((self = [super init])) {
|
||||||
|
_isEncodingDirty = YES;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)encodedDeviceInfo
|
- (NSString *)encodedDeviceInfo
|
||||||
{
|
{
|
||||||
@synchronized (self) {
|
@synchronized (self) {
|
||||||
|
|
||||||
BOOL isGroup1Expired = [self _isGroup1Expired];
|
BOOL isGroup1Expired = [self _isGroup1Expired];
|
||||||
BOOL isEncodingExpired = isGroup1Expired; // Can || other groups in if we add them
|
BOOL isEncodingExpired = isGroup1Expired; // Can || other groups in if we add them
|
||||||
|
|
||||||
// As long as group1 hasn't expired, we can just return the last generated value
|
// As long as group1 hasn't expired, we can just return the last generated value
|
||||||
if (_encodedDeviceInfo && !isEncodingExpired) {
|
if (_encodedDeviceInfo && !isEncodingExpired) {
|
||||||
return _encodedDeviceInfo;
|
return _encodedDeviceInfo;
|
||||||
}
|
|
||||||
|
|
||||||
if (isGroup1Expired) {
|
|
||||||
[self _collectGroup1Data];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_isEncodingDirty) {
|
|
||||||
self.encodedDeviceInfo = [self _generateEncoding];
|
|
||||||
_isEncodingDirty = NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _encodedDeviceInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isGroup1Expired) {
|
||||||
|
[self _collectGroup1Data];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_isEncodingDirty) {
|
||||||
|
self.encodedDeviceInfo = [self _generateEncoding];
|
||||||
|
_isEncodingDirty = NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _encodedDeviceInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setEncodedDeviceInfo:(NSString *)encodedDeviceInfo
|
- (void)setEncodedDeviceInfo:(NSString *)encodedDeviceInfo
|
||||||
{
|
{
|
||||||
@synchronized (self) {
|
@synchronized (self) {
|
||||||
if (![_encodedDeviceInfo isEqualToString:encodedDeviceInfo]) {
|
if (![_encodedDeviceInfo isEqualToString:encodedDeviceInfo]) {
|
||||||
_encodedDeviceInfo = [encodedDeviceInfo copy];
|
_encodedDeviceInfo = [encodedDeviceInfo copy];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This data need only be collected once.
|
// This data need only be collected once.
|
||||||
- (void)_collectPersistentData
|
- (void)_collectPersistentData
|
||||||
{
|
{
|
||||||
// Bundle stuff
|
// Bundle stuff
|
||||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||||
_bundleIdentifier = mainBundle.bundleIdentifier;
|
_bundleIdentifier = mainBundle.bundleIdentifier;
|
||||||
_longVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
|
_longVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
|
||||||
_shortVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
_shortVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||||
|
|
||||||
// Locale stuff
|
// Locale stuff
|
||||||
_language = [[NSLocale currentLocale] localeIdentifier];
|
_language = [[NSLocale currentLocale] localeIdentifier];
|
||||||
|
|
||||||
// Device stuff
|
// Device stuff
|
||||||
UIDevice *device = [UIDevice currentDevice];
|
UIDevice *device = [UIDevice currentDevice];
|
||||||
_sysVersion = device.systemVersion;
|
_sysVersion = device.systemVersion;
|
||||||
_coreCount = [FBSDKAppEventsDeviceInfo _coreCount];
|
_coreCount = [FBSDKAppEventsDeviceInfo _coreCount];
|
||||||
|
|
||||||
UIScreen *sc = [UIScreen mainScreen];
|
UIScreen *sc = [UIScreen mainScreen];
|
||||||
CGRect sr = sc.bounds;
|
CGRect sr = sc.bounds;
|
||||||
_width = sr.size.width;
|
_width = sr.size.width;
|
||||||
_height = sr.size.height;
|
_height = sr.size.height;
|
||||||
_density = sc.scale;
|
_density = sc.scale;
|
||||||
|
|
||||||
struct utsname systemInfo;
|
struct utsname systemInfo;
|
||||||
uname(&systemInfo);
|
uname(&systemInfo);
|
||||||
_machine = @(systemInfo.machine);
|
_machine = @(systemInfo.machine);
|
||||||
|
|
||||||
// Disk space stuff
|
// Disk space stuff
|
||||||
float totalDiskSpace = [[FBSDKAppEventsDeviceInfo _getTotalDiskSpace] floatValue];
|
float totalDiskSpace = [[FBSDKAppEventsDeviceInfo _getTotalDiskSpace] floatValue];
|
||||||
_totalDiskSpaceGB = (unsigned long long)round(totalDiskSpace / FB_GIGABYTE);
|
_totalDiskSpaceGB = (unsigned long long)round(totalDiskSpace / FB_GIGABYTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)_isGroup1Expired
|
- (BOOL)_isGroup1Expired
|
||||||
{
|
{
|
||||||
return ([FBSDKAppEventsUtility unixTimeNow] - _lastGroup1CheckTime) > FB_GROUP1_RECHECK_DURATION;
|
return ([FBSDKAppEventsUtility unixTimeNow] - _lastGroup1CheckTime) > FB_GROUP1_RECHECK_DURATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This data is collected only once every GROUP1_RECHECK_DURATION.
|
// This data is collected only once every GROUP1_RECHECK_DURATION.
|
||||||
- (void)_collectGroup1Data
|
- (void)_collectGroup1Data
|
||||||
{
|
{
|
||||||
// Carrier
|
// Carrier
|
||||||
NSString *newCarrierName = [FBSDKAppEventsDeviceInfo _getCarrier];
|
NSString *newCarrierName = [FBSDKAppEventsDeviceInfo _getCarrier];
|
||||||
if (![newCarrierName isEqualToString:_carrierName]) {
|
if (![newCarrierName isEqualToString:_carrierName]) {
|
||||||
_carrierName = newCarrierName;
|
_carrierName = newCarrierName;
|
||||||
_isEncodingDirty = YES;
|
_isEncodingDirty = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Time zone
|
// Time zone
|
||||||
NSString *newTimeZoneAbbrev = [[NSTimeZone systemTimeZone] abbreviation];
|
NSTimeZone *timeZone = [NSTimeZone systemTimeZone];
|
||||||
if (![newTimeZoneAbbrev isEqualToString:_timeZoneAbbrev]) {
|
NSString *timeZoneName = timeZone.name;
|
||||||
_timeZoneAbbrev = newTimeZoneAbbrev;
|
if (![timeZoneName isEqualToString:_timeZoneName]) {
|
||||||
_isEncodingDirty = YES;
|
_timeZoneName = timeZoneName;
|
||||||
}
|
_timeZoneAbbrev = timeZone.abbreviation;
|
||||||
|
_isEncodingDirty = YES;
|
||||||
|
}
|
||||||
|
|
||||||
// Remaining disk space
|
// Remaining disk space
|
||||||
float remainingDiskSpace = [[FBSDKAppEventsDeviceInfo _getRemainingDiskSpace] floatValue];
|
float remainingDiskSpace = [[FBSDKAppEventsDeviceInfo _getRemainingDiskSpace] floatValue];
|
||||||
unsigned long long newRemainingDiskSpaceGB = (unsigned long long)round(remainingDiskSpace / FB_GIGABYTE);
|
unsigned long long newRemainingDiskSpaceGB = (unsigned long long)round(remainingDiskSpace / FB_GIGABYTE);
|
||||||
if (_remainingDiskSpaceGB != newRemainingDiskSpaceGB) {
|
if (_remainingDiskSpaceGB != newRemainingDiskSpaceGB) {
|
||||||
_remainingDiskSpaceGB = newRemainingDiskSpaceGB;
|
_remainingDiskSpaceGB = newRemainingDiskSpaceGB;
|
||||||
_isEncodingDirty = YES;
|
_isEncodingDirty = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastGroup1CheckTime = [FBSDKAppEventsUtility unixTimeNow];
|
_lastGroup1CheckTime = [FBSDKAppEventsUtility unixTimeNow];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)_generateEncoding
|
- (NSString *)_generateEncoding
|
||||||
{
|
{
|
||||||
// Keep a bit of precision on density as it's the most likely to become non-integer.
|
// Keep a bit of precision on density as it's the most likely to become non-integer.
|
||||||
NSString *densityString = _density ? [NSString stringWithFormat:@"%.02f", _density] : @"";
|
NSString *densityString = _density ? [NSString stringWithFormat:@"%.02f", _density] : @"";
|
||||||
|
|
||||||
NSArray *arr = @[
|
NSArray *arr = @[
|
||||||
@"i2", // version - starts with 'i' for iOS, we'll use 'a' for Android
|
@"i2", // version - starts with 'i' for iOS, we'll use 'a' for Android
|
||||||
_bundleIdentifier ?: @"",
|
_bundleIdentifier ?: @"",
|
||||||
_longVersion ?: @"",
|
_longVersion ?: @"",
|
||||||
_shortVersion ?: @"",
|
_shortVersion ?: @"",
|
||||||
_sysVersion ?: @"",
|
_sysVersion ?: @"",
|
||||||
_machine ?: @"",
|
_machine ?: @"",
|
||||||
_language ?: @"",
|
_language ?: @"",
|
||||||
_timeZoneAbbrev ?: @"",
|
_timeZoneAbbrev ?: @"",
|
||||||
_carrierName ?: @"",
|
_carrierName ?: @"",
|
||||||
_width ? @((unsigned long)_width) : @"",
|
_width ? @((unsigned long)_width) : @"",
|
||||||
_height ? @((unsigned long)_height) : @"",
|
_height ? @((unsigned long)_height) : @"",
|
||||||
densityString,
|
densityString,
|
||||||
@(_coreCount) ?: @"",
|
@(_coreCount) ?: @"",
|
||||||
@(_totalDiskSpaceGB) ?: @"",
|
@(_totalDiskSpaceGB) ?: @"",
|
||||||
@(_remainingDiskSpaceGB) ?: @"",
|
@(_remainingDiskSpaceGB) ?: @"",
|
||||||
];
|
_timeZoneName ?: @""
|
||||||
|
];
|
||||||
|
|
||||||
return [FBSDKInternalUtility JSONStringForObject:arr error:NULL invalidObjectHandler:NULL];
|
return [FBSDKInternalUtility JSONStringForObject:arr error:NULL invalidObjectHandler:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Helper Methods
|
#pragma mark - Helper Methods
|
||||||
|
|
||||||
+ (NSNumber *)_getTotalDiskSpace
|
+ (NSNumber *)_getTotalDiskSpace
|
||||||
{
|
{
|
||||||
NSDictionary *attrs = [[[NSFileManager alloc] init] attributesOfFileSystemForPath:NSHomeDirectory()
|
NSDictionary *attrs = [[[NSFileManager alloc] init] attributesOfFileSystemForPath:NSHomeDirectory()
|
||||||
error:nil];
|
error:nil];
|
||||||
return [attrs objectForKey:NSFileSystemSize];
|
return [attrs objectForKey:NSFileSystemSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSNumber *)_getRemainingDiskSpace
|
+ (NSNumber *)_getRemainingDiskSpace
|
||||||
{
|
{
|
||||||
NSDictionary *attrs = [[[NSFileManager alloc] init] attributesOfFileSystemForPath:NSHomeDirectory()
|
NSDictionary *attrs = [[[NSFileManager alloc] init] attributesOfFileSystemForPath:NSHomeDirectory()
|
||||||
error:nil];
|
error:nil];
|
||||||
return [attrs objectForKey:NSFileSystemFreeSize];
|
return [attrs objectForKey:NSFileSystemFreeSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (uint)_coreCount
|
+ (uint)_coreCount
|
||||||
{
|
{
|
||||||
return [FBSDKAppEventsDeviceInfo _readSysCtlUInt:CTL_HW type:HW_AVAILCPU];
|
return [FBSDKAppEventsDeviceInfo _readSysCtlUInt:CTL_HW type:HW_AVAILCPU];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (uint)_readSysCtlUInt:(int)ctl type:(int)type
|
+ (uint)_readSysCtlUInt:(int)ctl type:(int)type
|
||||||
{
|
{
|
||||||
int mib[2] = {ctl, type};
|
int mib[2] = {ctl, type};
|
||||||
uint value;
|
uint value;
|
||||||
size_t size = sizeof value;
|
size_t size = sizeof value;
|
||||||
if (0 != sysctl(mib, FB_ARRAY_COUNT(mib), &value, &size, NULL, 0)) {
|
if (0 != sysctl(mib, FB_ARRAY_COUNT(mib), &value, &size, NULL, 0)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSString *)_getCarrier
|
+ (NSString *)_getCarrier
|
||||||
@ -248,10 +268,10 @@ static FBSDKAppEventsDeviceInfo *g_singleton;
|
|||||||
#if TARGET_OS_TV
|
#if TARGET_OS_TV
|
||||||
return @"NoCarrier";
|
return @"NoCarrier";
|
||||||
#else
|
#else
|
||||||
// Dynamically load class for this so calling app doesn't need to link framework in.
|
// Dynamically load class for this so calling app doesn't need to link framework in.
|
||||||
CTTelephonyNetworkInfo *networkInfo = [[fbsdkdfl_CTTelephonyNetworkInfoClass() alloc] init];
|
CTTelephonyNetworkInfo *networkInfo = [[fbsdkdfl_CTTelephonyNetworkInfoClass() alloc] init];
|
||||||
CTCarrier *carrier = [networkInfo subscriberCellularProvider];
|
CTCarrier *carrier = [networkInfo subscriberCellularProvider];
|
||||||
return [carrier carrierName] ?: @"NoCarrier";
|
return [carrier carrierName] ?: @"NoCarrier";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "PNObject",
|
"name": "PNObject",
|
||||||
"version": "0.4.5",
|
"version": "0.4.6",
|
||||||
"summary": "PNObject is a simple replica of the more complex ParseObject",
|
"summary": "PNObject is a simple replica of the more complex ParseObject",
|
||||||
"homepage": "https://github.com/giuseppenucifora/PNObject",
|
"homepage": "https://github.com/giuseppenucifora/PNObject",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"source": {
|
"source": {
|
||||||
"git": "https://github.com/giuseppenucifora/PNObject.git",
|
"git": "https://github.com/giuseppenucifora/PNObject.git",
|
||||||
"tag": "0.4.5"
|
"tag": "0.4.6"
|
||||||
},
|
},
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"ios": "8.0"
|
"ios": "8.0"
|
||||||
|
|||||||
16
Example/Pods/Manifest.lock
generated
16
Example/Pods/Manifest.lock
generated
@ -26,11 +26,11 @@ PODS:
|
|||||||
- Expecta+Snapshots (2.0.0):
|
- Expecta+Snapshots (2.0.0):
|
||||||
- Expecta (~> 1.0)
|
- Expecta (~> 1.0)
|
||||||
- FBSnapshotTestCase/Core (~> 2.0.3)
|
- FBSnapshotTestCase/Core (~> 2.0.3)
|
||||||
- FBSDKCoreKit (4.10.0):
|
- FBSDKCoreKit (4.10.1):
|
||||||
- Bolts (~> 1.5)
|
- Bolts (~> 1.5)
|
||||||
- FBSDKLoginKit (4.10.0):
|
- FBSDKLoginKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKShareKit (4.10.0):
|
- FBSDKShareKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSnapshotTestCase (2.0.7):
|
- FBSnapshotTestCase (2.0.7):
|
||||||
- FBSnapshotTestCase/SwiftSupport (= 2.0.7)
|
- FBSnapshotTestCase/SwiftSupport (= 2.0.7)
|
||||||
@ -44,7 +44,7 @@ PODS:
|
|||||||
- CocoaSecurity (~> 1.2.2)
|
- CocoaSecurity (~> 1.2.2)
|
||||||
- nv-ios-http-status (0.0.1)
|
- nv-ios-http-status (0.0.1)
|
||||||
- PEAR-FileManager-iOS (1.3.1)
|
- PEAR-FileManager-iOS (1.3.1)
|
||||||
- PNObject (0.4.5):
|
- PNObject (0.4.6):
|
||||||
- AFNetworking
|
- AFNetworking
|
||||||
- CodFis-Helper
|
- CodFis-Helper
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
@ -93,9 +93,9 @@ SPEC CHECKSUMS:
|
|||||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||||
Expecta+Snapshots: 29b38dd695bc72a0ed2bea833937d78df41943ba
|
Expecta+Snapshots: 29b38dd695bc72a0ed2bea833937d78df41943ba
|
||||||
FBSDKCoreKit: 13bec8373fb3af94d44daf2aa1e0958687897fbd
|
FBSDKCoreKit: d2aaed5e9ab7d8d6301c533376a1fbff1cf3deb5
|
||||||
FBSDKLoginKit: d3d4a2e9d31954deb00bfea964167a05ca1ea976
|
FBSDKLoginKit: 699ff169080e3072de4b9b0faca90bf23dc36deb
|
||||||
FBSDKShareKit: 54587b4624706ace1e810cf83412a918141f807a
|
FBSDKShareKit: 2fd887cce0056bdda91f99b2021d724a4fed8e88
|
||||||
FBSnapshotTestCase: 7e85180d0d141a0cf472352edda7e80d7eaeb547
|
FBSnapshotTestCase: 7e85180d0d141a0cf472352edda7e80d7eaeb547
|
||||||
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
||||||
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
||||||
@ -103,7 +103,7 @@ SPEC CHECKSUMS:
|
|||||||
NSUserDefaults-AESEncryptor: da02cfef056f1e18ebe2748767915f08b274c9c5
|
NSUserDefaults-AESEncryptor: da02cfef056f1e18ebe2748767915f08b274c9c5
|
||||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||||
PNObject: e3104b38e9aa668a992de191cb4630440cce5cf3
|
PNObject: 20b785cb5cbf88322f2c268a5ba80ca3337dec51
|
||||||
PureLayout: f35f5384c9c4e4479df041dbe33ad7577b71ddfb
|
PureLayout: f35f5384c9c4e4479df041dbe33ad7577b71ddfb
|
||||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
buildForArchiving = "YES">
|
buildForArchiving = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = 'primary'
|
BuildableIdentifier = 'primary'
|
||||||
BlueprintIdentifier = 'EEAC74642D33DB6F05CFDAD2'
|
BlueprintIdentifier = '24B6537E15CF8A8F679D4558'
|
||||||
BlueprintName = 'PNObject'
|
BlueprintName = 'PNObject'
|
||||||
ReferencedContainer = 'container:Pods.xcodeproj'
|
ReferencedContainer = 'container:Pods.xcodeproj'
|
||||||
BuildableName = 'PNObject.framework'>
|
BuildableName = 'PNObject.framework'>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.10.0</string>
|
<string>4.10.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.10.0</string>
|
<string>4.10.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.10.0</string>
|
<string>4.10.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.4.5</string>
|
<string>0.4.6</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -274,11 +274,7 @@ static bool isFirstAccess = YES;
|
|||||||
[[PNObjectConfig sharedInstance] refreshTokenForUserWithEmail:email password:password withBlockSuccess:^(BOOL refreshSuccess) {
|
[[PNObjectConfig sharedInstance] refreshTokenForUserWithEmail:email password:password withBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
if (refreshSuccess) {
|
if (refreshSuccess) {
|
||||||
|
|
||||||
if ([[self class] currentUser]) {
|
PNUser *user = [[self class] new];
|
||||||
[[[self class] currentUser] resetUser];
|
|
||||||
}
|
|
||||||
|
|
||||||
PNUser *user = [[self class] currentUser];
|
|
||||||
|
|
||||||
PNObjcPassword *objectPassword = [PNObjcPassword new];
|
PNObjcPassword *objectPassword = [PNObjcPassword new];
|
||||||
[objectPassword setPassword:password];
|
[objectPassword setPassword:password];
|
||||||
@ -289,6 +285,8 @@ static bool isFirstAccess = YES;
|
|||||||
[user setPassword:objectPassword];
|
[user setPassword:objectPassword];
|
||||||
[user saveLocally];
|
[user saveLocally];
|
||||||
[user reloadFormServer];
|
[user reloadFormServer];
|
||||||
|
|
||||||
|
USER = user;
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
success(user);
|
success(user);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user