Showing preview only (214K chars total). Download the full file or copy to clipboard to get everything.
Repository: andrealufino/ALSystemUtilities
Branch: develop
Commit: 25930053cf86
Files: 61
Total size: 195.3 KB
Directory structure:
gitextract_bmllzn_c/
├── .gitignore
├── ALSystemUtilities/
│ ├── ALSystemUtilities/
│ │ ├── ALAccessory/
│ │ │ ├── ALAccessory.h
│ │ │ └── ALAccessory.m
│ │ ├── ALBattery/
│ │ │ ├── ALBattery.h
│ │ │ └── ALBattery.m
│ │ ├── ALCarrier/
│ │ │ ├── ALCarrier.h
│ │ │ └── ALCarrier.m
│ │ ├── ALDisk/
│ │ │ ├── ALDisk.h
│ │ │ └── ALDisk.m
│ │ ├── ALHardware/
│ │ │ ├── ALHardware.h
│ │ │ └── ALHardware.m
│ │ ├── ALJailbreak/
│ │ │ ├── ALJailbreak.h
│ │ │ └── ALJailbreak.m
│ │ ├── ALLocalization/
│ │ │ ├── ALLocalization.h
│ │ │ └── ALLocalization.m
│ │ ├── ALMemory/
│ │ │ ├── ALMemory.h
│ │ │ └── ALMemory.m
│ │ ├── ALNetwork/
│ │ │ ├── ALNetwork.h
│ │ │ └── ALNetwork.m
│ │ ├── ALProcessor/
│ │ │ ├── ALProcessor.h
│ │ │ └── ALProcessor.m
│ │ ├── ALSystem.h
│ │ ├── ALSystem.m
│ │ ├── ALSystemConstants/
│ │ │ ├── ALSystemConstants.h
│ │ │ ├── ALSystem_ALBatteryConstants.h
│ │ │ ├── ALSystem_AccessoryConstants.h
│ │ │ ├── ALSystem_CarrierConstants.h
│ │ │ ├── ALSystem_DiskConstants.h
│ │ │ ├── ALSystem_HardwareConstants.h
│ │ │ ├── ALSystem_JailbreakConstants.h
│ │ │ ├── ALSystem_LocalizationConstants.h
│ │ │ ├── ALSystem_MemoryConstants.h
│ │ │ ├── ALSystem_NetworkConstants.h
│ │ │ └── ALSystem_ProcessorConstants.h
│ │ ├── Reachability/
│ │ │ ├── Reachability.h
│ │ │ └── Reachability.m
│ │ └── Resources/
│ │ ├── iPad/
│ │ │ ├── iPad2.plist
│ │ │ ├── iPad3.plist
│ │ │ ├── iPad4.plist
│ │ │ ├── iPadAir.plist
│ │ │ ├── iPadMini.plist
│ │ │ └── iPadMiniRetina.plist
│ │ ├── iPhone/
│ │ │ ├── iPhone3Gs.plist
│ │ │ ├── iPhone4.plist
│ │ │ ├── iPhone4s.plist
│ │ │ ├── iPhone5.plist
│ │ │ ├── iPhone5c.plist
│ │ │ ├── iPhone5s.plist
│ │ │ ├── iPhone6.plist
│ │ │ └── iPhone6Plus.plist
│ │ └── iPodTouch/
│ │ ├── iPodTouch3.plist
│ │ ├── iPodTouch4.plist
│ │ └── iPodTouch5.plist
│ ├── ALSystemUtilities-Info.plist
│ ├── ALSystemUtilities-Prefix.pch
│ └── en.lproj/
│ └── InfoPlist.strings
├── ALSystemUtilities.podspec
├── ALSystemUtilities.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
├── LICENSE
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALAccessory/ALAccessory.h
================================================
//
// ALAccessory.h
// ALSystem
//
// Created by Andrea Mario Lufino on 22/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <ExternalAccessory/ExternalAccessory.h>
#import <AudioToolbox/AudioToolbox.h>
/*!
* This class detect if there are accessories plugged into the device
*/
@interface ALAccessory : NSObject
/*!
Check if there are accessories plugged in
@return YES if there are accessories plugged in, NO if there aren't
*/
+ (BOOL)accessoriesPluggedIn;
/*!
Check the number of accessories plugged in
@return NSInteger which represents the number of accessories plugged in
*/
+ (NSInteger)numberOfAccessoriesPluggedIn;
/*!
Check if headphones is plugged in
@return YES if headphones are plugged in, NO if it aren't
*/
+ (BOOL)isHeadphonesAttached;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALAccessory/ALAccessory.m
================================================
//
// ALAccessory.m
// ALSystem
//
// Created by Andrea Mario Lufino on 22/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALAccessory.h"
@implementation ALAccessory
+ (BOOL)accessoriesPluggedIn {
NSInteger accessoryCount = [[[EAAccessoryManager sharedAccessoryManager] connectedAccessories] count];
if (accessoryCount > 0)
return YES;
else
return NO;
}
+ (NSInteger)numberOfAccessoriesPluggedIn {
return [[[EAAccessoryManager sharedAccessoryManager] connectedAccessories] count];
}
// TODO: Da sviluppare ASSOLUTAMENTE
+ (BOOL)isHeadphonesAttached {
return NO;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALBattery/ALBattery.h
================================================
//
// ALBattery.h
// ALSystem
//
// Created by Andrea Mario Lufino on 18/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class is useful to retrieve informations about the battery status
*/
@interface ALBattery : NSObject
/*!
----------------------------
/// @name Methods
----------------------------
*/
/*!
Check if the battery is fully charged
@return YES if the battery is fully charged, NO if it isn't
*/
+ (BOOL)batteryFullCharged;
/*!
Check if the battery is charging
@return YES if the battery is charging, NO if it isn't
*/
+ (BOOL)inCharge;
/*!
Check if the device is plugged into power
@return YES if the device is plugged into power, NO if it isn't
*/
+ (BOOL)devicePluggedIntoPower;
/*!
The battery state of the device
@return UIDeviceBatteryState value which represent the current status of the battery
*/
+ (UIDeviceBatteryState)batteryState;
/*!
Retrieve the battery level of the battery
@return A CGFloat value which represents the current battery level
*/
+ (CGFloat)batteryLevel;
/*!
The remaining hours for standby
@return NSString represents the remaining hours for standby
*/
+ (NSString *)remainingHoursForStandby;
/*!
The remaining hours for 3g conversation
@return NSString represents the remaining hours for 3g conversation
*/
+ (NSString *)remainingHoursFor3gConversation;
/*!
The remaining hours for 2g conversation
@return NSString represents the remaining hours for 2g conversation
*/
+ (NSString *)remainingHoursFor2gConversation;
/*!
The remaining hours for 3g internet navigation
@return NSString represents the remaining hours for 3g internet navigation
*/
+ (NSString *)remainingHoursForInternet3g;
/*!
The remaining hours for WiFi internet navigation
@return NSString represents the remaining hours for WiFi internet navigation
*/
+ (NSString *)remainingHoursForInternetWiFi;
/*!
The remaining hours for video reproduction
@return NSString represents the remaining hours for video reproduction
*/
+ (NSString *)remainingHoursForVideo;
/*!
The remaining hours for audio reproduction
@return NSString represents the remaining hours for reproduction
*/
+ (NSString *)remainingHoursForAudio;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALBattery/ALBattery.m
================================================
//
// ALBattery.m
// ALSystem
//
// Created by Andrea Mario Lufino on 18/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALBattery.h"
#import <sys/utsname.h>
#import "ALHardware.h"
@interface ALBattery ()
+ (UIDevice *)device;
+ (NSDictionary *)infoForDevice;
@end
@implementation ALBattery
#pragma mark - UIDevice
+ (UIDevice *)device {
[UIDevice currentDevice].batteryMonitoringEnabled = YES;
return [UIDevice currentDevice];
}
#pragma mark - Info for device
+ (NSDictionary *)infoForDevice {
NSString *device = [ALHardware platformType];
NSDictionary *info = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[device stringByReplacingOccurrencesOfString:@" " withString:@""] ofType:@"plist"]];
return info;
}
#pragma mark - Battery methods
+ (BOOL)batteryFullCharged {
if ([self batteryLevel] == 100.00) {
return YES;
} else {
return NO;
}
}
+ (BOOL)inCharge {
if ([self device].batteryState == UIDeviceBatteryStateCharging ||
[self device].batteryState == UIDeviceBatteryStateFull) {
return YES;
} else {
return NO;
}
}
+ (BOOL)devicePluggedIntoPower {
if ([self device].batteryState == UIDeviceBatteryStateUnplugged) {
return NO;
} else {
return YES;
}
}
+ (UIDeviceBatteryState)batteryState {
return [self device].batteryState;
}
+ (CGFloat)batteryLevel {
CGFloat batteryLevel = 0.0f;
CGFloat batteryCharge = [self device].batteryLevel;
if (batteryCharge > 0.0f)
batteryLevel = batteryCharge * 100;
else
// Unable to find battery level
return -1;
return batteryLevel;
}
+ (NSString *)remainingHoursForStandby {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"standby"]) {
maxHours = [[info objectForKey:@"standby"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; //get hours
NSInteger minutes = totMinutes - (hours * 60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
+ (NSString *)remainingHoursFor3gConversation {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"conversation3g"]) {
maxHours = [[info objectForKey:@"conversation3g"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; //get hours
NSInteger minutes = totMinutes - (hours * 60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
+ (NSString *)remainingHoursFor2gConversation {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"conversation2g"]) {
maxHours = [[info objectForKey:@"conversation2g"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; //get hours
NSInteger minutes = totMinutes - (hours * 60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
+ (NSString *)remainingHoursForInternet3g {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"internet3g"]) {
maxHours = [[info objectForKey:@"internet3g"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; //get hours
NSInteger minutes = totMinutes - (hours * 60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
+ (NSString *)remainingHoursForInternetWiFi {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"internetwifi"]) {
maxHours = [[info objectForKey:@"internetwifi"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; //get hours
NSInteger minutes = totMinutes - (hours * 60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
+ (NSString *)remainingHoursForVideo {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"video"]) {
maxHours = [[info objectForKey:@"video"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; // get hours
NSInteger minutes = totMinutes - (hours *60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
+ (NSString *)remainingHoursForAudio {
CGFloat batteryLevel = [self batteryLevel];
NSDictionary *info = [self infoForDevice];
NSInteger maxHours = 0;
if ([info objectForKey:@"audio"]) {
maxHours = [[info objectForKey:@"audio"] integerValue];
CGFloat totMinutes = (maxHours - ((100 - batteryLevel) * maxHours / 100)) * 60; //remaining time in minutes
NSInteger hours = totMinutes / 60; //get hours
NSInteger minutes = totMinutes - (hours * 60); // get minutes
if (hours < 0 || minutes < 0) {
return [NSString stringWithFormat:@"ND"];
}
return [NSString stringWithFormat:@"%li:%02li",(long)hours,(long)minutes];
} else
return @"NS";
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALCarrier/ALCarrier.h
================================================
//
// ALCarrier.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class provides method to get info about the carrier
*/
@interface ALCarrier : NSObject
/*!
The carrier name
@return NSString represents the carrier name
*/
+ (NSString *)carrierName;
/*!
The ISO country code of the carrier
@return NSString represents the ISO country code of the carrier
*/
+ (NSString *)carrierISOCountryCode;
/*!
The carrier mobile country code
@return NSString represents the mobile country code of the carrier
*/
+ (NSString *)carrierMobileCountryCode;
/*!
The carrier mobile network code
@return NSString represents the mobile network code
*/
+ (NSString *)carrierMobileNetworkCode;
/*!
Check if the carrier allows VOIP
@return YES if the carrier allows VOIP, NO if it isn't
*/
+ (BOOL)carrierAllowsVOIP;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALCarrier/ALCarrier.m
================================================
//
// ALCarrier.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALCarrier.h"
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
@implementation ALCarrier
+ (NSString *)carrierName {
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
return [carrier carrierName];
}
+ (NSString *)carrierISOCountryCode {
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
return [carrier isoCountryCode];
}
+ (NSString *)carrierMobileCountryCode {
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
return [carrier mobileCountryCode];
}
+ (NSString *)carrierMobileNetworkCode {
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
return [carrier mobileNetworkCode];
}
+ (BOOL)carrierAllowsVOIP {
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
return [carrier allowsVOIP];
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALDisk/ALDisk.h
================================================
//
// ALDisk.h
// ALSystem
//
// Created by Andrea Mario Lufino on 19/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* Check total and free disk space
*/
@interface ALDisk : NSObject
/*!
The total disk space
@return String which represents the total disk space
*/
+ (NSString *)totalDiskSpace;
/*!
The free disk space
@return String which represents the free disk space
*/
+ (NSString *)freeDiskSpace;
/*!
The used disk space
@return String which represents the used disk space
*/
+ (NSString *)usedDiskSpace;
/*!
The total disk space in bytes
@return CGFloat represents the total disk space in bytes
*/
+ (CGFloat)totalDiskSpaceInBytes;
/*!
The free disk space in bytes
@return CGFloat represents the free disk space in bytes
*/
+ (CGFloat)freeDiskSpaceInBytes;
/*!
The used disk space in bytes
@return CGFloat represents the used disk space in bytes
*/
+ (CGFloat)usedDiskSpaceInBytes;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALDisk/ALDisk.m
================================================
//
// ALDisk.m
// ALSystem
//
// Created by Andrea Mario Lufino on 19/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALDisk.h"
#define MB (1024*1024)
#define GB (MB*1024)
@implementation ALDisk
#pragma mark - Formatter
+ (NSString *)memoryFormatter:(long long)diskSpace {
NSString *formatted;
double bytes = 1.0 * diskSpace;
double megabytes = bytes / MB;
double gigabytes = bytes / GB;
if (gigabytes >= 1.0)
formatted = [NSString stringWithFormat:@"%.2f GB", gigabytes];
else if (megabytes >= 1.0)
formatted = [NSString stringWithFormat:@"%.2f MB", megabytes];
else
formatted = [NSString stringWithFormat:@"%.2f bytes", bytes];
return formatted;
}
#pragma mark - Methods
+ (NSString *)totalDiskSpace {
long long space = [[[[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil] objectForKey:NSFileSystemSize] longLongValue];
return [self memoryFormatter:space];
}
+ (NSString *)freeDiskSpace {
long long freeSpace = [[[[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil] objectForKey:NSFileSystemFreeSize] longLongValue];
return [self memoryFormatter:freeSpace];
}
+ (NSString *)usedDiskSpace {
return [self memoryFormatter:[self usedDiskSpaceInBytes]];
}
+ (CGFloat)totalDiskSpaceInBytes {
long long space = [[[[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil] objectForKey:NSFileSystemSize] longLongValue];
return space;
}
+ (CGFloat)freeDiskSpaceInBytes {
long long freeSpace = [[[[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil] objectForKey:NSFileSystemFreeSize] longLongValue];
return freeSpace;
}
+ (CGFloat)usedDiskSpaceInBytes {
long long usedSpace = [self totalDiskSpaceInBytes] - [self freeDiskSpaceInBytes];
return usedSpace;
}
/*! WORK IN PROGRESS */
+ (CGFloat)numberOfNodes {
long long numberOfNodes = [[[[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil] objectForKey:NSFileSystemNodes] longLongValue];
return numberOfNodes;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALHardware/ALHardware.h
================================================
//
// ALHardware.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class check some hardware (and software) informations
*/
@interface ALHardware : NSObject
/*!
Check the device model
@return NSString with the device model
*/
+ (NSString *)deviceModel;
/*!
Check the device name
@return NSString with the device name
*/
+ (NSString *)deviceName;
/*!
Check the system name
@return NSString with the system name
*/
+ (NSString *)systemName;
/*!
Check the system version
@return NSString with the system version
*/
+ (NSString *)systemVersion;
/*!
Check the screen width in pixel
@return NSInteger value of the width of the screen
*/
+ (NSInteger)screenWidth;
/*!
Check the screen height in pixel
@return NSInteger value of the height of the screen
*/
+ (NSInteger)screenHeight;
/*!
Check the screen brightness
@return CGFloat value of the brightness of the screen
*/
+ (CGFloat)brightness;
/*!
Get the device type
@return NSString represents the platform type (ex. : iPhone 5)
*/
+ (NSString *)platformType;
/*!
Get the boot time in hours, minutes and seconds
@return NSString represents the boot time in hours, minutes and seconds
*/
+ (NSDate *)bootTime;
/*!
Check for the proximity sensor
@return YES if the proximity sensor exist, NO if it isn't
*/
+ (BOOL)proximitySensor;
/*!
Check if the multitasking is enabled
@return YES if the multitasking is enabled, NO if it isn't
*/
+ (BOOL)multitaskingEnabled;
// 1.2
/*!
The sim type
@return NSString with the sim type
*/
+ (NSString *)sim;
/*!
The device's dimensions
@return NSString with the dimensions
*/
+ (NSString *)dimensions;
/*!
The weight of the device
@return NSString with the weight of the device
*/
+ (NSString *)weight;
/*!
The display type of the device
@return NSString with the display type
*/
+ (NSString *)displayType;
/*!
The display density
@return NSString with the display density
*/
+ (NSString *)displayDensity;
/*!
The WLAN type
@return NSString with the WLAN type
*/
+ (NSString *)WLAN;
/*!
The bluetooth version
@return NSString with the bluetooth version
*/
+ (NSString *)bluetooth;
/*!
Details about primary camera of the device
@return NSString with details about primary camera
*/
+ (NSString *)cameraPrimary;
/*!
Details about secondary camera of the device
@return NSString with details about secondary camera
*/
+ (NSString *)cameraSecondary;
/*!
The cpu of the device
@return NSString with the cpu of the device
*/
+ (NSString *)cpu;
/*!
The gpu of the device
@return NSString with the gpu of the device
*/
+ (NSString *)gpu;
/*!
Check for Siri
@return YES if Siri is present, NO if it isn't
*/
+ (BOOL)siri;
/*!
Check for the Touch ID
@return YES if Touch ID is present, NO if it isn't
*/
+ (BOOL)touchID;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALHardware/ALHardware.m
================================================
//
// ALHardware.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALHardware.h"
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#define MIB_SIZE 2
@interface ALHardware ()
+ (NSDictionary *)infoForDevice;
@end
@implementation ALHardware
#pragma mark - Info for device
+ (NSDictionary *)infoForDevice {
NSString *device = [ALHardware platformType];
NSDictionary *info = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[device stringByReplacingOccurrencesOfString:@" " withString:@""] ofType:@"plist"]];
return info;
}
#pragma mark - Methods
+ (NSString *)deviceModel {
return [[UIDevice currentDevice] model];
}
+ (NSString *)deviceName {
return [[UIDevice currentDevice] name];
}
+ (NSString *)systemName {
return [[UIDevice currentDevice] systemName];
}
+ (NSString *)systemVersion {
return [[UIDevice currentDevice] systemVersion];
}
+ (NSInteger)screenWidth {
return [[UIScreen mainScreen] bounds].size.width;
}
+ (NSInteger)screenHeight {
return [[UIScreen mainScreen] bounds].size.height;
}
+ (CGFloat)brightness {
return [[UIScreen mainScreen] brightness] * 100;
}
+ (NSString *)platformType {
struct utsname systemInfo;
uname(&systemInfo);
NSString *result = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
NSString *type;
if ([result isEqualToString:@"i386"]) type = @"Simulator";
if ([result isEqualToString:@"iPod3,1"]) type = @"iPod Touch 3";
if ([result isEqualToString:@"iPod4,1"]) type = @"iPod Touch 4";
if ([result isEqualToString:@"iPod5,1"]) type = @"iPod Touch 5";
if ([result isEqualToString:@"iPhone2,1"]) type = @"iPhone 3Gs";
if ([result isEqualToString:@"iPhone3,1"]) type = @"iPhone 4";
if ([result isEqualToString:@"iPhone4,1"]) type = @"iPhone 4s";
if ([result isEqualToString:@"iPhone5,1"] ||
[result isEqualToString:@"iPhone5,2"]) type = @"iPhone 5";
if ([result isEqualToString:@"iPad2,1"] ||
[result isEqualToString:@"iPad2,2"] ||
[result isEqualToString:@"iPad2,3"]) type = @"iPad 2";
if ([result isEqualToString:@"iPad3,1"] ||
[result isEqualToString:@"iPad3,2"] ||
[result isEqualToString:@"iPad3,3"]) type = @"iPad 3";
if ([result isEqualToString:@"iPad3,4"] ||
[result isEqualToString:@"iPad3,5"] ||
[result isEqualToString:@"iPad3,6"]) type = @"iPad 4";
if ([result isEqualToString:@"iPad4,1"] ||
[result isEqualToString:@"iPad4,2"]) type = @"iPad Air";
if ([result isEqualToString:@"iPad5,3"] ||
[result isEqualToString:@"iPad5,4"]) type = @"iPad Air 2";
if ([result isEqualToString:@"iPad2,5"] ||
[result isEqualToString:@"iPad2,6"] ||
[result isEqualToString:@"iPad2,7"]) type = @"iPad Mini";
if ([result isEqualToString:@"iPad4,4"] ||
[result isEqualToString:@"iPad4,5"]) type = @"iPad Mini Retina";
if ([result isEqualToString:@"iPhone6,1"] ||
[result isEqualToString:@"iPhone6,2"]) type = @"iPhone 5s";
if ([result isEqualToString:@"iPhone5,3"] ||
[result isEqualToString:@"iPhone5,4"]) type = @"iPhone 5c";
if ([result isEqualToString:@"iPhone7,2"]) type = @"iPhone 6";
if ([result isEqualToString:@"iPhone7,1"]) type = @"iPhone 6 Plus";
if (!type) {
NSInteger index = MAX([result rangeOfString:@"iPhone"].length, [result rangeOfString:@"iPad"].length);
if (index == 0) {
index = [result rangeOfString:@"iPod"].length;
}
if (index > 0) {
type = [result substringToIndex:index];
}
}
return type;
}
+ (NSString *)bootTime {
NSInteger ti = (NSInteger)[[NSProcessInfo processInfo] systemUptime];
NSInteger seconds = ti % 60;
NSInteger minutes = (ti / 60) % 60;
NSInteger hours = (ti / 3600);
return [NSString stringWithFormat:@"%02li:%02li:%02li", (long)hours, (long)minutes, (long)seconds];
}
+ (BOOL)proximitySensor {
// Make a Bool for the proximity Sensor
BOOL proximitySensor = NO;
// Is the proximity sensor enabled?
if ([[UIDevice currentDevice] respondsToSelector:@selector(setProximityMonitoringEnabled:)]) {
// Create a UIDevice variable
UIDevice *device = [UIDevice currentDevice];
// Turn the sensor on, if not already on, and see if it works
if (device.proximityMonitoringEnabled != YES) {
// Sensor is off
// Turn it on
[device setProximityMonitoringEnabled:YES];
// See if it turned on
if (device.proximityMonitoringEnabled == YES) {
// It turned on! Turn it off
[device setProximityMonitoringEnabled:NO];
// It works
proximitySensor = YES;
} else {
// Didn't turn on, no good
proximitySensor = NO;
}
} else {
// Sensor is already on
proximitySensor = YES;
}
}
// Return on or off
return proximitySensor;
}
+ (BOOL)multitaskingEnabled {
// Is multitasking enabled?
if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]) {
// Create a bool
BOOL multitaskingSupported = [UIDevice currentDevice].multitaskingSupported;
// Return the value
return multitaskingSupported;
} else {
// Doesn't respond to selector
return NO;
}
}
// 1.2
+ (NSString *)sim {
return [[self infoForDevice] objectForKey:@"sim"];
}
+ (NSString *)dimensions {
return [[self infoForDevice] objectForKey:@"dimensions"];
}
+ (NSString *)weight {
return [[self infoForDevice] objectForKey:@"weight"];
}
+ (NSString *)displayType {
return [[self infoForDevice] objectForKey:@"display-type"];
}
+ (NSString *)displayDensity {
return [[self infoForDevice] objectForKey:@"display-density"];
}
+ (NSString *)WLAN {
return [[self infoForDevice] objectForKey:@"WLAN"];
}
+ (NSString *)bluetooth {
return [[self infoForDevice] objectForKey:@"bluetooth"];
}
+ (NSString *)cameraPrimary {
return [[self infoForDevice] objectForKey:@"camera-primary"];
}
+ (NSString *)cameraSecondary {
return [[self infoForDevice] objectForKey:@"camera-secondary"];
}
+ (NSString *)cpu {
return [[self infoForDevice] objectForKey:@"cpu"];
}
+ (NSString *)gpu {
return [[self infoForDevice] objectForKey:@"gpu"];
}
+ (BOOL)siri {
if ([[[self infoForDevice] objectForKey:@"siri"] isEqualToString:@"Yes"])
return YES;
else
return NO;
}
+ (BOOL)touchID {
if ([[[self infoForDevice] objectForKey:@"touch-id"] isEqualToString:@"Yes"])
return YES;
else
return NO;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALJailbreak/ALJailbreak.h
================================================
//
// ALJailbreak.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class detects if the device is jailbroken. The class check the presence or less of the Cydia.app
*/
@interface ALJailbreak : NSObject
/*!
Check if the device is jailbroken
@return YES if the device is jailbroken, NO if it isn't
*/
+ (BOOL)isJailbroken;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALJailbreak/ALJailbreak.m
================================================
//
// ALJailbreak.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALJailbreak.h"
#include <stdio.h>
#include <stdlib.h>
@implementation ALJailbreak
+ (BOOL)isJailbroken {
// NSString *filePath = @"/Applications/Cydia.app";
// if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])
// return YES;
// else
// return NO;
FILE *f = fopen("/bin/bash", "r");
BOOL isJailbroken = NO;
if (f != NULL)
// Device is jailbroken
isJailbroken = YES;
else
// Device isn't jailbroken
isJailbroken = NO;
fclose(f);
return isJailbroken;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALLocalization/ALLocalization.h
================================================
//
// ALLocalization.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class provides some informations about the localization of the device
*/
@interface ALLocalization : NSObject
/*!
The language of the system
@return NSString representing the language
*/
+ (NSString *)language;
/*!
The current time zone
@return NSString representing the time zone
*/
+ (NSString *)timeZone;
/*!
The currency symbol of the system
@return NSString representing the current currency symbol
*/
+ (NSString *)currencySymbol;
/*!
The currency code of the system
@return NSString representing the currency code
*/
+ (NSString *)currencyCode;
/*!
The country
@return NSString representing the country of the system
*/
+ (NSString *)country;
/*!
The measurement system
@return NSString representing the measurement system
*/
+ (NSString *)measurementSystem;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALLocalization/ALLocalization.m
================================================
//
// ALLocalization.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALLocalization.h"
@implementation ALLocalization
+ (NSString *)language {
return [[NSLocale preferredLanguages] objectAtIndex:0];
}
+ (NSString *)timeZone {
return [[NSTimeZone systemTimeZone] name];
}
+ (NSString *)currencySymbol {
return [[NSLocale currentLocale] objectForKey:NSLocaleCurrencySymbol];
}
+ (NSString *)currencyCode {
return [[NSLocale currentLocale] objectForKey:NSLocaleCurrencyCode];
}
+ (NSString *)country {
return [[NSLocale currentLocale] localeIdentifier];
}
+ (NSString *)measurementSystem {
return [[NSLocale currentLocale] objectForKey:NSLocaleMeasurementSystem];
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALMemory/ALMemory.h
================================================
//
// ALMemory.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class provides some informations about the memory of the device
*/
@interface ALMemory : NSObject
/*!
Check the total memory of the device
@return NSInteger value which represents the total memory
*/
+ (NSInteger)totalMemory;
/*!
Check free memory
@return CGFloat which represents the free memory
*/
+ (CGFloat)freeMemory;
/*!
Check the used memory
@return CGFloat which represents the used memory
*/
+ (CGFloat)usedMemory;
/*!
Check the active memory
@return CGFloat which represents the active memory of the device
*/
+ (CGFloat)activeMemory;
/*!
Check wired memory
@return CGFloat which represents the wired memory
*/
+ (CGFloat)wiredMemory;
/*!
Check the inactive memory
@return CGFloat which represents the inactive memory
*/
+ (CGFloat)inactiveMemory;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALMemory/ALMemory.m
================================================
//
// ALMemory.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALMemory.h"
#import <mach/mach.h>
#import <mach/mach_host.h>
@implementation ALMemory
+ (NSInteger)totalMemory {
NSInteger nearest = 256;
NSInteger totalMemory = (NSInteger)([[NSProcessInfo processInfo] physicalMemory] / 1024 / 1024);
NSInteger rem = totalMemory % nearest;
NSInteger tot = totalMemory - rem;
if (rem >= nearest/2) {
tot += 256;
}
return tot;
}
+ (CGFloat)freeMemory {
double totalMemory = 0.00;
vm_statistics_data_t vmStats;
mach_msg_type_number_t infoCount = HOST_VM_INFO_COUNT;
kern_return_t kernReturn = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmStats, &infoCount);
if(kernReturn != KERN_SUCCESS) {
return -1;
}
totalMemory = ((vm_page_size * vmStats.free_count) / 1024) / 1024;
return totalMemory;
}
+ (CGFloat)usedMemory {
double usedMemory = 0.00;
vm_statistics_data_t vmStats;
mach_msg_type_number_t infoCount = HOST_VM_INFO_COUNT;
kern_return_t kernReturn = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmStats, &infoCount);
if(kernReturn != KERN_SUCCESS) {
return -1;
}
usedMemory = ((vm_page_size * (vmStats.active_count + vmStats.inactive_count + vmStats.wire_count)) / 1024) / 1024;
return usedMemory;
}
+ (CGFloat)activeMemory {
double activeMemory = 0.00;
vm_statistics_data_t vmStats;
mach_msg_type_number_t infoCount = HOST_VM_INFO_COUNT;
kern_return_t kernReturn = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmStats, &infoCount);
if(kernReturn != KERN_SUCCESS) {
return -1;
}
activeMemory = ((vm_page_size * vmStats.active_count) / 1024) / 1024;
return activeMemory;
}
+ (CGFloat)wiredMemory {
double wiredMemory = 0.00;
vm_statistics_data_t vmStats;
mach_msg_type_number_t infoCount = HOST_VM_INFO_COUNT;
kern_return_t kernReturn = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmStats, &infoCount);
if(kernReturn != KERN_SUCCESS) {
return -1;
}
wiredMemory = ((vm_page_size * vmStats.wire_count) / 1024) / 1024;
return wiredMemory;
}
+ (CGFloat)inactiveMemory {
double inactiveMemory = 0.00;
vm_statistics_data_t vmStats;
mach_msg_type_number_t infoCount = HOST_VM_INFO_COUNT;
kern_return_t kernReturn = host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmStats, &infoCount);
if(kernReturn != KERN_SUCCESS) {
return -1;
}
inactiveMemory = ((vm_page_size * vmStats.inactive_count) / 1024) / 1024;
return inactiveMemory;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALNetwork/ALNetwork.h
================================================
//
// ALNetwork.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class provide methods to get current IP address and check WiFi or 3G connection
*/
@interface ALNetwork : NSObject
/*!
Get the current IP address
@return NSString value which represents the current IP address
*/
+ (NSString *)currentIPAddress;
/*!
Check if the device is connected to WiFi
@return YES if the device is connected to WiFi network, NO if it isn't
*/
+ (BOOL)connectedViaWiFi;
/*!
Check if the device is connected to 3G
@return YES if the device is connected to 3G network, NO if it isn't
*/
+ (BOOL)connectedVia3G;
/*!
Get the MAC Address of the iPhone
@return NSString represents the MAC address
*/
+ (NSString *)macAddress;
/*!
* The external IP Address
@return NSString represents the external IP address
*/
+ (NSString *)externalIPAddress;
/*!
* The cell IP address
@return NSString represents the cell IP address
*/
+ (NSString *)cellIPAddress;
/*!
* The WiFi netmask address
@return NSString represents the WiFi netmask address
*/
+ (NSString *)WiFiNetmaskAddress;
/*!
* The WiFi broadcast address
@return NSString represents the WiFi broadcast address
*/
+ (NSString *)WiFiBroadcastAddress;
/*!
The BSSID of the network
@return NSString represents the BSSID value
*/
+ (NSString *)BSSID;
/*!
The SSID of the network
@return NSString represents the SSID value
*/
+ (NSString *)SSID;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALNetwork/ALNetwork.m
================================================
//
// ALNetwork.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALNetwork.h"
#import <SystemConfiguration/CaptiveNetwork.h>
#import <ifaddrs.h>
#import <arpa/inet.h>
#import "Reachability.h"
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <sys/ioctl.h>
@implementation ALNetwork
#pragma mark - Singleton methods
+ (ALNetwork *)sharedInstance {
static ALNetwork *_shared;
if(!_shared) {
static dispatch_once_t oncePredicate;
dispatch_once(&oncePredicate, ^ {
_shared = [[super allocWithZone:nil] init];
});
}
return _shared;
}
+ (id)allocWithZone:(NSZone *)zone { return [self sharedInstance]; }
- (id)copyWithZone:(NSZone *)zone { return self; }
#if (!__has_feature(objc_arc))
- (id)retain { return self; }
- (unsigned)retainCount { return UINT_MAX; }
- (void)release { }
- (id)autorelease { return self; }
#endif
#pragma mark - Class methods
// This code is an answer to
// this question :
// http://stackoverflow.com/questions/7072989/iphone-ipad-how-to-get-my-ip-address-programmatically
// by David H
+ (NSString *)currentIPAddress {
struct ifaddrs *interfaces = NULL;
struct ifaddrs *temp_addr = NULL;
NSString *wifiAddress = nil;
NSString *cellAddress = nil;
// retrieve the current interfaces - returns 0 on success
if(!getifaddrs(&interfaces)) {
// Loop through linked list of interfaces
temp_addr = interfaces;
while(temp_addr != NULL) {
sa_family_t sa_type = temp_addr->ifa_addr->sa_family;
if(sa_type == AF_INET || sa_type == AF_INET6) {
NSString *name = [NSString stringWithUTF8String:temp_addr->ifa_name];
NSString *addr = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_addr)->sin_addr)]; // pdp_ip0
//NSLog(@"NAME: \"%@\" addr: %@", name, addr); // see for yourself
if([name isEqualToString:@"en0"])
// Interface is the wifi connection on the iPhone
wifiAddress = addr;
else
if([name isEqualToString:@"pdp_ip0"])
// Interface is the cell connection on the iPhone
cellAddress = addr;
}
temp_addr = temp_addr->ifa_next;
}
// Free memory
freeifaddrs(interfaces);
}
NSString *addr = wifiAddress ? wifiAddress : cellAddress;
return addr ? addr : @"0.0.0.0";
}
+ (BOOL)connectedViaWiFi {
Reachability *reachability = [Reachability reachabilityForInternetConnection];
[reachability startNotifier];
NetworkStatus status = [reachability currentReachabilityStatus];
if (status == ReachableViaWiFi)
return YES;
else
return NO;
}
+ (BOOL)connectedVia3G {
Reachability *reachability = [Reachability reachabilityForInternetConnection];
[reachability startNotifier];
NetworkStatus status = [reachability currentReachabilityStatus];
if (status == ReachableViaWWAN)
return YES;
else
return NO;
}
/*! Obsolete in iOS 7 */
+ (NSString *)macAddress {
int mgmtInfoBase[6];
char *msgBuffer = NULL;
size_t length;
unsigned char macAddress[6];
struct if_msghdr *interfaceMsgStruct;
struct sockaddr_dl *socketStruct;
NSString *errorFlag = NULL;
// Setup the management Information Base (mib)
mgmtInfoBase[0] = CTL_NET; // Request network subsystem
mgmtInfoBase[1] = AF_ROUTE; // Routing table info
mgmtInfoBase[2] = 0;
mgmtInfoBase[3] = AF_LINK; // Request link layer information
mgmtInfoBase[4] = NET_RT_IFLIST; // Request all configured interfaces
// With all configured interfaces requested, get handle index
if ((mgmtInfoBase[5] = if_nametoindex("en0")) == 0)
errorFlag = @"if_nametoindex failure";
else {
// Get the size of the data available (store in len)
if (sysctl(mgmtInfoBase, 6, NULL, &length, NULL, 0) < 0)
errorFlag = @"sysctl mgmtInfoBase failure";
else {
// Alloc memory based on above call
if ((msgBuffer = malloc(length)) == NULL)
errorFlag = @"buffer allocation failure";
else {
// Get system information, store in buffer
if (sysctl(mgmtInfoBase, 6, msgBuffer, &length, NULL, 0) < 0)
errorFlag = @"sysctl msgBuffer failure";
}
}
}
// Befor going any further...
if (errorFlag != NULL) {
NSLog(@"Error: %@", errorFlag);
return errorFlag;
}
// Map msgbuffer to interface message structure
interfaceMsgStruct = (struct if_msghdr *) msgBuffer;
// Map to link-level socket structure
socketStruct = (struct sockaddr_dl *) (interfaceMsgStruct + 1);
// Copy link layer address data in socket structure to an array
memcpy(&macAddress, socketStruct->sdl_data + socketStruct->sdl_nlen, 6);
// Read from char array into a string object, into traditional Mac address format
NSString *macAddressString = [NSString stringWithFormat:@"%02X:%02X:%02X:%02X:%02X:%02X",
macAddress[0], macAddress[1], macAddress[2],
macAddress[3], macAddress[4], macAddress[5]];
//NSLog(@"Mac Address: %@", macAddressString);
// Release the buffer memory
free(msgBuffer);
return macAddressString;
}
// Credits to Shmoopi LLC, SystemServiceDemo
// Get the External IP Address
+ (NSString *)externalIPAddress {
// Check if we have an internet connection then try to get the External IP Address
if (![self connectedViaWiFi] && ![self connectedVia3G]) {
// Not connected to anything, return nil
return nil;
}
// Get the external IP Address based on dynsns.org
NSError *error = nil;
NSString *theIpHtml = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.dyndns.org/cgi-bin/check_ip.cgi"]
encoding:NSUTF8StringEncoding
error:&error];
if (!error) {
NSUInteger an_Integer;
NSArray *ipItemsArray;
NSString *externalIP;
NSScanner *theScanner;
NSString *text = nil;
theScanner = [NSScanner scannerWithString:theIpHtml];
while ([theScanner isAtEnd] == NO) {
// find start of tag
[theScanner scanUpToString:@"<" intoString:NULL] ;
// find end of tag
[theScanner scanUpToString:@">" intoString:&text] ;
// replace the found tag with a space
//(you can filter multi-spaces out later if you wish)
theIpHtml = [theIpHtml stringByReplacingOccurrencesOfString:
[ NSString stringWithFormat:@"%@>", text]
withString:@" "] ;
ipItemsArray = [theIpHtml componentsSeparatedByString:@" "];
an_Integer = [ipItemsArray indexOfObject:@"Address:"];
externalIP =[ipItemsArray objectAtIndex:++an_Integer];
}
// Check that you get something back
if (externalIP == nil || externalIP.length <= 0) {
// Error, no address found
return nil;
}
// Return External IP
return externalIP;
} else {
// Error, no address found
return nil;
}
}
// Credits to Shmoopi LLC, SystemServiceDemo
// Get the cell IP address
+ (NSString *)cellIPAddress {
// Set a string for the address
NSString *IPAddress;
// Set up structs to hold the interfaces and the temporary address
struct ifaddrs *Interfaces;
struct ifaddrs *Temp;
struct sockaddr_in *s4;
char buf[64];
// If it's 0, then it's good
if (!getifaddrs(&Interfaces))
{
// Loop through the list of interfaces
Temp = Interfaces;
// Run through it while it's still available
while(Temp != NULL)
{
// If the temp interface is a valid interface
if(Temp->ifa_addr->sa_family == AF_INET)
{
// Check if the interface is Cell
if([[NSString stringWithUTF8String:Temp->ifa_name] isEqualToString:@"pdp_ip0"])
{
s4 = (struct sockaddr_in *)Temp->ifa_addr;
if (inet_ntop(Temp->ifa_addr->sa_family, (void *)&(s4->sin_addr), buf, sizeof(buf)) == NULL) {
// Failed to find it
IPAddress = nil;
} else {
// Got the Cell IP Address
IPAddress = [NSString stringWithUTF8String:buf];
}
}
}
// Set the temp value to the next interface
Temp = Temp->ifa_next;
}
}
// Free the memory of the interfaces
freeifaddrs(Interfaces);
// Check to make sure it's not empty
if (IPAddress == nil || IPAddress.length <= 0) {
// Empty, return not found
return nil;
}
// Return the IP Address of the WiFi
return IPAddress;
}
+ (NSString *)WiFiNetmaskAddress {
// Set up the variable
struct ifreq afr;
// Copy the string
strncpy(afr.ifr_name, [@"en0" UTF8String], IFNAMSIZ-1);
// Open a socket
int afd = socket(AF_INET, SOCK_DGRAM, 0);
// Check the socket
if (afd == -1) {
// Error, socket failed to open
return nil;
}
// Check the netmask output
if (ioctl(afd, SIOCGIFNETMASK, &afr) == -1) {
// Error, netmask wasn't found
// Close the socket
close(afd);
// Return error
return nil;
}
// Close the socket
close(afd);
// Create a char for the netmask
char *netstring = inet_ntoa(((struct sockaddr_in *)&afr.ifr_addr)->sin_addr);
// Create a string for the netmask
NSString *Netmask = [NSString stringWithUTF8String:netstring];
// Check to make sure it's not nil
if (Netmask == nil || Netmask.length <= 0) {
// Error, netmask not found
return nil;
}
// Return successful
return Netmask;
}
+ (NSString *)WiFiBroadcastAddress {
// Set up strings for the IP and Netmask
NSString *IPAddress = [self currentIPAddress];
NSString *NMAddress = [self WiFiNetmaskAddress];
// Check to make sure they aren't nil
if (IPAddress == nil || IPAddress.length <= 0) {
// Error, IP Address can't be nil
return nil;
}
if (NMAddress == nil || NMAddress.length <= 0) {
// Error, NM Address can't be nil
return nil;
}
// Check the formatting of the IP and NM Addresses
NSArray *IPCheck = [IPAddress componentsSeparatedByString:@"."];
NSArray *NMCheck = [NMAddress componentsSeparatedByString:@"."];
// Make sure the IP and NM Addresses are correct
if (IPCheck.count != 4 || NMCheck.count != 4) {
// Incorrect IP Addresses
return nil;
}
// Set up the variables
NSUInteger IP = 0;
NSUInteger NM = 0;
NSUInteger CS = 24;
// Make the address based on the other addresses
for (NSUInteger i = 0; i < 4; i++, CS -= 8) {
IP |= [[IPCheck objectAtIndex:i] intValue] << CS;
NM |= [[NMCheck objectAtIndex:i] intValue] << CS;
}
// Set it equal to the formatted raw addresses
NSUInteger BA = ~NM | IP;
// Make a string for the address
NSString *BroadcastAddress = [NSString stringWithFormat:@"%ld.%ld.%ld.%ld", (long)((BA & 0xFF000000) >> 24),
(long)((BA & 0x00FF0000) >> 16), (long)((BA & 0x0000FF00) >> 8), (long)(BA & 0x000000FF)];
// Check to make sure the string is valid
if (BroadcastAddress == nil || BroadcastAddress.length <= 0) {
// Error, no address
return nil;
}
// Return Successful
return BroadcastAddress;
}
+ (NSString *)BSSID {
/*! Get the interfaces */
NSArray *interfaces = (__bridge NSArray *) CNCopySupportedInterfaces();
NSString *BSSID;
/*! Cycle interfaces */
for (NSString *interface in interfaces)
{
CFDictionaryRef networkDetails = CNCopyCurrentNetworkInfo((__bridge CFStringRef) interface);
if (networkDetails)
{
BSSID = (NSString *)CFDictionaryGetValue(networkDetails, kCNNetworkInfoKeyBSSID);
CFRelease(networkDetails);
}
}
return BSSID;
}
+ (NSString *)SSID {
/*! Get the interfaces */
NSArray *interfaces = (__bridge NSArray *) CNCopySupportedInterfaces();
NSString *SSID;
/*! Cycle interfaces */
for (NSString *interface in interfaces)
{
CFDictionaryRef networkDetails = CNCopyCurrentNetworkInfo((__bridge CFStringRef) interface);
if (networkDetails)
{
SSID = (NSString *)CFDictionaryGetValue(networkDetails, kCNNetworkInfoKeySSID);
CFRelease(networkDetails);
}
}
return SSID;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALProcessor/ALProcessor.h
================================================
//
// ALProcessor.h
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* This class provide informations about processors
*/
@interface ALProcessor : NSObject
/*!
Check the number of processors
@return NSInteger which represents the number of processors
*/
+ (NSInteger)processorsNumber;
/*!
Check the number of active processors
@return NSInteger which represents the number of active processors
*/
+ (NSInteger)activeProcessorsNumber;
/*!
The cpu usage for the app in use
@return Float value represents the cpu usage for the app in use
*/
+ (CGFloat)cpuUsageForApp;
/*!
The active processes list
@return NSArray containing the list of active processes
*/
+ (NSArray *)activeProcesses;
/*!
The number of active processes
@return NSInteger value represents the number of active processes
*/
+ (NSInteger)numberOfActiveProcesses;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALProcessor/ALProcessor.m
================================================
//
// ALProcessor.m
// ALSystem
//
// Created by Andrea Mario Lufino on 21/07/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALProcessor.h"
#import <mach/mach.h>
#import <sys/sysctl.h>
@implementation ALProcessor
+ (NSInteger)processorsNumber {
return [[NSProcessInfo processInfo] processorCount];
}
+ (NSInteger)activeProcessorsNumber {
return [[NSProcessInfo processInfo] activeProcessorCount];
}
// Credit to: http://stackoverflow.com/questions/8223348/ios-get-cpu-usage-from-application
+ (CGFloat)cpuUsageForApp {
kern_return_t kr;
task_info_data_t tinfo;
mach_msg_type_number_t task_info_count;
task_info_count = TASK_INFO_MAX;
kr = task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)tinfo, &task_info_count);
if (kr != KERN_SUCCESS)
return -1;
task_basic_info_t basic_info;
thread_array_t thread_list;
mach_msg_type_number_t thread_count;
thread_info_data_t thinfo;
mach_msg_type_number_t thread_info_count;
thread_basic_info_t basic_info_th;
uint32_t stat_thread = 0; // Mach threads
basic_info = (task_basic_info_t)tinfo;
// get threads in the task
kr = task_threads(mach_task_self(), &thread_list, &thread_count);
if (kr != KERN_SUCCESS)
return -1;
if (thread_count > 0)
stat_thread += thread_count;
long tot_sec = 0;
long tot_usec = 0;
float tot_cpu = 0;
int j;
for (j = 0; j < thread_count; j++) {
thread_info_count = THREAD_INFO_MAX;
kr = thread_info(thread_list[j], THREAD_BASIC_INFO,
(thread_info_t)thinfo, &thread_info_count);
if (kr != KERN_SUCCESS)
return -1;
basic_info_th = (thread_basic_info_t)thinfo;
if (!(basic_info_th->flags & TH_FLAGS_IDLE)) {
tot_sec = tot_sec + basic_info_th->user_time.seconds + basic_info_th->system_time.seconds;
tot_usec = tot_usec + basic_info_th->system_time.microseconds + basic_info_th->system_time.microseconds;
tot_cpu = tot_cpu + basic_info_th->cpu_usage / (float)TH_USAGE_SCALE;
}
} // for each thread
return tot_cpu;
}
+ (NSArray *)activeProcesses {
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0};
u_int miblen = 4;
size_t size;
int st = sysctl(mib, miblen, NULL, &size, NULL, 0);
struct kinfo_proc * process = NULL;
struct kinfo_proc * newprocess = NULL;
do {
size += size / 10;
newprocess = realloc(process, size);
if (!newprocess) {
if (process) {
free(process);
}
return nil;
}
process = newprocess;
st = sysctl(mib, miblen, process, &size, NULL, 0);
} while (st == -1 && errno == ENOMEM);
if (st == 0) {
if (size % sizeof(struct kinfo_proc) == 0){
NSInteger nprocess = size / sizeof(struct kinfo_proc);
if (nprocess) {
NSMutableArray * array = [[NSMutableArray alloc] init];
for (NSInteger i = nprocess - 1; i >= 0; i--) {
NSString * processID = [[NSString alloc] initWithFormat:@"%d", process[i].kp_proc.p_pid];
NSString * processName = [[NSString alloc] initWithFormat:@"%s", process[i].kp_proc.p_comm];
NSDictionary * dict = [[NSDictionary alloc] initWithObjects:[NSArray arrayWithObjects:processID, processName, nil]
forKeys:[NSArray arrayWithObjects:@"ProcessID", @"ProcessName", nil]];
[array addObject:dict];
}
free(process);
return array;
}
}
}
return nil;
}
+ (NSInteger)numberOfActiveProcesses {
return [[self activeProcesses] count];
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystem.h
================================================
//
// ALSystem.h
// ALSystem
//
// Created by Andrea Mario Lufino on 09/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ALBattery.h"
#import "ALDisk.h"
#import "ALHardware.h"
#import "ALJailbreak.h"
#import "ALLocalization.h"
#import "ALMemory.h"
#import "ALNetwork.h"
#import "ALProcessor.h"
#import "ALCarrier.h"
#import "ALAccessory.h"
#import "ALSystemConstants.h"
/*!
* This class imports all the other classes of the ALSystemUtilities library, so you can import only ALSystem.h to import all the library.
* ALSystem provides methods to get the informations about every specific purview in a NSDictionary object which keys are declared in the relative extension header of ALSystem.
*/
@interface ALSystem : NSObject
/*!
All the informations of the library
@return NSDictionary which contains all informations the library can provides
*/
+ (NSDictionary *)systemInformations;
/*!
All the informations about the battery
@return NSDictionary which contains all informations about the battery
*/
+ (NSDictionary *)batteryInformations;
/*!
All the informations about the disk
@return NSDictionary which contains all informations about the disk
*/
+ (NSDictionary *)diskInformations;
/*!
All the informations about the hardware
@return NSDictionary which contains all informations about the hardware
*/
+ (NSDictionary *)hardwareInformations;
/*!
All the informations about the jailbreak
@return NSDictionary which contains all informations about the jailbreak
*/
+ (NSDictionary *)jailbreakInformations;
/*!
All the informations about the localization
@return NSDictionary which contains all informations about the localization
*/
+ (NSDictionary *)localizationInformations;
/*!
All the informations about the memory
@return NSDictionary which contains all informations about the memory
*/
+ (NSDictionary *)memoryInformations;
/*!
All the informations about the network
@return NSDictionary which contains all informations about the network
*/
+ (NSDictionary *)networkInformations;
/*!
All the informations avout the processor
@return NSDictionary which contains all informations about the processor
*/
+ (NSDictionary *)processorInformations;
/*!
All the informations acout the carrier
@return NSDictionary which contains all informations about the carrier
*/
+ (NSDictionary *)carrierInformations;
/*!
All the informations about the accessories
@return NSDictionary which contains all informations about the accessories
*/
+ (NSDictionary *)accessoryInformations;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystem.m
================================================
//
// ALSystem.m
// ALSystem
//
// Created by Andrea Mario Lufino on 09/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#import "ALSystem.h"
@implementation ALSystem
#pragma mark - All info
+ (NSDictionary *)systemInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
// Battery
[dictionary setObject:[NSNumber numberWithBool:[ALBattery batteryFullCharged]] forKey:ALBattery_batteryFullCharged];
[dictionary setObject:[NSNumber numberWithBool:[ALBattery inCharge]] forKey:ALBattery_inCharge];
[dictionary setObject:[NSNumber numberWithBool:[ALBattery devicePluggedIntoPower]] forKey:ALBattery_devicePluggedIntoPower];
[dictionary setObject:[NSNumber numberWithInt:[ALBattery batteryState]] forKey:ALBattery_batteryState];
[dictionary setObject:[NSNumber numberWithFloat:[ALBattery batteryLevel]] forKey:ALBattery_batteryLevel];
[dictionary setObject:[ALBattery remainingHoursForStandby] forKey:ALBattery_remainingHoursForStandby];
[dictionary setObject:[ALBattery remainingHoursFor3gConversation] forKey:ALBattery_remainingHoursFor3gConversation];
[dictionary setObject:[ALBattery remainingHoursFor2gConversation] forKey:ALBattery_remainingHoursFor2gConversation];
[dictionary setObject:[ALBattery remainingHoursForInternet3g] forKey:ALBattery_remainingHoursForInternet3g];
[dictionary setObject:[ALBattery remainingHoursForInternetWiFi] forKey:ALBattery_remainingHoursForInternetWiFi];
[dictionary setObject:[ALBattery remainingHoursForVideo] forKey:ALBattery_remainingHoursForVideo];
[dictionary setObject:[ALBattery remainingHoursForAudio] forKey:ALBattery_remainingHoursForAudio];
// Disk
[dictionary setObject:[ALDisk totalDiskSpace] forKey:ALDisk_totalDiskSpace];
[dictionary setObject:[ALDisk freeDiskSpace] forKey:ALDisk_freeDiskSpace];
[dictionary setObject:[ALDisk usedDiskSpace] forKey:ALDisk_usedDiskSpace];
[dictionary setObject:[NSNumber numberWithFloat:[ALDisk totalDiskSpaceInBytes]] forKey:ALDisk_totalDiskSpaceInBytes];
[dictionary setObject:[NSNumber numberWithFloat:[ALDisk freeDiskSpaceInBytes]] forKey:ALDisk_freeDiskSpaceInBytes];
[dictionary setObject:[NSNumber numberWithFloat:[ALDisk usedDiskSpaceInBytes]] forKey:ALDisk_usedDiskSpaceInBytes];
// Hardware
[dictionary setObject:[ALHardware deviceModel] forKey:ALHardware_deviceModel];
[dictionary setObject:[ALHardware deviceName] forKey:ALHardware_deviceName];
[dictionary setObject:[ALHardware systemName] forKey:ALHardware_systemName];
[dictionary setObject:[ALHardware systemVersion] forKey:ALHardware_systemVersion];
[dictionary setObject:[NSNumber numberWithFloat:[ALHardware screenWidth]] forKey:ALHardware_screenWidth];
[dictionary setObject:[NSNumber numberWithFloat:[ALHardware screenHeight]] forKey:ALHardware_screenHeight];
[dictionary setObject:[NSNumber numberWithFloat:[ALHardware brightness]] forKey:ALHardware_brightness];
[dictionary setObject:[ALHardware platformType] forKey:ALHardware_platformType];
[dictionary setObject:[ALHardware bootTime] forKey:ALHardware_bootTime];
[dictionary setObject:[NSNumber numberWithBool:[ALHardware proximitySensor]] forKey:ALHardware_proximitySensor];
[dictionary setObject:[NSNumber numberWithBool:[ALHardware multitaskingEnabled]] forKey:ALHardware_multitaskingEnabled];
[dictionary setObject:[ALHardware sim] forKey:ALHardware_sim];
[dictionary setObject:[ALHardware dimensions] forKey:ALHardware_dimensions];
[dictionary setObject:[ALHardware weight] forKey:ALHardware_weight];
[dictionary setObject:[ALHardware displayType] forKey:ALHardware_displayType];
[dictionary setObject:[ALHardware displayDensity] forKey:ALHardware_displayDensity];
[dictionary setObject:[ALHardware WLAN] forKey:ALHardware_WLAN];
[dictionary setObject:[ALHardware bluetooth] forKey:ALHardware_bluetooth];
[dictionary setObject:[ALHardware cameraPrimary] forKey:ALHardware_cameraPrimary];
[dictionary setObject:[ALHardware cameraSecondary] forKey:ALHardware_cameraSecondary];
[dictionary setObject:[ALHardware cpu] forKey:ALHardware_cpu];
[dictionary setObject:[ALHardware gpu] forKey:ALHardware_gpu];
// Jailbreak
[dictionary setObject:[NSNumber numberWithBool:[ALJailbreak isJailbroken]] forKey:ALJailbreak_isJailbroken];
// Localization
[dictionary setObject:[ALLocalization language] forKey:ALLocalization_language];
[dictionary setObject:[ALLocalization timeZone] forKey:ALLocalization_timeZone];
[dictionary setObject:[ALLocalization currencySymbol] forKey:ALLocalization_currencySimbol];
[dictionary setObject:[ALLocalization currencyCode] forKey:ALLocalization_currencyCode];
[dictionary setObject:[ALLocalization country] forKey:ALLocalization_country];
[dictionary setObject:[ALLocalization measurementSystem] forKey:ALLocalization_measurementSystem];
// Memory
[dictionary setObject:[NSNumber numberWithInteger:[ALMemory totalMemory]] forKey:ALMemory_totalMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory freeMemory]] forKey:ALMemory_freeMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory usedMemory]] forKey:ALMemory_usedMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory activeMemory]] forKey:ALMemory_activeMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory wiredMemory]] forKey:ALMemory_wiredMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory inactiveMemory]] forKey:ALMemory_inactivemMemory];
// Network
[dictionary setObject:[ALNetwork currentIPAddress] forKey:ALNetwork_currentIPAddress];
[dictionary setObject:[NSNumber numberWithBool:[ALNetwork connectedViaWiFi]] forKey:ALNetwork_connectedViaWiFi];
[dictionary setObject:[NSNumber numberWithBool:[ALNetwork connectedVia3G]] forKey:ALNetwork_connectedVia3G];
[dictionary setObject:[ALNetwork macAddress] forKey:ALNetwork_macAddress];
[dictionary setObject:[ALNetwork externalIPAddress] forKey:ALNetwork_externalIPAddress];
[dictionary setObject:[ALNetwork cellIPAddress] forKey:ALNetwork_cellIPAddress];
[dictionary setObject:[ALNetwork WiFiNetmaskAddress] forKey:ALNetwork_WiFiNetmaskAddress];
[dictionary setObject:[ALNetwork WiFiBroadcastAddress] forKey:ALNetwork_WiFiBroadcastAddress];
[dictionary setObject:[ALNetwork BSSID] forKey:ALNetwork_BSSID];
[dictionary setObject:[ALNetwork SSID] forKey:ALNetwork_SSID];
// Processor
[dictionary setObject:[NSNumber numberWithInteger:[ALProcessor processorsNumber]] forKey:ALProcessor_processorsNumber];
[dictionary setObject:[NSNumber numberWithInteger:[ALProcessor activeProcessorsNumber]] forKey:ALProcessor_activeProcessorsNumber];
[dictionary setObject:[NSNumber numberWithFloat:[ALProcessor cpuUsageForApp]] forKey:ALProcessor_cpuUsageForApp];
[dictionary setObject:[ALProcessor activeProcesses] forKey:ALProcessor_activeProcesses];
[dictionary setObject:[NSNumber numberWithInteger:[ALProcessor numberOfActiveProcesses]] forKey:ALProcessor_numberOfActiveProcesses];
// Carrier
[dictionary setObject:[ALCarrier carrierName] forKey:ALCarrier_carrierName];
[dictionary setObject:[ALCarrier carrierISOCountryCode] forKey:ALCarrier_carrierISOCountryCode];
[dictionary setObject:[ALCarrier carrierMobileCountryCode] forKey:ALCarrier_carrierMobileCountryCode];
[dictionary setObject:[ALCarrier carrierMobileNetworkCode] forKey:ALCarrier_carriermobileNetworkCode];
[dictionary setObject:[NSNumber numberWithBool:[ALCarrier carrierAllowsVOIP]] forKey:ALCarrier_carrierAllowsVOIP];
// Accessory
[dictionary setObject:[NSNumber numberWithBool:[ALAccessory accessoriesPluggedIn]] forKey:ALAccessory_accessoriesPluggedIn];
[dictionary setObject:[NSNumber numberWithInteger:[ALAccessory numberOfAccessoriesPluggedIn]] forKey:ALAccessory_numberOfAccessoriesPluggedIn];
[dictionary setObject:[NSNumber numberWithBool:[ALAccessory isHeadphonesAttached]] forKey:ALAccessory_isHeadphonesAttached];
return dictionary;
}
#pragma mark - Battery
+ (NSDictionary *)batteryInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[NSNumber numberWithBool:[ALBattery batteryFullCharged]] forKey:ALBattery_batteryFullCharged];
[dictionary setObject:[NSNumber numberWithBool:[ALBattery inCharge]] forKey:ALBattery_inCharge];
[dictionary setObject:[NSNumber numberWithBool:[ALBattery devicePluggedIntoPower]] forKey:ALBattery_devicePluggedIntoPower];
[dictionary setObject:[NSNumber numberWithInt:[ALBattery batteryState]] forKey:ALBattery_batteryState];
[dictionary setObject:[NSNumber numberWithFloat:[ALBattery batteryLevel]] forKey:ALBattery_batteryLevel];
[dictionary setObject:[ALBattery remainingHoursForStandby] forKey:ALBattery_remainingHoursForStandby];
[dictionary setObject:[ALBattery remainingHoursFor3gConversation] forKey:ALBattery_remainingHoursFor3gConversation];
[dictionary setObject:[ALBattery remainingHoursFor2gConversation] forKey:ALBattery_remainingHoursFor2gConversation];
[dictionary setObject:[ALBattery remainingHoursForInternet3g] forKey:ALBattery_remainingHoursForInternet3g];
[dictionary setObject:[ALBattery remainingHoursForInternetWiFi] forKey:ALBattery_remainingHoursForInternetWiFi];
[dictionary setObject:[ALBattery remainingHoursForVideo] forKey:ALBattery_remainingHoursForVideo];
[dictionary setObject:[ALBattery remainingHoursForAudio] forKey:ALBattery_remainingHoursForAudio];
return dictionary;
}
#pragma mark - Disk
+ (NSDictionary *)diskInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[ALDisk totalDiskSpace] forKey:ALDisk_totalDiskSpace];
[dictionary setObject:[ALDisk freeDiskSpace] forKey:ALDisk_freeDiskSpace];
[dictionary setObject:[ALDisk usedDiskSpace] forKey:ALDisk_usedDiskSpace];
[dictionary setObject:[NSNumber numberWithFloat:[ALDisk totalDiskSpaceInBytes]] forKey:ALDisk_totalDiskSpaceInBytes];
[dictionary setObject:[NSNumber numberWithFloat:[ALDisk freeDiskSpaceInBytes]] forKey:ALDisk_freeDiskSpaceInBytes];
[dictionary setObject:[NSNumber numberWithFloat:[ALDisk usedDiskSpaceInBytes]] forKey:ALDisk_usedDiskSpaceInBytes];
return dictionary;
}
#pragma mark - Hardware
+ (NSDictionary *)hardwareInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[ALHardware deviceModel] forKey:ALHardware_deviceModel];
[dictionary setObject:[ALHardware deviceName] forKey:ALHardware_deviceName];
[dictionary setObject:[ALHardware systemName] forKey:ALHardware_systemName];
[dictionary setObject:[ALHardware systemVersion] forKey:ALHardware_systemVersion];
[dictionary setObject:[NSNumber numberWithFloat:[ALHardware screenWidth]] forKey:ALHardware_screenWidth];
[dictionary setObject:[NSNumber numberWithFloat:[ALHardware screenHeight]] forKey:ALHardware_screenHeight];
[dictionary setObject:[NSNumber numberWithFloat:[ALHardware brightness]] forKey:ALHardware_brightness];
[dictionary setObject:[ALHardware platformType] forKey:ALHardware_platformType];
[dictionary setObject:[ALHardware bootTime] forKey:ALHardware_bootTime];
[dictionary setObject:[NSNumber numberWithBool:[ALHardware proximitySensor]] forKey:ALHardware_proximitySensor];
[dictionary setObject:[NSNumber numberWithBool:[ALHardware multitaskingEnabled]] forKey:ALHardware_multitaskingEnabled];
[dictionary setObject:[ALHardware sim] forKey:ALHardware_sim];
[dictionary setObject:[ALHardware dimensions] forKey:ALHardware_dimensions];
[dictionary setObject:[ALHardware weight] forKey:ALHardware_weight];
[dictionary setObject:[ALHardware displayType] forKey:ALHardware_displayType];
[dictionary setObject:[ALHardware displayDensity] forKey:ALHardware_displayDensity];
[dictionary setObject:[ALHardware WLAN] forKey:ALHardware_WLAN];
[dictionary setObject:[ALHardware bluetooth] forKey:ALHardware_bluetooth];
[dictionary setObject:[ALHardware cameraPrimary] forKey:ALHardware_cameraPrimary];
[dictionary setObject:[ALHardware cameraSecondary] forKey:ALHardware_cameraSecondary];
[dictionary setObject:[ALHardware cpu] forKey:ALHardware_cpu];
[dictionary setObject:[ALHardware gpu] forKey:ALHardware_gpu];
return dictionary;
}
#pragma mark - Jailbreak
+ (NSDictionary *)jailbreakInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[NSNumber numberWithBool:[ALJailbreak isJailbroken]] forKey:ALJailbreak_isJailbroken];
return dictionary;
}
#pragma mark - Localization
+ (NSDictionary *)localizationInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[ALLocalization language] forKey:ALLocalization_language];
[dictionary setObject:[ALLocalization timeZone] forKey:ALLocalization_timeZone];
[dictionary setObject:[ALLocalization currencySymbol] forKey:ALLocalization_currencySimbol];
[dictionary setObject:[ALLocalization currencyCode] forKey:ALLocalization_currencyCode];
[dictionary setObject:[ALLocalization country] forKey:ALLocalization_country];
[dictionary setObject:[ALLocalization measurementSystem] forKey:ALLocalization_measurementSystem];
return dictionary;
}
#pragma mark - Memory
+ (NSDictionary *)memoryInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[NSNumber numberWithInteger:[ALMemory totalMemory]] forKey:ALMemory_totalMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory freeMemory]] forKey:ALMemory_freeMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory usedMemory]] forKey:ALMemory_usedMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory activeMemory]] forKey:ALMemory_activeMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory wiredMemory]] forKey:ALMemory_wiredMemory];
[dictionary setObject:[NSNumber numberWithFloat:[ALMemory inactiveMemory]] forKey:ALMemory_inactivemMemory];
return dictionary;
}
#pragma mark - Network
+ (NSDictionary *)networkInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[ALNetwork currentIPAddress] forKey:ALNetwork_currentIPAddress];
[dictionary setObject:[NSNumber numberWithBool:[ALNetwork connectedViaWiFi]] forKey:ALNetwork_connectedViaWiFi];
[dictionary setObject:[NSNumber numberWithBool:[ALNetwork connectedVia3G]] forKey:ALNetwork_connectedVia3G];
[dictionary setObject:[ALNetwork macAddress] forKey:ALNetwork_macAddress];
[dictionary setObject:[ALNetwork externalIPAddress] forKey:ALNetwork_externalIPAddress];
[dictionary setObject:[ALNetwork cellIPAddress] forKey:ALNetwork_cellIPAddress];
[dictionary setObject:[ALNetwork WiFiNetmaskAddress] forKey:ALNetwork_WiFiNetmaskAddress];
[dictionary setObject:[ALNetwork WiFiBroadcastAddress] forKey:ALNetwork_WiFiBroadcastAddress];
[dictionary setObject:[ALNetwork BSSID] forKey:ALNetwork_BSSID];
[dictionary setObject:[ALNetwork SSID] forKey:ALNetwork_SSID];
return dictionary;
}
#pragma mark - Processor
+ (NSDictionary *)processorInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[NSNumber numberWithInteger:[ALProcessor processorsNumber]] forKey:ALProcessor_processorsNumber];
[dictionary setObject:[NSNumber numberWithInteger:[ALProcessor activeProcessorsNumber]] forKey:ALProcessor_activeProcessorsNumber];
[dictionary setObject:[NSNumber numberWithFloat:[ALProcessor cpuUsageForApp]] forKey:ALProcessor_cpuUsageForApp];
[dictionary setObject:[ALProcessor activeProcesses] forKey:ALProcessor_activeProcesses];
[dictionary setObject:[NSNumber numberWithInteger:[ALProcessor numberOfActiveProcesses]] forKey:ALProcessor_numberOfActiveProcesses];
return dictionary;
}
#pragma mark - Carrier
+ (NSDictionary *)carrierInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[ALCarrier carrierName] forKey:ALCarrier_carrierName];
[dictionary setObject:[ALCarrier carrierISOCountryCode] forKey:ALCarrier_carrierISOCountryCode];
[dictionary setObject:[ALCarrier carrierMobileCountryCode] forKey:ALCarrier_carrierMobileCountryCode];
[dictionary setObject:[ALCarrier carrierMobileNetworkCode] forKey:ALCarrier_carriermobileNetworkCode];
[dictionary setObject:[NSNumber numberWithBool:[ALCarrier carrierAllowsVOIP]] forKey:ALCarrier_carrierAllowsVOIP];
return dictionary;
}
#pragma mark - Accessory
+ (NSDictionary *)accessoryInformations {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[NSNumber numberWithBool:[ALAccessory accessoriesPluggedIn]] forKey:ALAccessory_accessoriesPluggedIn];
[dictionary setObject:[NSNumber numberWithInteger:[ALAccessory numberOfAccessoriesPluggedIn]] forKey:ALAccessory_numberOfAccessoriesPluggedIn];
[dictionary setObject:[NSNumber numberWithBool:[ALAccessory isHeadphonesAttached]] forKey:ALAccessory_isHeadphonesAttached];
return dictionary;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystemConstants.h
================================================
//
// ALSystemConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
#ifndef ALSystem_ALSystemConstants_h
#define ALSystem_ALSystemConstants_h
#import "ALSystem_ALBatteryConstants.h"
#import "ALSystem_AccessoryConstants.h"
#import "ALSystem_CarrierConstants.h"
#import "ALSystem_DiskConstants.h"
#import "ALSystem_HardwareConstants.h"
#import "ALSystem_JailbreakConstants.h"
#import "ALSystem_LocalizationConstants.h"
#import "ALSystem_MemoryConstants.h"
#import "ALSystem_NetworkConstants.h"
#import "ALSystem_ProcessorConstants.h"
#endif
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_ALBatteryConstants.h
================================================
//
// ALSystem_ALBatteryConst.h
// ALSystem
//
// Created by Andrea Mario Lufino on 09/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALBattery_batteryFullCharged = @"batteryFullCharged";
static NSString *const ALBattery_inCharge = @"inCharge";
static NSString *const ALBattery_devicePluggedIntoPower = @"devicePluggedIntoPower";
static NSString *const ALBattery_batteryState = @"batteryState";
static NSString *const ALBattery_batteryLevel = @"batteryLevel";
static NSString *const ALBattery_remainingHoursForStandby = @"remainingHoursForStandby";
static NSString *const ALBattery_remainingHoursFor3gConversation = @"remainingHoursFor3gConversation";
static NSString *const ALBattery_remainingHoursFor2gConversation = @"remainingHoursFor2gConversation";
static NSString *const ALBattery_remainingHoursForInternet3g = @"remainingHoursForInternet3g";
static NSString *const ALBattery_remainingHoursForInternetWiFi = @"remainingHoursForInternetWiFi";
static NSString *const ALBattery_remainingHoursForVideo = @"remainingHoursForVideo";
static NSString *const ALBattery_remainingHoursForAudio = @"remainingHoursForAudio";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_AccessoryConstants.h
================================================
//
// ALSystem_AccessoryConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALAccessory_accessoriesPluggedIn = @"accessoriesPluggedIn";
static NSString *const ALAccessory_numberOfAccessoriesPluggedIn = @"numberOfAccessoriesPluggedIn";
static NSString *const ALAccessory_isHeadphonesAttached = @"isHeadphonesAttached";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_CarrierConstants.h
================================================
//
// ALSystem_CarrierConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALCarrier_carrierName = @"carrierName";
static NSString *const ALCarrier_carrierISOCountryCode = @"carrierISOCountryCode";
static NSString *const ALCarrier_carrierMobileCountryCode = @"carrierMobileCountryCode";
static NSString *const ALCarrier_carriermobileNetworkCode = @"carrierMobileNetworkCode";
static NSString *const ALCarrier_carrierAllowsVOIP = @"carrierAllowsVOIP";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_DiskConstants.h
================================================
//
// ALSystem_DiskConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 09/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALDisk_totalDiskSpace = @"totalDiskSpace";
static NSString *const ALDisk_freeDiskSpace = @"freeDiskSpace";
static NSString *const ALDisk_usedDiskSpace = @"usedDiskSpace";
static NSString *const ALDisk_totalDiskSpaceInBytes = @"totalDiskSpaceInBytes";
static NSString *const ALDisk_freeDiskSpaceInBytes = @"freeDiskSpaceInBytes";
static NSString *const ALDisk_usedDiskSpaceInBytes = @"usedDiskSpaceInBytes";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_HardwareConstants.h
================================================
//
// ALSystem_HardwareConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 09/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALHardware_deviceModel = @"deviceModel";
static NSString *const ALHardware_deviceName = @"deviceName";
static NSString *const ALHardware_systemName = @"systemName";
static NSString *const ALHardware_systemVersion = @"systemVersion";
static NSString *const ALHardware_screenWidth = @"screenWidth";
static NSString *const ALHardware_screenHeight = @"screenHeight";
static NSString *const ALHardware_brightness = @"brightness";
static NSString *const ALHardware_platformType = @"platformType";
static NSString *const ALHardware_bootTime = @"bootTime";
static NSString *const ALHardware_proximitySensor = @"proximitySensor";
static NSString *const ALHardware_multitaskingEnabled = @"multitaskingEnabled";
// 1.2
static NSString *const ALHardware_sim = @"sim";
static NSString *const ALHardware_dimensions = @"dimensions";
static NSString *const ALHardware_weight = @"weight";
static NSString *const ALHardware_displayType = @"displayType";
static NSString *const ALHardware_displayDensity = @"displayDensity";
static NSString *const ALHardware_WLAN = @"WLAN";
static NSString *const ALHardware_bluetooth = @"bluetooth";
static NSString *const ALHardware_cameraPrimary = @"cameraPrimary";
static NSString *const ALHardware_cameraSecondary = @"cameraSecondary";
static NSString *const ALHardware_cpu = @"cpu";
static NSString *const ALHardware_gpu = @"gpu";
static NSString *const ALHardware_touchID = @"touch-id";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_JailbreakConstants.h
================================================
//
// ALSystem_JailbreakConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALJailbreak_isJailbroken = @"isJailbroken";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_LocalizationConstants.h
================================================
//
// ALSystem_LocalizationConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALLocalization_language = @"language";
static NSString *const ALLocalization_timeZone = @"timeZone";
static NSString *const ALLocalization_currencySimbol = @"currencySimbol";
static NSString *const ALLocalization_currencyCode = @"currencyCode";
static NSString *const ALLocalization_country = @"country";
static NSString *const ALLocalization_measurementSystem = @"measurementSystem";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_MemoryConstants.h
================================================
//
// ALSystem_MemoryConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALMemory_totalMemory = @"totalMemory";
static NSString *const ALMemory_freeMemory = @"freeMemory";
static NSString *const ALMemory_usedMemory = @"usedMemory";
static NSString *const ALMemory_activeMemory = @"activeMemory";
static NSString *const ALMemory_wiredMemory = @"wiredMemory";
static NSString *const ALMemory_inactivemMemory = @"inactiveMemory";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_NetworkConstants.h
================================================
//
// ALSystem_NetworkConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALNetwork_currentIPAddress = @"currentIPAddress";
static NSString *const ALNetwork_connectedViaWiFi = @"connectedViaWiFi";
static NSString *const ALNetwork_connectedVia3G = @"connectedVia3G";
static NSString *const ALNetwork_macAddress = @"macAddress";
static NSString *const ALNetwork_externalIPAddress = @"externalIPAddress";
static NSString *const ALNetwork_cellIPAddress = @"cellIPAddress";
static NSString *const ALNetwork_WiFiNetmaskAddress = @"WiFiNetmaskAddress";
static NSString *const ALNetwork_WiFiBroadcastAddress = @"WiFiBroadcastAddress";
static NSString *const ALNetwork_BSSID = @"BSSID";
static NSString *const ALNetwork_SSID = @"SSID";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_ProcessorConstants.h
================================================
//
// ALSystem_ProcessorConstants.h
// ALSystem
//
// Created by Andrea Mario Lufino on 10/09/13.
// Copyright (c) 2013 Andrea Mario Lufino. All rights reserved.
//
static NSString *const ALProcessor_processorsNumber = @"processorsNumber";
static NSString *const ALProcessor_activeProcessorsNumber = @"activeProcessorsNumber";
static NSString *const ALProcessor_cpuUsageForApp = @"cpuUsageForApp";
static NSString *const ALProcessor_activeProcesses = @"activeProcesses";
static NSString *const ALProcessor_numberOfActiveProcesses = @"numberOfActiveProcesses";
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.h
================================================
/*
File: Reachability.h
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
Version: 2.2
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under
Apple's copyrights in this original Apple software (the "Apple Software"), to
use, reproduce, modify and redistribute the Apple Software, with or without
modifications, in source and/or binary forms; provided that if you redistribute
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions
of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc. may be used
to endorse or promote products derived from the Apple Software without specific
prior written permission from Apple. Except as expressly stated in this notice,
no other rights or licenses, express or implied, are granted by Apple herein,
including but not limited to any patent rights that may be infringed by your
derivative works or by other works in which the Apple Software may be
incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2010 Apple Inc. All Rights Reserved.
*/
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
typedef enum {
NotReachable = 0,
ReachableViaWiFi,
ReachableViaWWAN
} NetworkStatus;
#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification"
@interface Reachability: NSObject
{
BOOL localWiFiRef;
SCNetworkReachabilityRef reachabilityRef;
}
//reachabilityWithHostName- Use to check the reachability of a particular host name.
+ (Reachability*) reachabilityWithHostName: (NSString*) hostName;
//reachabilityWithAddress- Use to check the reachability of a particular IP address.
+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
//reachabilityForInternetConnection- checks whether the default route is available.
// Should be used by applications that do not connect to a particular host
+ (Reachability*) reachabilityForInternetConnection;
//reachabilityForLocalWiFi- checks whether a local wifi connection is available.
+ (Reachability*) reachabilityForLocalWiFi;
//Start listening for reachability notifications on the current run loop
- (BOOL) startNotifier;
- (void) stopNotifier;
- (NetworkStatus) currentReachabilityStatus;
//WWAN may be available, but not active until a connection has been established.
//WiFi may require a connection for VPN on Demand.
- (BOOL) connectionRequired;
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.m
================================================
/*
File: Reachability.m
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
Version: 2.2
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under
Apple's copyrights in this original Apple software (the "Apple Software"), to
use, reproduce, modify and redistribute the Apple Software, with or without
modifications, in source and/or binary forms; provided that if you redistribute
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions
of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc. may be used
to endorse or promote products derived from the Apple Software without specific
prior written permission from Apple. Except as expressly stated in this notice,
no other rights or licenses, express or implied, are granted by Apple herein,
including but not limited to any patent rights that may be infringed by your
derivative works or by other works in which the Apple Software may be
incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2010 Apple Inc. All Rights Reserved.
*/
#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>
#import <CoreFoundation/CoreFoundation.h>
#import "Reachability.h"
#define kShouldPrintReachabilityFlags 0
static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment)
{
#if kShouldPrintReachabilityFlags
NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
(flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-',
(flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-',
(flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-',
(flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-',
(flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-',
(flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-',
(flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-',
(flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-',
(flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-',
comment
);
#endif
}
@implementation Reachability
static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info)
{
#pragma unused (target, flags)
NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback");
NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback");
//We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively
// in case someon uses the Reachablity object in a different thread.
NSAutoreleasePool* myPool = [[NSAutoreleasePool alloc] init];
Reachability* noteObject = (Reachability*) info;
// Post a notification to notify the client that the network reachability changed.
[[NSNotificationCenter defaultCenter] postNotificationName: kReachabilityChangedNotification object: noteObject];
[myPool release];
}
- (BOOL) startNotifier
{
BOOL retVal = NO;
SCNetworkReachabilityContext context = {0, self, NULL, NULL, NULL};
if(SCNetworkReachabilitySetCallback(reachabilityRef, ReachabilityCallback, &context))
{
if(SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode))
{
retVal = YES;
}
}
return retVal;
}
- (void) stopNotifier
{
if(reachabilityRef!= NULL)
{
SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
}
}
- (void) dealloc
{
[self stopNotifier];
if(reachabilityRef!= NULL)
{
CFRelease(reachabilityRef);
}
[super dealloc];
}
+ (Reachability*) reachabilityWithHostName: (NSString*) hostName;
{
Reachability* retVal = NULL;
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]);
if(reachability!= NULL)
{
retVal= [[[self alloc] init] autorelease];
if(retVal!= NULL)
{
retVal->reachabilityRef = reachability;
retVal->localWiFiRef = NO;
}
}
return retVal;
}
+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
{
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress);
Reachability* retVal = NULL;
if(reachability!= NULL)
{
retVal= [[[self alloc] init] autorelease];
if(retVal!= NULL)
{
retVal->reachabilityRef = reachability;
retVal->localWiFiRef = NO;
}
}
return retVal;
}
+ (Reachability*) reachabilityForInternetConnection;
{
struct sockaddr_in zeroAddress;
bzero(&zeroAddress, sizeof(zeroAddress));
zeroAddress.sin_len = sizeof(zeroAddress);
zeroAddress.sin_family = AF_INET;
return [self reachabilityWithAddress: &zeroAddress];
}
+ (Reachability*) reachabilityForLocalWiFi;
{
struct sockaddr_in localWifiAddress;
bzero(&localWifiAddress, sizeof(localWifiAddress));
localWifiAddress.sin_len = sizeof(localWifiAddress);
localWifiAddress.sin_family = AF_INET;
// IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0
localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
Reachability* retVal = [self reachabilityWithAddress: &localWifiAddress];
if(retVal!= NULL)
{
retVal->localWiFiRef = YES;
}
return retVal;
}
#pragma mark Network Flag Handling
- (NetworkStatus) localWiFiStatusForFlags: (SCNetworkReachabilityFlags) flags
{
PrintReachabilityFlags(flags, "localWiFiStatusForFlags");
BOOL retVal = NotReachable;
if((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect))
{
retVal = ReachableViaWiFi;
}
return retVal;
}
- (NetworkStatus) networkStatusForFlags: (SCNetworkReachabilityFlags) flags
{
PrintReachabilityFlags(flags, "networkStatusForFlags");
if ((flags & kSCNetworkReachabilityFlagsReachable) == 0)
{
// if target host is not reachable
return NotReachable;
}
BOOL retVal = NotReachable;
if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0)
{
// if target host is reachable and no connection is required
// then we'll assume (for now) that your on Wi-Fi
retVal = ReachableViaWiFi;
}
if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) ||
(flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))
{
// ... and the connection is on-demand (or on-traffic) if the
// calling application is using the CFSocketStream or higher APIs
if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0)
{
// ... and no [user] intervention is needed
retVal = ReachableViaWiFi;
}
}
if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN)
{
// ... but WWAN connections are OK if the calling application
// is using the CFNetwork (CFSocketStream?) APIs.
retVal = ReachableViaWWAN;
}
return retVal;
}
- (BOOL) connectionRequired;
{
NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef");
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags))
{
return (flags & kSCNetworkReachabilityFlagsConnectionRequired);
}
return NO;
}
- (NetworkStatus) currentReachabilityStatus
{
NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef");
NetworkStatus retVal = NotReachable;
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags))
{
if(localWiFiRef)
{
retVal = [self localWiFiStatusForFlags: flags];
}
else
{
retVal = [self networkStatusForFlags: flags];
}
}
return retVal;
}
@end
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPad2.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>720</string>
<key>audio</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>dimensions</key>
<string>241.2 x 185.7 x 8.8 (mm)</string>
<key>weight</key>
<string>607 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>132 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 a/b/g/n</string>
<key>bluetooth</key>
<string>2.1</string>
<key>camera-primary</key>
<string>0.7 MP</string>
<key>camera-secondary</key>
<string>VGA</string>
<key>cpu</key>
<string>Apple A5</string>
<key>gpu</key>
<string>PowerVR SGX543MP2</string>
<key>siri</key>
<string>No</string>
<key>touch-id</key>
<string>No</string>
<key>sim</key>
<string>Micro-SIM</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPad3.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>720</string>
<key>audio</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>dimensions</key>
<string>241.2 x 185.7 x 9.4 (mm)</string>
<key>weight</key>
<string>652 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>264 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 a/b/g/n</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>5 MP</string>
<key>camera-secondary</key>
<string>VGA</string>
<key>cpu</key>
<string>Apple A5X</string>
<key>gpu</key>
<string>PowerVR SGX543MP4 (quad-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
<key>sim</key>
<string>Micro-SIM</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPad4.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>720</string>
<key>audio</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>dimensions</key>
<string>241.2 x 185.7 x 8.8 (mm)</string>
<key>weight</key>
<string>652 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>264 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 a/b/g/n</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>5 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A6X</string>
<key>gpu</key>
<string>PowerVR SGX554MP4 (quad-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
<key>sim</key>
<string>Micro-SIM</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPadAir.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>720</string>
<key>audio</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>dimensions</key>
<string>241.2 x 185.7 x 7.5 (mm)</string>
<key>weight</key>
<string>470 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>264 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 a/b/g/n</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>5 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A7 64 bit / M7</string>
<key>gpu</key>
<string>PowerVR G6430 (quad-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
<key>sim</key>
<string>Nano-SIM</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPadMini.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>720</string>
<key>audio</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>dimensions</key>
<string>200 x 134.7 x 7.2 (mm)</string>
<key>weight</key>
<string>308 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>162 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 a/b/g/n</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>5 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A5</string>
<key>gpu</key>
<string>PowerVR SGX543MP2</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
<key>sim</key>
<string>Nano-SIM</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPadMiniRetina.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>720</string>
<key>audio</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>dimensions</key>
<string>200 x 134.7 x 7.5 (mm)</string>
<key>weight</key>
<string>331 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>324 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 a/b/g/n</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>5 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A7 64 bit / M7</string>
<key>gpu</key>
<string>PowerVR G6430 (quad-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
<key>sim</key>
<string>Nano-SIM</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone3Gs.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>300</string>
<key>conversation3g</key>
<string>5</string>
<key>conversation2g</key>
<string>12</string>
<key>internet3g</key>
<string>5</string>
<key>internetwifi</key>
<string>9</string>
<key>video</key>
<string>10</string>
<key>audio</key>
<string>30</string>
<key>sim</key>
<string>Mini-SIM</string>
<key>dimensions</key>
<string>115,5 x 62,1 x 12,3 (mm)</string>
<key>weight</key>
<string>135 g.</string>
<key>display-type</key>
<string>TFT capacitive touchscreen</string>
<key>display-density</key>
<string>165 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 b/g</string>
<key>bluetooth</key>
<string>2.1</string>
<key>camera-primary</key>
<string>3.15 MP</string>
<key>camera-secondary</key>
<string>No</string>
<key>cpu</key>
<string>600 MHz Cortex-A8</string>
<key>gpu</key>
<string>PowerVR SGX535</string>
<key>siri</key>
<string>No</string>
<key>touch-id</key>
<string>No</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone4.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>300</string>
<key>conversation3g</key>
<string>7</string>
<key>conversation2g</key>
<string>14</string>
<key>internet3g</key>
<string>6</string>
<key>internetwifi</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>audio</key>
<string>40</string>
<key>sim</key>
<string>Micro-SIM</string>
<key>dimensions</key>
<string>115.2 x 58.6 x 9.3 (mm)</string>
<key>weight</key>
<string>137 g.</string>
<key>display-type</key>
<string>LED IPS LCD</string>
<key>display-density</key>
<string>330 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 b/g/n</string>
<key>bluetooth</key>
<string>2.1</string>
<key>camera-primary</key>
<string>5.0 MP</string>
<key>camera-secondary</key>
<string>VGA 480p</string>
<key>cpu</key>
<string>Apple A4 a 800 MHz</string>
<key>gpu</key>
<string>PowerVR SGX535</string>
<key>siri</key>
<string>No</string>
<key>touch-id</key>
<string>No</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone4s.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>200</string>
<key>conversation3g</key>
<string>8</string>
<key>conversation2g</key>
<string>14</string>
<key>internet3g</key>
<string>6</string>
<key>internetwifi</key>
<string>9</string>
<key>video</key>
<string>10</string>
<key>audio</key>
<string>40</string>
<key>sim</key>
<string>Micro-SIM</string>
<key>dimensions</key>
<string>115.2 x 58.6 x 9.3 (mm)</string>
<key>weight</key>
<string>140 g.</string>
<key>display-type</key>
<string>LED IPS LCD</string>
<key>display-density</key>
<string>330 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 b/g/n</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>8.0 MP</string>
<key>camera-secondary</key>
<string>VGA 480p</string>
<key>cpu</key>
<string>Apple A5 da 800Mhz</string>
<key>gpu</key>
<string>PowerVR SGX543MP2</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone5.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>225</string>
<key>conversation3g</key>
<string>7</string>
<key>conversation2g</key>
<string>15</string>
<key>internet3g</key>
<string>8</string>
<key>internetwifi</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>audio</key>
<string>40</string>
<key>sim</key>
<string>Nano-SIM</string>
<key>dimensions</key>
<string>123.8 x 58.6 x 7.6 (mm)</string>
<key>weight</key>
<string>112 g.</string>
<key>display-type</key>
<string>LED IPS LCD</string>
<key>display-density</key>
<string>326 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 a/b/g/n, dual-band</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>8.0 MP</string>
<key>camera-secondary</key>
<string>1.2 MP, 720p</string>
<key>cpu</key>
<string>Apple A6</string>
<key>gpu</key>
<string>PowerVR SGX 543MP3 (triple-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone5c.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>250</string>
<key>conversation3g</key>
<string>10</string>
<key>conversation2g</key>
<string>18</string>
<key>internet3g</key>
<string>8</string>
<key>internetwifi</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>audio</key>
<string>40</string>
<key>sim</key>
<string>Nano-SIM</string>
<key>dimensions</key>
<string>124,4 x 59,2 x 8,97 (mm)</string>
<key>weight</key>
<string>132 g.</string>
<key>display-type</key>
<string>LED IPS LCD</string>
<key>display-density</key>
<string>326 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 a/b/g/n, dual-band</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>8.0 MP</string>
<key>camera-secondary</key>
<string>1.2 MP, 720p</string>
<key>cpu</key>
<string>Apple A6</string>
<key>gpu</key>
<string>PowerVR SGX 543MP3 (triple-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>No</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone5s.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>250</string>
<key>conversation3g</key>
<string>10</string>
<key>conversation2g</key>
<string>18</string>
<key>internet3g</key>
<string>8</string>
<key>internetwifi</key>
<string>10</string>
<key>video</key>
<string>10</string>
<key>audio</key>
<string>40</string>
<key>sim</key>
<string>Nano-SIM</string>
<key>dimensions</key>
<string>123,8 x 58,6 x 7,6 (mm)</string>
<key>weight</key>
<string>112 g.</string>
<key>display-type</key>
<string>LED IPS LCD</string>
<key>display-density</key>
<string>326 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 a/b/g/n, dual-band</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>8.0 MP</string>
<key>camera-secondary</key>
<string>1.2 MP, 720p</string>
<key>cpu</key>
<string>Apple A7 64 bit / M7</string>
<key>gpu</key>
<string>PowerVR SGX 543MP3 (triple-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>Yes</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone6.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>250</string>
<key>conversation3g</key>
<string>14</string>
<key>conversation2g</key>
<string>24</string>
<key>internet3g</key>
<string>10</string>
<key>internetwifi</key>
<string>11</string>
<key>video</key>
<string>11</string>
<key>audio</key>
<string>50</string>
<key>sim</key>
<string>Nano-SIM</string>
<key>dimensions</key>
<string>138,1 x 67 x 6,9 (mm)</string>
<key>weight</key>
<string>129 g.</string>
<key>display-type</key>
<string>Retina HD</string>
<key>display-density</key>
<string>326 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 a/b/g/n/ac</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>8.0 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A8 64 bit / M8</string>
<key>gpu</key>
<string>PowerVR GX6650 (hexa-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>Yes</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone6Plus.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>standby</key>
<string>384</string>
<key>conversation3g</key>
<string>24</string>
<key>conversation2g</key>
<string>44</string>
<key>internet3g</key>
<string>12</string>
<key>internetwifi</key>
<string>12</string>
<key>video</key>
<string>12</string>
<key>audio</key>
<string>80</string>
<key>sim</key>
<string>Nano-SIM</string>
<key>dimensions</key>
<string>158,1 x 77,8 x 7,1 (mm)</string>
<key>weight</key>
<string>172 g.</string>
<key>display-type</key>
<string>Retina HD</string>
<key>display-density</key>
<string>401 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 a/b/g/n/ac</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>8.0 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A8 64 bit / M8</string>
<key>gpu</key>
<string>PowerVR GX6650 (hexa-core graphics)</string>
<key>siri</key>
<string>Yes</string>
<key>touch-id</key>
<string>Yes</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPodTouch/iPodTouch3.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>audio</key>
<string>30</string>
<key>video</key>
<string>6</string>
<key>dimensions</key>
<string>110 x 61,8 x 8,5 (mm)</string>
<key>weight</key>
<string>115 g.</string>
<key>display-type</key>
<string>TFT capacitive touchscreen</string>
<key>display-density</key>
<string>330 ppi</string>
<key>WLAN</key>
<string>WiFi 802.11 b/g</string>
<key>bluetooth</key>
<string>2.1</string>
<key>camera-primary</key>
<string>No</string>
<key>camera-secondary</key>
<string>No</string>
<key>cpu</key>
<string>833 MHz Cortex-A8 (locked at 600)</string>
<key>gpu</key>
<string>PowerVR SGX 535</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPodTouch/iPodTouch4.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>audio</key>
<string>40</string>
<key>video</key>
<string>7</string>
<key>dimensions</key>
<string>110 x 58,9 x 7,1 (mm)</string>
<key>weight</key>
<string>101 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>326 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 b/g/n</string>
<key>bluetooth</key>
<string>2.1</string>
<key>camera-primary</key>
<string>HD 720p</string>
<key>camera-secondary</key>
<string>VGA</string>
<key>cpu</key>
<string>Apple A4 800 MHz</string>
<key>gpu</key>
<string>PowerVR SGX</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities/Resources/iPodTouch/iPodTouch5.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>audio</key>
<string>40</string>
<key>video</key>
<string>8</string>
<key>dimensions</key>
<string>123,4 x 58,6 x 6,1 (mm)</string>
<key>weight</key>
<string>88 g.</string>
<key>display-type</key>
<string>LED-backlit IPS LCD, capacitive touchscreen</string>
<key>display-density</key>
<string>326 ppi</string>
<key>WLAN</key>
<string>Wi-Fi 802.11 a/b/g/n, dual-band</string>
<key>bluetooth</key>
<string>4.0</string>
<key>camera-primary</key>
<string>5.0 MP</string>
<key>camera-secondary</key>
<string>1.2 MP</string>
<key>cpu</key>
<string>Apple A5</string>
<key>gpu</key>
<string>625</string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.andrealufino.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
================================================
FILE: ALSystemUtilities/ALSystemUtilities-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreFoundation/CoreFoundation.h>
#import <UIKit/UIKit.h>
#endif
================================================
FILE: ALSystemUtilities/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: ALSystemUtilities.podspec
================================================
Pod::Spec.new do |s|
s.name = 'ALSystemUtilities'
s.version = '1.3.4'
s.license = {
:type => 'MIT',
:file => 'LICENSE'
}
s.homepage = 'https://github.com/andrealufino/ALSystemUtilities'
s.author = {
'Andrea Lufino' => 'andrea.lufino@me.com'
}
s.summary = 'Get every kind of info about your device'
# Source Info
s.platform = :ios, '6.1'
s.source = {
:git => 'https://github.com/andrealufino/ALSystemUtilities.git',
:tag => '1.3.4'
}
s.source_files = 'ALSystemUtilities/ALSystemUtilities/**/*.{h,m}'
s.requires_arc = true
s.resources = 'ALSystemUtilities/ALSystemUtilities/Resources/**/*.{plist}'
s.frameworks = 'AudioToolbox','CFNetwork','CoreTelephony','ExternalAccessory','Security','SystemConfiguration','CoreGraphics','CoreFoundation','Foundation'
non_arc_files = 'ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.h','ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.m'
s.exclude_files = non_arc_files
s.subspec 'no-arc' do |sna|
sna.requires_arc = false
sna.source_files = non_arc_files
end
# Pod Dependencies
end
================================================
FILE: ALSystemUtilities.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
6506F33A1B52F49F006A13A2 /* ALSystemUtilities.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 6506F3391B52F49F006A13A2 /* ALSystemUtilities.podspec */; };
65F481101B5D4A990051FFD8 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 65F4810F1B5D4A990051FFD8 /* LICENSE */; };
8710CCA218227461009590EE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8710CC9C18227461009590EE /* AudioToolbox.framework */; };
8710CCA318227461009590EE /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8710CC9D18227461009590EE /* CFNetwork.framework */; };
8710CCA418227461009590EE /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8710CC9E18227461009590EE /* CoreTelephony.framework */; };
8710CCA518227461009590EE /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8710CC9F18227461009590EE /* ExternalAccessory.framework */; };
8710CCA618227461009590EE /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8710CCA018227461009590EE /* Security.framework */; };
8710CCA718227461009590EE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8710CCA118227461009590EE /* SystemConfiguration.framework */; };
87C3D0491861FAB1007E0142 /* iPad2.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87C3D0481861FAB1007E0142 /* iPad2.plist */; };
87C3D04B186204C9007E0142 /* iPad3.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87C3D04A186204C9007E0142 /* iPad3.plist */; };
87C3D04D186204D1007E0142 /* iPad4.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87C3D04C186204D1007E0142 /* iPad4.plist */; };
87C3D04F186204F0007E0142 /* iPadAir.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87C3D04E186204F0007E0142 /* iPadAir.plist */; };
87C3D05118620776007E0142 /* iPadMini.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87C3D05018620776007E0142 /* iPadMini.plist */; };
87C3D05318620783007E0142 /* iPadMiniRetina.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87C3D05218620783007E0142 /* iPadMiniRetina.plist */; };
87D350B519C61EAA0081F612 /* iPhone6.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D350B419C61EAA0081F612 /* iPhone6.plist */; };
87D350B719C6208C0081F612 /* iPhone6Plus.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D350B619C6208C0081F612 /* iPhone6Plus.plist */; };
87D8E4AB182156D300546E6D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4A9182156D300546E6D /* InfoPlist.strings */; };
87D8E4B8182156FB00546E6D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87D8E4B6182156FB00546E6D /* CoreFoundation.framework */; };
87D8E4B9182156FB00546E6D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87D8E4B7182156FB00546E6D /* Foundation.framework */; };
87D8E4BB1821570000546E6D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87D8E4BA1821570000546E6D /* CoreGraphics.framework */; };
87D8E4BD1821570500546E6D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87D8E4BC1821570500546E6D /* UIKit.framework */; };
87D8E4FA1821577E00546E6D /* ALAccessory.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4C01821577E00546E6D /* ALAccessory.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E4FB1821577E00546E6D /* ALAccessory.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4C11821577E00546E6D /* ALAccessory.m */; };
87D8E4FC1821577E00546E6D /* ALBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4C31821577E00546E6D /* ALBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E4FD1821577E00546E6D /* ALBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4C41821577E00546E6D /* ALBattery.m */; };
87D8E4FE1821577E00546E6D /* ALCarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4C61821577E00546E6D /* ALCarrier.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E4FF1821577E00546E6D /* ALCarrier.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4C71821577E00546E6D /* ALCarrier.m */; };
87D8E5001821577E00546E6D /* ALDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4C91821577E00546E6D /* ALDisk.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5011821577E00546E6D /* ALDisk.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4CA1821577E00546E6D /* ALDisk.m */; };
87D8E5021821577E00546E6D /* ALHardware.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4CC1821577E00546E6D /* ALHardware.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5031821577E00546E6D /* ALHardware.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4CD1821577E00546E6D /* ALHardware.m */; };
87D8E5041821577E00546E6D /* ALJailbreak.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4CF1821577E00546E6D /* ALJailbreak.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5051821577E00546E6D /* ALJailbreak.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4D01821577E00546E6D /* ALJailbreak.m */; };
87D8E5061821577E00546E6D /* ALLocalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4D21821577E00546E6D /* ALLocalization.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5071821577E00546E6D /* ALLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4D31821577E00546E6D /* ALLocalization.m */; };
87D8E5081821577E00546E6D /* ALMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4D51821577E00546E6D /* ALMemory.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5091821577E00546E6D /* ALMemory.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4D61821577E00546E6D /* ALMemory.m */; };
87D8E50A1821577E00546E6D /* ALNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4D81821577E00546E6D /* ALNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E50B1821577E00546E6D /* ALNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4D91821577E00546E6D /* ALNetwork.m */; };
87D8E50C1821577E00546E6D /* ALProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4DB1821577E00546E6D /* ALProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E50D1821577E00546E6D /* ALProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4DC1821577E00546E6D /* ALProcessor.m */; };
87D8E50E1821577E00546E6D /* ALSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4DD1821577E00546E6D /* ALSystem.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E50F1821577E00546E6D /* ALSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4DE1821577E00546E6D /* ALSystem.m */; };
87D8E5101821577E00546E6D /* ALSystem_AccessoryConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E01821577E00546E6D /* ALSystem_AccessoryConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5111821577E00546E6D /* ALSystem_ALBatteryConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E11821577E00546E6D /* ALSystem_ALBatteryConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5121821577E00546E6D /* ALSystem_CarrierConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E21821577E00546E6D /* ALSystem_CarrierConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5131821577E00546E6D /* ALSystem_DiskConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E31821577E00546E6D /* ALSystem_DiskConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5141821577E00546E6D /* ALSystem_HardwareConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E41821577E00546E6D /* ALSystem_HardwareConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5151821577E00546E6D /* ALSystem_JailbreakConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E51821577E00546E6D /* ALSystem_JailbreakConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5161821577E00546E6D /* ALSystem_LocalizationConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E61821577E00546E6D /* ALSystem_LocalizationConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5171821577E00546E6D /* ALSystem_MemoryConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E71821577E00546E6D /* ALSystem_MemoryConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5181821577E00546E6D /* ALSystem_NetworkConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E81821577E00546E6D /* ALSystem_NetworkConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E5191821577E00546E6D /* ALSystem_ProcessorConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4E91821577E00546E6D /* ALSystem_ProcessorConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E51A1821577E00546E6D /* ALSystemConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4EA1821577E00546E6D /* ALSystemConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E51B1821577E00546E6D /* Reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 87D8E4EC1821577E00546E6D /* Reachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
87D8E51C1821577E00546E6D /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 87D8E4ED1821577E00546E6D /* Reachability.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
87D8E51D1821577E00546E6D /* iPhone3Gs.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F01821577E00546E6D /* iPhone3Gs.plist */; };
87D8E51E1821577E00546E6D /* iPhone4.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F11821577E00546E6D /* iPhone4.plist */; };
87D8E51F1821577E00546E6D /* iPhone4s.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F21821577E00546E6D /* iPhone4s.plist */; };
87D8E5201821577E00546E6D /* iPhone5.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F31821577E00546E6D /* iPhone5.plist */; };
87D8E5211821577E00546E6D /* iPhone5c.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F41821577E00546E6D /* iPhone5c.plist */; };
87D8E5221821577E00546E6D /* iPhone5s.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F51821577E00546E6D /* iPhone5s.plist */; };
87D8E5231821577E00546E6D /* iPodTouch3.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F71821577E00546E6D /* iPodTouch3.plist */; };
87D8E5241821577E00546E6D /* iPodTouch4.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F81821577E00546E6D /* iPodTouch4.plist */; };
87D8E5251821577E00546E6D /* iPodTouch5.plist in Resources */ = {isa = PBXBuildFile; fileRef = 87D8E4F91821577E00546E6D /* iPodTouch5.plist */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
6506F3391B52F49F006A13A2 /* ALSystemUtilities.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ALSystemUtilities.podspec; sourceTree = SOURCE_ROOT; };
65F4810F1B5D4A990051FFD8 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
870C1AD1196594B400369031 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
8710CC9C18227461009590EE /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
8710CC9D18227461009590EE /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
8710CC9E18227461009590EE /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
8710CC9F18227461009590EE /* ExternalAccessory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExternalAccessory.framework; path = System/Library/Frameworks/ExternalAccessory.framework; sourceTree = SDKROOT; };
8710CCA018227461009590EE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
8710CCA118227461009590EE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
87C3D0481861FAB1007E0142 /* iPad2.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = iPad2.plist; path = iPad/iPad2.plist; sourceTree = "<group>"; };
87C3D04A186204C9007E0142 /* iPad3.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = iPad3.plist; path = iPad/iPad3.plist; sourceTree = "<group>"; };
87C3D04C186204D1007E0142 /* iPad4.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = iPad4.plist; path = iPad/iPad4.plist; sourceTree = "<group>"; };
87C3D04E186204F0007E0142 /* iPadAir.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = iPadAir.plist; path = iPad/iPadAir.plist; sourceTree = "<group>"; };
87C3D05018620776007E0142 /* iPadMini.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = iPadMini.plist; path = iPad/iPadMini.plist; sourceTree = "<group>"; };
87C3D05218620783007E0142 /* iPadMiniRetina.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = iPadMiniRetina.plist; path = iPad/iPadMiniRetina.plist; sourceTree = "<group>"; };
87D350B419C61EAA0081F612 /* iPhone6.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone6.plist; sourceTree = "<group>"; };
87D350B619C6208C0081F612 /* iPhone6Plus.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone6Plus.plist; sourceTree = "<group>"; };
87D8E4A4182156D300546E6D /* ALSystemUtilities.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ALSystemUtilities.framework; sourceTree = BUILT_PRODUCTS_DIR; };
87D8E4A8182156D300546E6D /* ALSystemUtilities-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ALSystemUtilities-Info.plist"; sourceTree = "<group>"; };
87D8E4AA182156D300546E6D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
87D8E4AC182156D300546E6D /* ALSystemUtilities-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ALSystemUtilities-Prefix.pch"; sourceTree = "<group>"; };
87D8E4B6182156FB00546E6D /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
87D8E4B7182156FB00546E6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
87D8E4BA1821570000546E6D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
87D8E4BC1821570500546E6D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
87D8E4C01821577E00546E6D /* ALAccessory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALAccessory.h; sourceTree = "<group>"; };
87D8E4C11821577E00546E6D /* ALAccessory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALAccessory.m; sourceTree = "<group>"; };
87D8E4C31821577E00546E6D /* ALBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALBattery.h; sourceTree = "<group>"; };
87D8E4C41821577E00546E6D /* ALBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALBattery.m; sourceTree = "<group>"; };
87D8E4C61821577E00546E6D /* ALCarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALCarrier.h; sourceTree = "<group>"; };
87D8E4C71821577E00546E6D /* ALCarrier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALCarrier.m; sourceTree = "<group>"; };
87D8E4C91821577E00546E6D /* ALDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALDisk.h; sourceTree = "<group>"; };
87D8E4CA1821577E00546E6D /* ALDisk.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALDisk.m; sourceTree = "<group>"; };
87D8E4CC1821577E00546E6D /* ALHardware.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALHardware.h; sourceTree = "<group>"; };
87D8E4CD1821577E00546E6D /* ALHardware.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALHardware.m; sourceTree = "<group>"; };
87D8E4CF1821577E00546E6D /* ALJailbreak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALJailbreak.h; sourceTree = "<group>"; };
87D8E4D01821577E00546E6D /* ALJailbreak.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALJailbreak.m; sourceTree = "<group>"; };
87D8E4D21821577E00546E6D /* ALLocalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALLocalization.h; sourceTree = "<group>"; };
87D8E4D31821577E00546E6D /* ALLocalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALLocalization.m; sourceTree = "<group>"; };
87D8E4D51821577E00546E6D /* ALMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALMemory.h; sourceTree = "<group>"; };
87D8E4D61821577E00546E6D /* ALMemory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALMemory.m; sourceTree = "<group>"; };
87D8E4D81821577E00546E6D /* ALNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALNetwork.h; sourceTree = "<group>"; };
87D8E4D91821577E00546E6D /* ALNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALNetwork.m; sourceTree = "<group>"; wrapsLines = 0; };
87D8E4DB1821577E00546E6D /* ALProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALProcessor.h; sourceTree = "<group>"; };
87D8E4DC1821577E00546E6D /* ALProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALProcessor.m; sourceTree = "<group>"; };
87D8E4DD1821577E00546E6D /* ALSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem.h; sourceTree = "<group>"; };
87D8E4DE1821577E00546E6D /* ALSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALSystem.m; sourceTree = "<group>"; };
87D8E4E01821577E00546E6D /* ALSystem_AccessoryConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_AccessoryConstants.h; sourceTree = "<group>"; };
87D8E4E11821577E00546E6D /* ALSystem_ALBatteryConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_ALBatteryConstants.h; sourceTree = "<group>"; };
87D8E4E21821577E00546E6D /* ALSystem_CarrierConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_CarrierConstants.h; sourceTree = "<group>"; };
87D8E4E31821577E00546E6D /* ALSystem_DiskConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_DiskConstants.h; sourceTree = "<group>"; };
87D8E4E41821577E00546E6D /* ALSystem_HardwareConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_HardwareConstants.h; sourceTree = "<group>"; };
87D8E4E51821577E00546E6D /* ALSystem_JailbreakConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_JailbreakConstants.h; sourceTree = "<group>"; };
87D8E4E61821577E00546E6D /* ALSystem_LocalizationConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_LocalizationConstants.h; sourceTree = "<group>"; };
87D8E4E71821577E00546E6D /* ALSystem_MemoryConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_MemoryConstants.h; sourceTree = "<group>"; };
87D8E4E81821577E00546E6D /* ALSystem_NetworkConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_NetworkConstants.h; sourceTree = "<group>"; };
87D8E4E91821577E00546E6D /* ALSystem_ProcessorConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystem_ProcessorConstants.h; sourceTree = "<group>"; };
87D8E4EA1821577E00546E6D /* ALSystemConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALSystemConstants.h; sourceTree = "<group>"; };
87D8E4EC1821577E00546E6D /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
87D8E4ED1821577E00546E6D /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
87D8E4F01821577E00546E6D /* iPhone3Gs.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone3Gs.plist; sourceTree = "<group>"; };
87D8E4F11821577E00546E6D /* iPhone4.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone4.plist; sourceTree = "<group>"; };
87D8E4F21821577E00546E6D /* iPhone4s.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone4s.plist; sourceTree = "<group>"; };
87D8E4F31821577E00546E6D /* iPhone5.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone5.plist; sourceTree = "<group>"; };
87D8E4F41821577E00546E6D /* iPhone5c.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone5c.plist; sourceTree = "<group>"; };
87D8E4F51821577E00546E6D /* iPhone5s.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPhone5s.plist; sourceTree = "<group>"; };
87D8E4F71821577E00546E6D /* iPodTouch3.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPodTouch3.plist; sourceTree = "<group>"; };
87D8E4F81821577E00546E6D /* iPodTouch4.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPodTouch4.plist; sourceTree = "<group>"; };
87D8E4F91821577E00546E6D /* iPodTouch5.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iPodTouch5.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
87D8E49F182156D300546E6D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8710CCA218227461009590EE /* AudioToolbox.framework in Frameworks */,
8710CCA318227461009590EE /* CFNetwork.framework in Frameworks */,
8710CCA418227461009590EE /* CoreTelephony.framework in Frameworks */,
8710CCA518227461009590EE /* ExternalAccessory.framework in Frameworks */,
8710CCA618227461009590EE /* Security.framework in Frameworks */,
8710CCA718227461009590EE /* SystemConfiguration.framework in Frameworks */,
87D8E4BD1821570500546E6D /* UIKit.framework in Frameworks */,
87D8E4BB1821570000546E6D /* CoreGraphics.framework in Frameworks */,
87D8E4B8182156FB00546E6D /* CoreFoundation.framework in Frameworks */,
87D8E4B9182156FB00546E6D /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
87C3D0471861F400007E0142 /* iPad */ = {
isa = PBXGroup;
children = (
87C3D0481861FAB1007E0142 /* iPad2.plist */,
87C3D04A186204C9007E0142 /* iPad3.plist */,
87C3D04C186204D1007E0142 /* iPad4.plist */,
87C3D04E186204F0007E0142 /* iPadAir.plist */,
87C3D05018620776007E0142 /* iPadMini.plist */,
87C3D05218620783007E0142 /* iPadMiniRetina.plist */,
);
name = iPad;
sourceTree = "<group>";
};
87D8E499182156D300546E6D = {
isa = PBXGroup;
children = (
87D8E4A6182156D300546E6D /* ALSystemUtilities */,
87D8E526182157EC00546E6D /* Frameworks */,
87D8E4A5182156D300546E6D /* Products */,
);
sourceTree = "<group>";
};
87D8E4A5182156D300546E6D /* Products */ = {
isa = PBXGroup;
children = (
87D8E4A4182156D300546E6D /* ALSystemUtilities.framework */,
);
name = Products;
sourceTree = "<group>";
};
87D8E4A6182156D300546E6D /* ALSystemUtilities */ = {
isa = PBXGroup;
children = (
6506F3391B52F49F006A13A2 /* ALSystemUtilities.podspec */,
65F4810F1B5D4A990051FFD8 /* LICENSE */,
87D8E4BE1821577E00546E6D /* ALSystemUtilities */,
87D8E4A7182156D300546E6D /* Supporting Files */,
);
path = ALSystemUtilities;
sourceTree = "<group>";
};
87D8E4A7182156D300546E6D /* Supporting Files */ = {
isa = PBXGroup;
children = (
87D8E4A8182156D300546E6D /* ALSystemUtilities-Info.plist */,
87D8E4A9182156D300546E6D /* InfoPlist.strings */,
87D8E4AC182156D300546E6D /* ALSystemUtilities-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
87D8E4BE1821577E00546E6D /* ALSystemUtilities */ = {
isa = PBXGroup;
children = (
87D8E4DD1821577E00546E6D /* ALSystem.h */,
87D8E4DE1821577E00546E6D /* ALSystem.m */,
87D8E4BF1821577E00546E6D /* ALAccessory */,
87D8E4C21821577E00546E6D /* ALBattery */,
87D8E4C51821577E00546E6D /* ALCarrier */,
87D8E4C81821577E00546E6D /* ALDisk */,
87D8E4CB1821577E00546E6D /* ALHardware */,
87D8E4CE1821577E00546E6D /* ALJailbreak */,
87D8E4D11821577E00546E6D /* ALLocalization */,
87D8E4D41821577E00546E6D /* ALMemory */,
87D8E4D71821577E00546E6D /* ALNetwork */,
87D8E4DA1821577E00546E6D /* ALProcessor */,
87D8E4DF1821577E00546E6D /* ALSystemConstants */,
87D8E4EB1821577E00546E6D /* Reachability */,
87D8E4EE1821577E00546E6D /* Resources */,
);
path = ALSystemUtilities;
sourceTree = "<group>";
};
87D8E4BF1821577E00546E6D /* ALAccessory */ = {
isa = PBXGroup;
children = (
87D8E4C01821577E00546E6D /* ALAccessory.h */,
87D8E4C11821577E00546E6D /* ALAccessory.m */,
);
path = ALAccessory;
sourceTree = "<group>";
};
87D8E4C21821577E00546E6D /* ALBattery */ = {
isa = PBXGroup;
children = (
87D8E4C31821577E00546E6D /* ALBattery.h */,
87D8E4C41821577E00546E6D /* ALBattery.m */,
);
path = ALBattery;
sourceTree = "<group>";
};
87D8E4C51821577E00546E6D /* ALCarrier */ = {
isa = PBXGroup;
children = (
87D8E4C61821577E00546E6D /* ALCarrier.h */,
87D8E4C71821577E00546E6D /* ALCarrier.m */,
);
path = ALCarrier;
sourceTree = "<group>";
};
87D8E4C81821577E00546E6D /* ALDisk */ = {
isa = PBXGroup;
children = (
87D8E4C91821577E00546E6D /* ALDisk.h */,
87D8E4CA1821577E00546E6D /* ALDisk.m */,
);
path = ALDisk;
sourceTree = "<group>";
};
87D8E4CB1821577E00546E6D /* ALHardware */ = {
isa = PBXGroup;
children = (
87D8E4CC1821577E00546E6D /* ALHardware.h */,
87D8E4CD1821577E00546E6D /* ALHardware.m */,
);
path = ALHardware;
sourceTree = "<group>";
};
87D8E4CE1821577E00546E6D /* ALJailbreak */ = {
isa = PBXGroup;
children = (
87D8E4CF1821577E00546E6D /* ALJailbreak.h */,
87D8E4D01821577E00546E6D /* ALJailbreak.m */,
);
path = ALJailbreak;
sourceTree = "<group>";
};
87D8E4D11821577E00546E6D /* ALLocalization */ = {
isa = PBXGroup;
children = (
87D8E4D21821577E00546E6D /* ALLocalization.h */,
87D8E4D31821577E00546E6D /* ALLocalization.m */,
);
path = ALLocalization;
sourceTree = "<group>";
};
87D8E4D41821577E00546E6D /* ALMemory */ = {
isa = PBXGroup;
children = (
87D8E4D51821577E00546E6D /* ALMemory.h */,
87D8E4D61821577E00546E6D /* ALMemory.m */,
);
path = ALMemory;
sourceTree = "<group>";
};
87D8E4D71821577E00546E6D /* ALNetwork */ = {
isa = PBXGroup;
children = (
87D8E4D81821577E00546E6D /* ALNetwork.h */,
87D8E4D91821577E00546E6D /* ALNetwork.m */,
);
path = ALNetwork;
sourceTree = "<group>";
};
87D8E4DA1821577E00546E6D /* ALProcessor */ = {
isa = PBXGroup;
children = (
87D8E4DB1821577E00546E6D /* ALProcessor.h */,
87D8E4DC1821577E00546E6D /* ALProcessor.m */,
);
path = ALProcessor;
sourceTree = "<group>";
};
87D8E4DF1821577E00546E6D /* ALSystemConstants */ = {
isa = PBXGroup;
children = (
87D8E4EA1821577E00546E6D /* ALSystemConstants.h */,
87D8E4E01821577E00546E6D /* ALSystem_AccessoryConstants.h */,
87D8E4E11821577E00546E6D /* ALSystem_ALBatteryConstants.h */,
87D8E4E21821577E00546E6D /* ALSystem_CarrierConstants.h */,
87D8E4E31821577E00546E6D /* ALSystem_DiskConstants.h */,
87D8E4E41821577E00546E6D /* ALSystem_HardwareConstants.h */,
87D8E4E51821577E00546E6D /* ALSystem_JailbreakConstants.h */,
87D8E4E61821577E00546E6D /* ALSystem_LocalizationConstants.h */,
87D8E4E71821577E00546E6D /* ALSystem_MemoryConstants.h */,
87D8E4E81821577E00546E6D /* ALSystem_NetworkConstants.h */,
87D8E4E91821577E00546E6D /* ALSystem_ProcessorConstants.h */,
);
path = ALSystemConstants;
sourceTree = "<group>";
};
87D8E4EB1821577E00546E6D /* Reachability */ = {
isa = PBXGroup;
children = (
87D8E4EC1821577E00546E6D /* Reachability.h */,
87D8E4ED1821577E00546E6D /* Reachability.m */,
);
path = Reachability;
sourceTree = "<group>";
};
87D8E4EE1821577E00546E6D /* Resources */ = {
isa = PBXGroup;
children = (
87C3D0471861F400007E0142 /* iPad */,
87D8E4EF1821577E00546E6D /* iPhone */,
87D8E4F61821577E00546E6D /* iPodTouch */,
);
path = Resources;
sourceTree = "<group>";
};
87D8E4EF1821577E00546E6D /* iPhone */ = {
isa = PBXGroup;
children = (
87D8E4F01821577E00546E6D /* iPhone3Gs.plist */,
87D8E4F11821577E00546E6D /* iPhone4.plist */,
87D8E4F21821577E00546E6D /* iPhone4s.plist */,
87D8E4F31821577E00546E6D /* iPhone5.plist */,
87D8E4F41821577E00546E6D /* iPhone5c.plist */,
87D8E4F51821577E00546E6D /* iPhone5s.plist */,
87D350B419C61EAA0081F612 /* iPhone6.plist */,
87D350B619C6208C0081F612 /* iPhone6Plus.plist */,
);
path = iPhone;
sourceTree = "<group>";
};
87D8E4F61821577E00546E6D /* iPodTouch */ = {
isa = PBXGroup;
children = (
87D8E4F71821577E00546E6D /* iPodTouch3.plist */,
87D8E4F81821577E00546E6D /* iPodTouch4.plist */,
87D8E4F91821577E00546E6D /* iPodTouch5.plist */,
);
path = iPodTouch;
sourceTree = "<group>";
};
87D8E526182157EC00546E6D /* Frameworks */ = {
isa = PBXGroup;
children = (
870C1AD1196594B400369031 /* AssetsLibrary.framework */,
8710CC9C18227461009590EE /* AudioToolbox.framework */,
8710CC9D18227461009590EE /* CFNetwork.framework */,
8710CC9E18227461009590EE /* CoreTelephony.framework */,
8710CC9F18227461009590EE /* ExternalAccessory.framework */,
8710CCA018227461009590EE /* Security.framework */,
8710CCA118227461009590EE /* SystemConfiguration.framework */,
87D8E4BC1821570500546E6D /* UIKit.framework */,
87D8E4BA1821570000546E6D /* CoreGraphics.framework */,
87D8E4B6182156FB00546E6D /* CoreFoundation.framework */,
87D8E4B7182156FB00546E6D /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
87D8E4A0182156D300546E6D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
87D8E5181821577E00546E6D /* ALSystem_NetworkConstants.h in Headers */,
87D8E5141821577E00546E6D /* ALSystem_HardwareConstants.h in Headers */,
87D8E4FC1821577E00546E6D /* ALBattery.h in Headers */,
87D8E5161821577E00546E6D /* ALSystem_LocalizationConstants.h in Headers */,
87D8E5171821577E00546E6D /* ALSystem_MemoryConstants.h in Headers */,
87D8E5041821577E00546E6D /* ALJailbreak.h in Headers */,
87D8E50E1821577E00546E6D /* ALSystem.h in Headers */,
87D8E5191821577E00546E6D /* ALSystem_ProcessorConstants.h in Headers */,
87D8E50A1821577E00546E6D /* ALNetwork.h in Headers */,
87D8E5021821577E00546E6D /* ALHardware.h in Headers */,
87D8E4FA1821577E00546E6D /* ALAccessory.h in Headers */,
87D8E5101821577E00546E6D /* ALSystem_AccessoryConstants.h in Headers */,
87D8E5131821577E00546E6D /* ALSystem_DiskConstants.h in Headers */,
87D8E5111821577E00546E6D /* ALSystem_ALBatteryConstants.h in Headers */,
87D8E51A1821577E00546E6D /* ALSystemConstants.h in Headers */,
87D8E5151821577E00546E6D /* ALSystem_JailbreakConstants.h in Headers */,
87D8E5061821577E00546E6D /* ALLocalization.h in Headers */,
87D8E50C1821577E00546E6D /* ALProcessor.h in Headers */,
87D8E5081821577E00546E6D /* ALMemory.h in Headers */,
87D8E5121821577E00546E6D /* ALSystem_CarrierConstants.h in Headers */,
87D8E5001821577E00546E6D /* ALDisk.h in Headers */,
87D8E51B1821577E00546E6D /* Reachability.h in Headers */,
87D8E4FE1821577E00546E6D /* ALCarrier.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
87D8E4A3182156D300546E6D /* ALSystemUtilities */ = {
isa = PBXNativeTarget;
buildConfigurationList = 87D8E4B2182156D300546E6D /* Build configuration list for PBXNativeTarget "ALSystemUtilities" */;
buildPhases = (
87D8E49E182156D300546E6D /* Sources */,
87D8E49F182156D300546E6D /* Frameworks */,
87D8E4A0182156D300546E6D /* Headers */,
87D8E4A1182156D300546E6D /* Resources */,
87D8E4A2182156D300546E6D /* ShellScript */,
);
buildRules = (
);
dependencies = (
);
name = ALSystemUtilities;
productName = ALSystemUtilities;
productReference = 87D8E4A4182156D300546E6D /* ALSystemUtilities.framework */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
87D8E49A182156D300546E6D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Andrea Mario Lufino";
};
buildConfigurationList = 87D8E49D182156D300546E6D /* Build configuration list for PBXProject "ALSystemUtilities" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 87D8E499182156D300546E6D;
productRefGroup = 87D8E4A5182156D300546E6D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
87D8E4A3182156D300546E6D /* ALSystemUtilities */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
87D8E4A1182156D300546E6D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
87D350B519C61EAA0081F612 /* iPhone6.plist in Resources */,
87D8E4AB182156D300546E6D /* InfoPlist.strings in Resources */,
87D8E51D1821577E00546E6D /* iPhone3Gs.plist in Resources */,
87D8E51F1821577E00546E6D /* iPhone4s.plist in Resources */,
87D350B719C6208C0081F612 /* iPhone6Plus.plist in Resources */,
87D8E51E1821577E00546E6D /* iPhone4.plist in Resources */,
87D8E5231821577E00546E6D /* iPodTouch3.plist in Resources */,
87D8E5221821577E00546E6D /* iPhone5s.plist in Resources */,
87D8E5251821577E00546E6D /* iPodTouch5.plist in Resources */,
6506F33A1B52F49F006A13A2 /* ALSystemUtilities.podspec in Resources */,
87C3D04F186204F0007E0142 /* iPadAir.plist in Resources */,
87D8E5201821577E00546E6D /* iPhone5.plist in Resources */,
87C3D04D186204D1007E0142 /* iPad4.plist in Resources */,
87D8E5241821577E00546E6D /* iPodTouch4.plist in Resources */,
65F481101B5D4A990051FFD8 /* LICENSE in Resources */,
87D8E5211821577E00546E6D /* iPhone5c.plist in Resources */,
87C3D05318620783007E0142 /* iPadMiniRetina.plist in Resources */,
87C3D04B186204C9007E0142 /* iPad3.plist in Resources */,
87C3D0491861FAB1007E0142 /* iPad2.plist in Resources */,
87C3D05118620776007E0142 /* iPadMini.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
87D8E4A2182156D300546E6D /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /usr/bin/python;
shellScript = "# TAG: BUILD SCRIPT (do not remove this comment)\n# Build script generated using https://github.com/kstenerud/iOS-Universal-Framework Mk 8 (beta 2012-06-16)\nimport logging\n\n\n##############################################################################\n#\n# Configuration\n#\n##############################################################################\n\n# Select which kind of framework to build.\n#\n# Note: Due to issues with Xcode's build process, if you select\n# 'embeddedframework', it will still show the regular framework\n# (as a symlink) along side of the embedded framework. Be sure to\n# instruct your users to copy/move the embedded framework in this case!\n#\n# If your framework contains resources such as images, nibs, momds, plists,\n# zipfiles and such, choose 'embeddedframework'.\n#\n# If your framework contains no resources, choose 'framework'.\n#\n#config_framework_type = 'framework'\nconfig_framework_type = 'embeddedframework'\n\n# Open the build directory in Finder when the universal framework is\n# successfully built.\n#\n# This value can be overridden by setting the UFW_OPEN_BUILD_DIR env variable\n# to True or False.\n#\n# Recommended setting: True\n#\nconfig_open_build_dir = True\n\n# If true, ensures that all public headers are stored in the framework under\n# the same directory hierarchy as they were in the source tree.\n#\n# Xcode by default places all headers at the same top level, but every other\n# build tool in the known universe preserves directory structure. For simple\n# libraries it doesn't really matter much, but for ports of existing software\n# packages or for bigger libraries, it makes sense to have more structure.\n#\n# The default is set to \"False\" since that's what most Xcode users are used to.\n#\n# Recommended setting: True for deep hierarchy projects, False otherwise.\n#\nconfig_deep_header_hierarchy = False\n\n# Specify where the top of the public header hierarchy is. This path is\n# relative to the project's dir (PROJECT_DIR). You can reference environment\n# variables using templating syntax (e.g. \"${TARGET_NAME}/Some/Subdir\")\n#\n# NOTE: Only used if config_deep_header_hierarchy is True.\n#\n# If this is set to None, the script will attempt to figure out for itself\n# where the top of the header hierarchy is by looking for common path prefixes\n# in the public header files. This process can fail if:\n# - You only have one public header file.\n# - Your source header files don't all have a common root.\n#\n# A common approach is to use \"${TARGET_NAME}\", working under the assumption\n# that all of your header files share the common root of a directory under\n# your project with the same name as your target (which is the Xcode default).\n#\n# Recommended setting: \"${TARGET_NAME}\"\n#\nconfig_deep_header_top = \"${TARGET_NAME}\"\n\n# Warn when \"DerivedData\" is detected in any of the header, library, or\n# framework search paths. In almost all cases, references to directories under\n# DerivedData are added as a result of an Xcode bug and must be manually\n# removed.\n#\n# Recommended setting: True\n#\nconfig_warn_derived_data = True\n\n# Warn if no headers were marked public in this framework.\n#\n# Recommended setting: True\n#\nconfig_warn_no_public_headers = True\n\n# Cause the build to fail if any warnings are issued.\n#\n# Recommended setting: True\n#\nconfig_fail_on_warnings = True\n\n# Minimum log level\n#\n# Recommended setting: logging.INFO\n#\nconfig_log_level = logging.INFO\n\n\n##############################################################################\n#\n# Don't touch anything below here unless you know what you're doing.\n#\n##############################################################################\n\nimport collections\nimport json\nimport os\nimport re\nimport shlex\nimport shutil\nimport string\nimport subprocess\nimport sys\nimport time\nimport traceback\n\n\n##############################################################################\n#\n# Globals\n#\n##############################################################################\n\nlog = logging.getLogger('UFW')\n\nissued_warnings = False\n\n\n##############################################################################\n#\n# Classes\n#\n##############################################################################\n\n# Allows the slave build to communicate with the master build.\n#\nclass BuildState:\n\n def __init__(self):\n self.reload()\n\n def reset(self):\n self.slave_platform = None\n self.slave_architectures = []\n self.slave_linked_archive_paths = []\n self.slave_built_fw_path = None\n self.slave_built_embedded_fw_path = None\n\n def set_slave_properties(self, architectures,\n linked_archive_paths,\n built_fw_path,\n built_embedded_fw_path):\n self.slave_platform = os.environ['PLATFORM_NAME']\n self.slave_architectures = architectures\n self.slave_linked_archive_paths = linked_archive_paths\n self.slave_built_fw_path = built_fw_path\n self.slave_built_embedded_fw_path = built_embedded_fw_path\n\n def get_save_path(self):\n return os.path.join(os.environ['PROJECT_TEMP_DIR'], \"ufw_build_state.json\")\n\n def persist(self):\n filename = self.get_save_path()\n parent = os.path.dirname(filename)\n if not os.path.isdir(parent):\n os.makedirs(parent)\n with open(filename, \"w\") as f:\n f.write(json.dumps(self.__dict__))\n\n def reload(self):\n self.reset()\n filename = self.get_save_path()\n if os.path.exists(filename):\n with open(filename, \"r\") as f:\n new_dict = json.loads(f.read())\n if new_dict is not None:\n self.__dict__ = dict(self.__dict__.items() + new_dict.items())\n\n\n# Holds information about the current project and build environment.\n#\nclass Project:\n\n def __init__(self, filename):\n sourcecode_types = ['sourcecode.c.c',\n 'sourcecode.c.objc',\n 'sourcecode.cpp.cpp',\n 'sourcecode.cpp.objcpp',\n 'sourcecode.asm.asm',\n 'sourcecode.asm.llvm',\n 'sourcecode.nasm']\n\n self.build_state = BuildState()\n self.project_data = self.load_from_file(filename)\n self.target = filter(lambda x: x['name'] == os.environ['TARGET_NAME'], self.project_data['targets'])[0]\n self.public_headers = self.get_build_phase_files('PBXHeadersBuildPhase', lambda x: x.get('settings', False) and x['settings'].get('ATTRIBUTES', False) and 'Public' in x['settings']['ATTRIBUTES'])\n self.static_libraries = self.get_build_phase_files('PBXFrameworksBuildPhase', lambda x: x['fileRef']['fileType'] == 'archive.ar' and x['fileRef']['sourceTree'] not in ['DEVELOPER_DIR', 'SDKROOT'])\n self.static_frameworks = self.get_build_phase_files('PBXFrameworksBuildPhase', lambda x: x['fileRef']['fileType'] == 'wrapper.framework' and x['fileRef']['sourceTree'] not in ['DEVELOPER_DIR', 'SDKROOT'])\n self.compilable_sources = self.get_build_phase_files('PBXSourcesBuildPhase', lambda x: x['fileRef']['fileType'] in sourcecode_types)\n self.header_paths = [os.path.join(*x['pathComponents']) for x in self.public_headers]\n\n self.headers_dir = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['CONTENTS_FOLDER_PATH'], 'Headers')\n self.libtool_path = os.path.join(os.environ['DT_TOOLCHAIN_DIR'], 'usr', 'bin', 'libtool')\n self.project_filename = os.path.join(os.environ['PROJECT_FILE_PATH'], \"project.pbxproj\")\n self.local_exe_path = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['EXECUTABLE_PATH'])\n self.local_architectures = os.environ['ARCHS'].split(' ')\n self.local_built_fw_path = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['WRAPPER_NAME'])\n self.local_built_embedded_fw_path = os.path.splitext(self.local_built_fw_path)[0] + \".embeddedframework\"\n self.local_linked_archive_paths = [self.get_linked_ufw_archive_path(arch) for arch in self.local_architectures]\n self.local_platform = os.environ['PLATFORM_NAME']\n other_platforms = os.environ['SUPPORTED_PLATFORMS'].split(' ')\n other_platforms.remove(self.local_platform)\n self.other_platform = other_platforms[0]\n\n sdk_name = os.environ['SDK_NAME']\n if not sdk_name.startswith(self.local_platform):\n raise Exception(\"%s didn't start with %s\" % (sdk_name, self.local_platform))\n self.sdk_version = sdk_name[len(self.local_platform):]\n\n # Load an Xcode project file.\n #\n def load_from_file(self, filename):\n project_file = json.loads(subprocess.check_output([\"plutil\", \"-convert\", \"json\", \"-o\", \"-\", filename]))\n all_objects = project_file['objects']\n del project_file['objects']\n for obj in all_objects.values():\n self.fix_keys(obj)\n self.unpack_objects(self.build_dereference_list(all_objects, None, None, project_file))\n self.unpack_objects(self.build_dereference_list(all_objects, None, None, all_objects.values()))\n project_data = project_file['rootObject']\n self.build_full_paths(project_data, splitpath(os.environ['SOURCE_ROOT']))\n return project_data\n\n def is_key(self, obj): \n return isinstance(obj, basestring) and len(obj) == 24 and re.search('^[0-9a-fA-F]+$', obj) is not None\n \n def build_dereference_list(self, all_objects, parent, key, obj):\n deref_list = []\n if self.is_key(obj):\n dereferenced = all_objects.get(obj, obj)\n if dereferenced is not obj:\n deref_list.append((parent, key, obj, dereferenced))\n elif isinstance(obj, collections.Mapping):\n for k, v in obj.iteritems():\n deref_list += self.build_dereference_list(all_objects, obj, k, v)\n elif isinstance(obj, collections.Iterable) and not isinstance(obj, basestring):\n for item in obj:\n deref_list += self.build_dereference_list(all_objects, obj, None, item)\n return deref_list\n \n def unpack_objects(self, deref_list):\n for parent, key, orig, obj in deref_list:\n if key is None:\n parent.remove(orig)\n parent.append(obj)\n else:\n parent[key] = obj\n\n # Store the full path, separated into components, to a node inside the node\n # as \"pathComponents\". Also recurse into that node if it's a group.\n #\n def build_full_paths(self, node, base_path):\n # Some nodes are relative to a different source tree, specified as an\n # env variable.\n if node.get('sourceTree', '<group>') != '<group>':\n new_base_path = os.environ.get(node['sourceTree'], None)\n if new_base_path:\n base_path = splitpath(new_base_path)\n # Add the current node's path, if any.\n if node.get('path', False):\n base_path = base_path + splitpath(node['path'])\n node['pathComponents'] = base_path\n # Recurse if this is a group.\n if node['isa'] == 'PBXGroup':\n for child in node['children']:\n self.build_full_paths(child, base_path)\n elif node['isa'] == 'PBXProject':\n self.build_full_paths(node['mainGroup'], base_path)\n self.build_full_paths(node['productRefGroup'], base_path)\n for child in node['targets']:\n self.build_full_paths(child, base_path)\n projectRefs = node.get('projectReferences', None)\n if projectRefs is not None:\n for child in projectRefs[0].values():\n self.build_full_paths(child, base_path)\n\n # Fix up any inconvenient keys.\n #\n def fix_keys(self, obj):\n key_remappings = {'lastKnownFileType': 'fileType', 'explicitFileType': 'fileType'}\n for key in list(set(key_remappings.keys()) & set(obj.keys())):\n obj[key_remappings[key]] = obj[key]\n del obj[key]\n\n # Get the files from a build phase.\n #\n def get_build_phase_files(self, build_phase_name, filter_func):\n build_phase = filter(lambda x: x['isa'] == build_phase_name, self.target['buildPhases'])[0]\n build_files = filter(filter_func, build_phase['files'])\n return [x['fileRef'] for x in build_files]\n\n # Get the truncated paths of all headers that start with the specified\n # relative path. Paths are read and returned as fully separated lists.\n # e.g. ['Some', 'Path', 'To', 'A', 'Header'] with relative_path of\n # ['Some', 'Path'] gets truncated to ['To', 'A', 'Header']\n #\n def movable_headers_relative_to(self, relative_path):\n rel_path_length = len(relative_path)\n result = filter(lambda path: len(path) >= rel_path_length and\n path[:rel_path_length] == relative_path, self.header_paths)\n return [path[rel_path_length:] for path in result]\n\n # Get the full path to where a linkable archive (library or framework)\n # is supposed to be.\n #\n def get_linked_archive_path(self, architecture):\n return os.path.join(os.environ['OBJECT_FILE_DIR_%s' % os.environ['CURRENT_VARIANT']],\n architecture,\n os.environ['EXECUTABLE_NAME'])\n\n # Get the full path to our custom linked archive of the project.\n #\n def get_linked_ufw_archive_path(self, architecture):\n return self.get_linked_archive_path(architecture) + \".ufwbuild\"\n\n # Get the full path to the executable of an archive.\n #\n def get_exe_path(self, node):\n path = os.path.join(*node['pathComponents'])\n if node['fileType'] == 'wrapper.framework':\n # Frameworks are directories, so go one deeper\n path = os.path.join(path, os.path.splitext(node['pathComponents'][-1])[0])\n return path\n\n # Get the path to the directory containing the archive.\n #\n def get_containing_path(self, node):\n return os.path.join(*node['pathComponents'])\n \n def get_archive_search_paths(self):\n log.info(\"Search paths = %s\" % set([self.get_containing_path(fw) for fw in self.static_frameworks] + [self.get_containing_path(fw) for fw in self.static_libraries]))\n return set([self.get_containing_path(fw) for fw in self.static_frameworks] + [self.get_containing_path(fw) for fw in self.static_libraries])\n\n # Command to link all objects of a single architecture.\n #\n def get_single_arch_link_command(self, architecture):\n cmd = [self.libtool_path,\n \"-static\",\n \"-arch_only\", architecture,\n \"-syslibroot\", os.environ['SDKROOT'],\n \"-L%s\" % os.environ['TARGET_BUILD_DIR'],\n \"-filelist\", os.environ['LINK_FILE_LIST_%s_%s' % (os.environ['CURRENT_VARIANT'], architecture)]]\n if os.environ.get('OTHER_LDFLAGS', False):\n cmd += [os.environ['OTHER_LDFLAGS']]\n if os.environ.get('WARNING_LDFLAGS', False):\n cmd += [os.environ['WARNING_LDFLAGS']]\n# cmd += [\"-L%s\" % libpath for libpath in self.get_archive_search_paths()]\n cmd += [self.get_exe_path(fw) for fw in self.static_frameworks]\n cmd += [self.get_exe_path(lib) for lib in self.static_libraries]\n cmd += [\"-o\", self.get_linked_ufw_archive_path(architecture)]\n return cmd\n\n # Command to link all local architectures for the current configuration\n # into an archive. This reads all libraries + the UFW-built archives and\n # overwrites the final product.\n #\n def get_local_archs_link_command(self):\n cmd = [self.libtool_path,\n \"-static\"]\n cmd += self.local_linked_archive_paths\n cmd += [self.get_exe_path(fw) for fw in self.static_frameworks]\n cmd += [self.get_exe_path(lib) for lib in self.static_libraries]\n cmd += [\"-o\", os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['EXECUTABLE_PATH'])]\n return cmd\n\n # Command to link all architectures into a universal archive.\n # This reads all UFW-built archives and overwrites the final product.\n #\n def get_all_archs_link_command(self):\n cmd = [self.libtool_path,\n \"-static\"]\n cmd += self.local_linked_archive_paths + self.build_state.slave_linked_archive_paths\n cmd += [\"-o\", os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['EXECUTABLE_PATH'])]\n return cmd\n\n # Build up an environment for the slave process. This uses BUILD_ROOT\n # and TEMP_ROOT to convert all environment variables to values suitable\n # for the slave build environment so that xcodebuild doesn't try to build\n # in the project directory under \"build\".\n #\n def get_slave_environment(self):\n ignored = ['LD_MAP_FILE_PATH',\n 'HEADER_SEARCH_PATHS',\n 'LIBRARY_SEARCH_PATHS',\n 'FRAMEWORK_SEARCH_PATHS']\n build_root = os.environ['BUILD_ROOT']\n temp_root = os.environ['TEMP_ROOT']\n newenv = {}\n for key, value in os.environ.items():\n if key not in ignored and not key.startswith('LINK_FILE_LIST_') and not key.startswith('LD_DEPENDENCY_'):\n if build_root in value or temp_root in value:\n newenv[key] = value.replace(self.local_platform, self.other_platform)\n return newenv\n\n # Command to invoke xcodebuild on the slave platform.\n #\n def get_slave_project_build_command(self):\n cmd = [\"xcodebuild\",\n \"-project\",\n os.environ['PROJECT_FILE_PATH'],\n \"-target\",\n os.environ['TARGET_NAME'],\n \"-configuration\",\n os.environ['CONFIGURATION'],\n \"-sdk\",\n self.other_platform + self.sdk_version]\n cmd += [\"%s=%s\" % (key, value) for key, value in self.get_slave_environment().items()]\n cmd += [\"UFW_MASTER_PLATFORM=\" + os.environ['PLATFORM_NAME']]\n cmd += [os.environ['ACTION']]\n return cmd\n\n\n\n##############################################################################\n#\n# Utility Functions\n#\n##############################################################################\n\n# Split a path into a list of path components.\n#\ndef splitpath(path, maxdepth=20):\n (head, tail) = os.path.split(path)\n return splitpath(head, maxdepth - 1) + [tail] if maxdepth and head and head != path else [ head or tail ]\n\n# Remove all subdirectories under a path.\n#\ndef remove_subdirs(path, ignore_files):\n if os.path.exists(path):\n for filename in filter(lambda x: x not in ignore_files, os.listdir(path)):\n fullpath = os.path.join(path, filename)\n if os.path.isdir(fullpath):\n log.info(\"Remove %s\" % fullpath)\n shutil.rmtree(fullpath)\n\n# Make whatever parent paths are necessary for a path to exist.\n#\ndef ensure_path_exists(path):\n if not os.path.isdir(path):\n os.makedirs(path)\n\n# Make whatever parent paths are necessary for a path's parent to exist.\n#\ndef ensure_parent_exists(path):\n parent = os.path.dirname(path)\n if not os.path.isdir(parent):\n os.makedirs(parent)\n\n# Remove a file or dir if it exists.\n#\ndef remove_path(path):\n if os.path.exists(path):\n if os.path.isdir(path):\n shutil.rmtree(path)\n else:\n os.remove(path)\n\n# Move a file or dir, replacing the destination if it exists.\n#\ndef move_file(src, dst):\n if src == dst or not os.path.isfile(src):\n return\n log.info(\"Move %s to %s\" % (src, dst))\n ensure_parent_exists(dst)\n remove_path(dst)\n shutil.move(src, dst)\n\n# Copy a file or dir, replacing the destination if it exists already.\n#\ndef copy_overwrite(src, dst):\n if src != dst:\n remove_path(dst)\n ensure_parent_exists(dst)\n shutil.copytree(src, dst, symlinks=True)\n\n# Attempt to symlink link_path -> link_to.\n# link_to must be a path relative to link_path's parent and must exist.\n# If link_path already exists, do nothing.\n#\ndef attempt_symlink(link_path, link_to):\n # Only allow linking to an existing file\n os.stat(os.path.abspath(os.path.join(link_path, \"..\", link_to)))\n\n # Only make the link if it hasn't already been made\n if not os.path.exists(link_path):\n log.info(\"Symlink %s -> %s\" % (link_path, link_to))\n os.symlink(link_to, link_path)\n\n# Takes the last entry in an array-based path and returns a normal path\n# relative to base_path.\n#\ndef top_level_file_path(base_path, path_list):\n return os.path.join(base_path, os.path.split(path_list[-1])[-1])\n\n# Takes all entries in an array-based path and returns a normal path\n# relative to base_path.\n#\ndef full_file_path(base_path, path_list):\n return os.path.join(*([base_path] + path_list))\n\n# Print a command before executing it.\n# Also print out all output from the command to STDOUT.\n#\ndef print_and_call(cmd):\n log.info(\"Cmd \" + \" \".join(cmd))\n p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n result = p.communicate()[0]\n if len(result) > 0:\n log.info(result)\n if p.returncode != 0:\n raise subprocess.CalledProcessError(p.returncode, cmd)\n\n# Special print-and-call command for the slave build that strips out\n# xcodebuild's spammy list of environment variables.\n#\ndef print_and_call_slave_build(cmd, other_platform):\n separator = '=== BUILD NATIVE TARGET '\n p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n result = p.communicate()[0].split(separator)\n if len(result) == 1:\n result = result[0]\n else:\n result = separator + result[1]\n log.info(\"Cmd \" + \" \".join(cmd) + \"\\n\" + result)\n if p.returncode != 0:\n raise subprocess.CalledProcessError(p.returncode, cmd)\n\n# Issue a warning and record that a warning has been issued.\n#\ndef issue_warning(msg, *args, **kwargs):\n global issued_warnings\n issued_warnings = True\n log.warn(msg, *args, **kwargs)\n\n\n\n##############################################################################\n#\n# Main Application\n#\n##############################################################################\n\n# Check if we are running as master.\n#\ndef is_master():\n return os.environ.get('UFW_MASTER_PLATFORM', os.environ['PLATFORM_NAME']) == os.environ['PLATFORM_NAME']\n\n# DerivedData should almost never appear in any framework, library, or header\n# search paths. However, Xcode will sometimes add them in, so we check to make\n# sure.\n#\ndef check_for_derived_data_in_search_paths(project):\n search_path_keys = [\"FRAMEWORK_SEARCH_PATHS\", \"LIBRARY_SEARCH_PATHS\", \"HEADER_SEARCH_PATHS\"]\n build_configs = project.target['buildConfigurationList']['buildConfigurations']\n build_settings = filter(lambda x: x['name'] == os.environ['CONFIGURATION'], build_configs)[0]['buildSettings']\n \n found_something = False\n for path_key in filter(lambda x: x in build_settings, search_path_keys):\n path = build_settings[path_key]\n if \"DerivedData\" in path:\n found_something = True\n log.warn(\"Derived data in %s\" % path)\n issue_warning(\"'%s' contains reference to 'DerivedData'.\" % path_key)\n if found_something:\n log.warn(\"Check your build settings and remove any entries that contain paths inside the DerivedData folder.\")\n log.warn(\"Otherwise you can disable this warning by changing 'config_warn_derived_data' in this script.\")\n\n# Link local architectures into their respective archives.\n#\ndef link_local_archs(project):\n for arch in project.local_architectures:\n print_and_call(project.get_single_arch_link_command(arch))\n\n# Link only the local architectures into the final product, not the slave\n# architectures. For iphoneos, this will be armv6, armv7. For simulator, this\n# will be i386.\n#\ndef link_combine_local_archs(project):\n print_and_call(project.get_local_archs_link_command())\n\n# Link all architectures into the final product.\n#\ndef link_combine_all_archs(project):\n print_and_call(project.get_all_archs_link_command())\n\n# Check if we should open the build directory after a successful build.\n#\ndef should_open_build_dir():\n env_setting = os.environ.get('UFW_OPEN_BUILD_DIR', None)\n if env_setting is not None:\n return env_setting\n\n return config_open_build_dir\n\n# Open the build dir in Finder.\n#\ndef open_build_dir():\n print_and_call(['open', os.environ['TARGET_BUILD_DIR']])\n\n# Check if the build was started by selecting \"Archive\" under \"Product\" in\n# Xcode.\n#\ndef is_archive_build():\n # ACTION is always 'build', but perhaps Apple will fix this someday?\n archive_build = os.environ['ACTION'] == 'archive'\n\n if not archive_build:\n # This can be passed in as an env variable when building from command line.\n archive_build = os.environ.get('UFW_ACTION', None) == 'archive'\n\n build_dir = splitpath(os.environ['BUILD_DIR'])\n if not archive_build:\n # This partial path is used when you select \"archive\" from within Xcode.\n archive_build = 'ArchiveIntermediates' in build_dir\n\n # It only counts as a full archive build if this target is being built into\n # its own build dir (not being built as a dependency of another target)\n if archive_build:\n archive_build = os.environ['TARGET_NAME'] in build_dir\n \n return archive_build\n\n# Xcode by default throws all public headers into the top level directory.\n# This function moves them to their expected deep hierarchy.\n#\ndef build_deep_header_hierarchy(project):\n header_path_top = config_deep_header_top\n if not header_path_top:\n header_path_top = os.path.commonprefix(project.header_paths)\n else:\n header_path_top = splitpath(header_path_top)\n\n built_headers_path = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['PUBLIC_HEADERS_FOLDER_PATH'])\n movable_headers = project.movable_headers_relative_to(header_path_top)\n\n # Remove subdirs if they only contain files that have been rebuilt\n ignore_headers = filter(lambda x: not os.path.isfile(top_level_file_path(built_headers_path, x)), movable_headers)\n remove_subdirs(built_headers_path, [file[0] for file in ignore_headers])\n\n # Move rebuilt headers into their proper subdirs\n for header in movable_headers:\n move_file(top_level_file_path(built_headers_path, header), full_file_path(built_headers_path, header))\n\n# Add all symlinks needed to make a full framework structure:\n#\n# MyFramework.framework\n# |-- MyFramework -> Versions/Current/MyFramework\n# |-- Headers -> Versions/Current/Headers\n# |-- Resources -> Versions/Current/Resources\n# `-- Versions\n# |-- A\n# | |-- MyFramework\n# | |-- Headers\n# | | `-- MyFramework.h\n# | `-- Resources\n# | |-- Info.plist\n# | |-- MyViewController.nib\n# | `-- en.lproj\n# | `-- InfoPlist.strings\n# `-- Current -> A\n#\ndef add_symlinks_to_framework(project):\n base_dir = project.local_built_fw_path\n attempt_symlink(os.path.join(base_dir, \"Versions\", \"Current\"), os.environ['FRAMEWORK_VERSION'])\n if os.path.isdir(os.path.join(base_dir, \"Versions\", \"Current\", \"Headers\")):\n attempt_symlink(os.path.join(base_dir, \"Headers\"), os.path.join(\"Versions\", \"Current\", \"Headers\"))\n if os.path.isdir(os.path.join(base_dir, \"Versions\", \"Current\", \"Resources\")):\n attempt_symlink(os.path.join(base_dir, \"Resources\"), os.path.join(\"Versions\", \"Current\", \"Resources\"))\n attempt_symlink(os.path.join(base_dir, os.environ['EXECUTABLE_NAME']), os.path.join(\"Versions\", \"Current\", os.environ['EXECUTABLE_NAME']))\n\n# Build an embedded framework structure.\n# An embedded framework contains the actual framework, plus a \"Resources\"\n# directory containing symlinks to all resources found in the actual framework,\n# with the exception of \"Info.plist\" and anything ending in \".lproj\":\n#\n# MyFramework.embeddedframework\n# |-- MyFramework.framework\n# | |-- MyFramework -> Versions/Current/MyFramework\n# | |-- Headers -> Versions/Current/Headers\n# | |-- Resources -> Versions/Current/Resources\n# | `-- Versions\n# | |-- A\n# | | |-- MyFramework\n# | | |-- Headers\n# | | | `-- MyFramework.h\n# | | `-- Resources\n# | | |-- Info.plist\n# | | |-- MyViewController.nib\n# | | `-- en.lproj\n# | | `-- InfoPlist.strings\n# | `-- Current -> A\n# `-- Resources\n# `-- MyViewController.nib -> ../MyFramework.framework/Resources/MyViewController.nib\n#\ndef build_embedded_framework(project):\n fw_path = project.local_built_fw_path\n embedded_path = project.local_built_embedded_fw_path\n fw_name = os.environ['WRAPPER_NAME']\n remove_path(embedded_path)\n ensure_path_exists(embedded_path)\n copy_overwrite(fw_path, os.path.join(embedded_path, fw_name))\n ensure_path_exists(os.path.join(embedded_path, \"Resources\"))\n symlink_source = os.path.join(\"..\", fw_name, \"Resources\")\n symlink_path = os.path.join(embedded_path, \"Resources\")\n if os.path.isdir(os.path.join(fw_path, \"Resources\")):\n for file in filter(lambda x: x != \"Info.plist\" and not x.endswith(\".lproj\"), os.listdir(os.path.join(fw_path, \"Resources\"))):\n attempt_symlink(os.path.join(symlink_path, file), os.path.join(symlink_source, file))\n\n # Remove the normal framework and replace it with a symlink to the copy\n # in the embedded framework. This is needed because Xcode runs its strip\n # phase AFTER the script runs.\n embed_fw_wrapper = os.path.splitext(os.environ['WRAPPER_NAME'])[0] + \".embeddedframework\"\n remove_path(fw_path)\n attempt_symlink(fw_path, os.path.join(embed_fw_wrapper, os.environ['WRAPPER_NAME']))\n\n\n# Run the build process in slave mode to build the other configuration\n# (device/simulator).\n#\ndef run_slave_build(project):\n print_and_call_slave_build(project.get_slave_project_build_command(), project.other_platform)\n\n# Run the build process.\n#\ndef run_build():\n project = Project(os.path.join(os.environ['PROJECT_FILE_PATH'], \"project.pbxproj\"))\n\n # Issue warnings only if we're master.\n if is_master():\n if len(project.compilable_sources) == 0:\n raise Exception(\"No compilable sources found. Please add at least one source file to build target %s.\" % os.environ['TARGET_NAME'])\n\n if config_warn_derived_data:\n check_for_derived_data_in_search_paths(project)\n if config_warn_no_public_headers and len(project.public_headers) == 0:\n issue_warning('No headers in build target %s were marked public. Please move at least one header to \"Public\" in the \"Copy Headers\" build phase.' % os.environ['TARGET_NAME'])\n\n # Only build slave if this is an archive build.\n if is_archive_build():\n if is_master():\n log.debug(\"Building as MASTER\")\n # The slave-side linker tries to include this (nonexistent) path as\n # a library path.\n ensure_path_exists(project.get_slave_environment()['BUILT_PRODUCTS_DIR'])\n project.build_state.persist()\n run_slave_build(project)\n project.build_state.reload()\n else:\n log.debug(\"Building as SLAVE\")\n project.build_state.reload()\n project.build_state.set_slave_properties(project.local_architectures,\n project.local_linked_archive_paths,\n project.local_built_fw_path,\n project.local_built_embedded_fw_path)\n project.build_state.persist()\n\n link_local_archs(project)\n \n # Only do a universal binary when building an archive.\n if is_archive_build() and is_master():\n link_combine_all_archs(project)\n else:\n link_combine_local_archs(project)\n\n if config_deep_header_hierarchy:\n build_deep_header_hierarchy(project)\n\n add_symlinks_to_framework(project)\n \n if is_master():\n if config_framework_type == 'embeddedframework':\n build_embedded_framework(project)\n elif config_framework_type != 'framework':\n raise Exception(\"%s: Unknown framework type for config_framework_type\" % config_framework_type)\n\n\nif __name__ == \"__main__\":\n log_handler = logging.StreamHandler()\n log_handler.setFormatter(logging.Formatter(\"%(name)s (\" + os.environ['PLATFORM_NAME'] + \"): %(levelname)s: %(message)s\"))\n log.addHandler(log_handler)\n log.setLevel(config_log_level)\n\n error_code = 0\n prefix = \"M\" if is_master() else \"S\"\n log_handler.setFormatter(logging.Formatter(\"%(name)s (\" + prefix + \" \" + os.environ['PLATFORM_NAME'] + \"): %(levelname)s: %(message)s\"))\n\n log.debug(\"Begin build process\")\n\n if config_deep_header_top:\n config_deep_header_top = string.Template(config_deep_header_top).substitute(os.environ)\n\n try:\n run_build()\n if issued_warnings:\n if config_fail_on_warnings:\n error_code = 1\n log.warn(\"Build completed with warnings\")\n else:\n log.info(\"Build completed\")\n if not is_archive_build():\n log.info(\"Note: This is *NOT* a universal framework build. To build as a universal framework, do an archive build.\")\n log.info(\"To do an archive build from command line, use \\\"xcodebuild -configuration Release UFW_ACTION=archive clean build\\\"\")\n except Exception:\n traceback.print_exc(file=sys.stdout)\n error_code = 1\n log.error(\"Build failed\")\n finally:\n if error_code == 0 and is_archive_build() and is_master():\n log.info(\"Built framework is in \" + os.environ['TARGET_BUILD_DIR'])\n if should_open_build_dir():\n open_build_dir()\n sys.exit(error_code)\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
87D8E49E182156D300546E6D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
87D8E51C1821577E00546E6D /* Reachability.m in Sources */,
87D8E5091821577E00546E6D /* ALMemory.m in Sources */,
87D8E4FD1821577E00546E6D /* ALBattery.m in Sources */,
87D8E5071821577E00546E6D /* ALLocalization.m in Sources */,
87D8E50F1821577E00546E6D /* ALSystem.m in Sources */,
87D8E5051821577E00546E6D /* ALJailbreak.m in Sources */,
87D8E5031821577E00546E6D /* ALHardware.m in Sources */,
87D8E5011821577E00546E6D /* ALDisk.m in Sources */,
87D8E50D1821577E00546E6D /* ALProcessor.m in Sources */,
87D8E50B1821577E00546E6D /* ALNetwork.m in Sources */,
87D8E4FB1821577E00546E6D /* ALAccessory.m in Sources */,
87D8E4FF1821577E00546E6D /* ALCarrier.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
87D8E4A9182156D300546E6D /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
87D8E4AA182156D300546E6D /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
87D8E4B0182156D300546E6D /* Debug */ = {
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_BOOL_CONVERSION = 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_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
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 = 6.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debu
gitextract_bmllzn_c/ ├── .gitignore ├── ALSystemUtilities/ │ ├── ALSystemUtilities/ │ │ ├── ALAccessory/ │ │ │ ├── ALAccessory.h │ │ │ └── ALAccessory.m │ │ ├── ALBattery/ │ │ │ ├── ALBattery.h │ │ │ └── ALBattery.m │ │ ├── ALCarrier/ │ │ │ ├── ALCarrier.h │ │ │ └── ALCarrier.m │ │ ├── ALDisk/ │ │ │ ├── ALDisk.h │ │ │ └── ALDisk.m │ │ ├── ALHardware/ │ │ │ ├── ALHardware.h │ │ │ └── ALHardware.m │ │ ├── ALJailbreak/ │ │ │ ├── ALJailbreak.h │ │ │ └── ALJailbreak.m │ │ ├── ALLocalization/ │ │ │ ├── ALLocalization.h │ │ │ └── ALLocalization.m │ │ ├── ALMemory/ │ │ │ ├── ALMemory.h │ │ │ └── ALMemory.m │ │ ├── ALNetwork/ │ │ │ ├── ALNetwork.h │ │ │ └── ALNetwork.m │ │ ├── ALProcessor/ │ │ │ ├── ALProcessor.h │ │ │ └── ALProcessor.m │ │ ├── ALSystem.h │ │ ├── ALSystem.m │ │ ├── ALSystemConstants/ │ │ │ ├── ALSystemConstants.h │ │ │ ├── ALSystem_ALBatteryConstants.h │ │ │ ├── ALSystem_AccessoryConstants.h │ │ │ ├── ALSystem_CarrierConstants.h │ │ │ ├── ALSystem_DiskConstants.h │ │ │ ├── ALSystem_HardwareConstants.h │ │ │ ├── ALSystem_JailbreakConstants.h │ │ │ ├── ALSystem_LocalizationConstants.h │ │ │ ├── ALSystem_MemoryConstants.h │ │ │ ├── ALSystem_NetworkConstants.h │ │ │ └── ALSystem_ProcessorConstants.h │ │ ├── Reachability/ │ │ │ ├── Reachability.h │ │ │ └── Reachability.m │ │ └── Resources/ │ │ ├── iPad/ │ │ │ ├── iPad2.plist │ │ │ ├── iPad3.plist │ │ │ ├── iPad4.plist │ │ │ ├── iPadAir.plist │ │ │ ├── iPadMini.plist │ │ │ └── iPadMiniRetina.plist │ │ ├── iPhone/ │ │ │ ├── iPhone3Gs.plist │ │ │ ├── iPhone4.plist │ │ │ ├── iPhone4s.plist │ │ │ ├── iPhone5.plist │ │ │ ├── iPhone5c.plist │ │ │ ├── iPhone5s.plist │ │ │ ├── iPhone6.plist │ │ │ └── iPhone6Plus.plist │ │ └── iPodTouch/ │ │ ├── iPodTouch3.plist │ │ ├── iPodTouch4.plist │ │ └── iPodTouch5.plist │ ├── ALSystemUtilities-Info.plist │ ├── ALSystemUtilities-Prefix.pch │ └── en.lproj/ │ └── InfoPlist.strings ├── ALSystemUtilities.podspec ├── ALSystemUtilities.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── LICENSE └── README.md
SYMBOL INDEX (2 symbols across 1 files)
FILE: ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.h
type NetworkStatus (line 52) | typedef enum {
function interface (line 59) | interface Reachability: NSObject
Condensed preview — 61 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (215K chars).
[
{
"path": ".gitignore",
"chars": 197,
"preview": "build/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspec"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALAccessory/ALAccessory.h",
"chars": 846,
"preview": "//\n// ALAccessory.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 22/07/13.\n// Copyright (c) 2013 Andrea Mario"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALAccessory/ALAccessory.m",
"chars": 650,
"preview": "//\n// ALAccessory.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 22/07/13.\n// Copyright (c) 2013 Andrea Mario"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALBattery/ALBattery.h",
"chars": 2263,
"preview": "//\n// ALBattery.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 18/07/13.\n// Copyright (c) 2013 Andrea Mario L"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALBattery/ALBattery.m",
"chars": 6941,
"preview": "//\n// ALBattery.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 18/07/13.\n// Copyright (c) 2013 Andrea Mario L"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALCarrier/ALCarrier.h",
"chars": 952,
"preview": "//\n// ALCarrier.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario L"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALCarrier/ALCarrier.m",
"chars": 1367,
"preview": "//\n// ALCarrier.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario L"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALDisk/ALDisk.h",
"chars": 991,
"preview": "//\n// ALDisk.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 19/07/13.\n// Copyright (c) 2013 Andrea Mario Lufi"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALDisk/ALDisk.m",
"chars": 2209,
"preview": "//\n// ALDisk.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 19/07/13.\n// Copyright (c) 2013 Andrea Mario Lufi"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALHardware/ALHardware.h",
"chars": 2930,
"preview": "//\n// ALHardware.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario "
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALHardware/ALHardware.m",
"chars": 7068,
"preview": "//\n// ALHardware.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario "
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALJailbreak/ALJailbreak.h",
"chars": 465,
"preview": "//\n// ALJailbreak.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALJailbreak/ALJailbreak.m",
"chars": 724,
"preview": "//\n// ALJailbreak.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALLocalization/ALLocalization.h",
"chars": 1001,
"preview": "//\n// ALLocalization.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Ma"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALLocalization/ALLocalization.m",
"chars": 797,
"preview": "//\n// ALLocalization.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Ma"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALMemory/ALMemory.h",
"chars": 987,
"preview": "//\n// ALMemory.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario Lu"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALMemory/ALMemory.m",
"chars": 2780,
"preview": "//\n// ALMemory.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario Lu"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALNetwork/ALNetwork.h",
"chars": 1548,
"preview": "//\n// ALNetwork.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario L"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALNetwork/ALNetwork.m",
"chars": 13657,
"preview": "//\n// ALNetwork.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario L"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALProcessor/ALProcessor.h",
"chars": 979,
"preview": "//\n// ALProcessor.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALProcessor/ALProcessor.m",
"chars": 3956,
"preview": "//\n// ALProcessor.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 21/07/13.\n// Copyright (c) 2013 Andrea Mario"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystem.h",
"chars": 2597,
"preview": "//\n// ALSystem.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 09/09/13.\n// Copyright (c) 2013 Andrea Mario Lu"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystem.m",
"chars": 17388,
"preview": "//\n// ALSystem.m\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 09/09/13.\n// Copyright (c) 2013 Andrea Mario Lu"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystemConstants.h",
"chars": 633,
"preview": "//\n// ALSystemConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 2013 Andrea"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_ALBatteryConstants.h",
"chars": 1173,
"preview": "//\n// ALSystem_ALBatteryConst.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 09/09/13.\n// Copyright (c) 2013 "
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_AccessoryConstants.h",
"chars": 434,
"preview": "//\n// ALSystem_AccessoryConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 2"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_CarrierConstants.h",
"chars": 566,
"preview": "//\n// ALSystem_CarrierConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 201"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_DiskConstants.h",
"chars": 594,
"preview": "//\n// ALSystem_DiskConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 09/09/13.\n// Copyright (c) 2013 A"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_HardwareConstants.h",
"chars": 1600,
"preview": "//\n// ALSystem_HardwareConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 09/09/13.\n// Copyright (c) 20"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_JailbreakConstants.h",
"chars": 236,
"preview": "//\n// ALSystem_JailbreakConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 2"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_LocalizationConstants.h",
"chars": 580,
"preview": "//\n// ALSystem_LocalizationConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_MemoryConstants.h",
"chars": 543,
"preview": "//\n// ALSystem_MemoryConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 2013"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_NetworkConstants.h",
"chars": 843,
"preview": "//\n// ALSystem_NetworkConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 201"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/ALSystemConstants/ALSystem_ProcessorConstants.h",
"chars": 564,
"preview": "//\n// ALSystem_ProcessorConstants.h\n// ALSystem\n//\n// Created by Andrea Mario Lufino on 10/09/13.\n// Copyright (c) 2"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.h",
"chars": 3867,
"preview": "/*\n \n File: Reachability.h\n Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs.\n \n Ver"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Reachability/Reachability.m",
"chars": 9115,
"preview": "/*\n \n File: Reachability.m\n Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs.\n \n Ver"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPad2.plist",
"chars": 980,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPad3.plist",
"chars": 1001,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPad4.plist",
"chars": 1004,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPadAir.plist",
"chars": 1010,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPadMini.plist",
"chars": 979,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPad/iPadMiniRetina.plist",
"chars": 1008,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone3Gs.plist",
"chars": 1147,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone4.plist",
"chars": 1142,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone4s.plist",
"chars": 1145,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone5.plist",
"chars": 1176,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone5c.plist",
"chars": 1178,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone5s.plist",
"chars": 1190,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone6.plist",
"chars": 1167,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPhone/iPhone6Plus.plist",
"chars": 1169,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPodTouch/iPodTouch3.plist",
"chars": 807,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPodTouch/iPodTouch4.plist",
"chars": 812,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities/Resources/iPodTouch/iPodTouch5.plist",
"chars": 812,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities-Info.plist",
"chars": 856,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ALSystemUtilities/ALSystemUtilities-Prefix.pch",
"chars": 286,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "ALSystemUtilities/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "ALSystemUtilities.podspec",
"chars": 1203,
"preview": "Pod::Spec.new do |s|\n s.name = 'ALSystemUtilities'\n s.version = '1.3.4'\n s.license = {\n :typ"
},
{
"path": "ALSystemUtilities.xcodeproj/project.pbxproj",
"chars": 79702,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "ALSystemUtilities.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 162,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:ALSystemUtiliti"
},
{
"path": "LICENSE",
"chars": 1086,
"preview": "Copyright (c) 2015 Andrea Mario Lufino <andrea.lufino@me.com>\n\nPermission is hereby granted, free of charge, to any pers"
},
{
"path": "README.md",
"chars": 4882,
"preview": "<!-- \nYou can find this repo on [subspace](https://app.dev.subspace.net/gitlab/subspace-open-development/alsystemutiliti"
}
]
About this extraction
This page contains the full source code of the andrealufino/ALSystemUtilities GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 61 files (195.3 KB), approximately 58.2k tokens, and a symbol index with 2 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.