Giter VIP home page Giter VIP logo

alsystemutilities's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alsystemutilities's Issues

Free + Used memory doesn't add up

If I sum the freeMemory and usedMemory the result is never the total available RAM.
For example, on my iPhone 5c, it says I have 30mb free and 440mb used.

[Question] Memory usage calculation

I have tried various ways to measure memory usage (different code snippets from around the web) and each has a different result (Including the method you supply)

Do you have any insight?

vm_size_t usedMemory(void) {
    struct task_basic_info info;
    mach_msg_type_number_t size = sizeof(info);
    kern_return_t kerr = task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&info, &size);
    return (kerr == KERN_SUCCESS) ? info.resident_size : 0; // size in bytes
}

vm_size_t freeMemory(void) {
    mach_port_t host_port = mach_host_self();
    mach_msg_type_number_t host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
    vm_size_t pagesize;
    vm_statistics_data_t vm_stat;

    host_page_size(host_port, &pagesize);
    (void) host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size);
    return vm_stat.free_count * pagesize;
}

void logMemUsage(void) {
    // compute memory usage and log if different by >= 100k
    static long prevMemUsage = 0;
    long curMemUsage = usedMemory();
    long memUsageDiff = curMemUsage - prevMemUsage;

//    if (memUsageDiff > 100000 || memUsageDiff < -100000) {
        prevMemUsage = curMemUsage;
        NSLog(@"Memory used %7.1f (%+5.0f), free %7.1f kb", curMemUsage/1000.0f, memUsageDiff/1000.0f, freeMemory()/1000.0f);
//    }
}

Mac Address: 02:00:00:00:00:00

My Mac Address is showing "Mac Address: 02:00:00:00:00:00" in my log file.

I have imported the framework and tested with various other configs you have and they work fine.

and code

NSLog(@"Mac Address: %@", [ALNetwork macAddress]);

iPhone 5S, 7.0.4, Jailbroken (NO MAC filter/Fake Location apps)
Xcode 5.02 - Building 7.0.4 -32 Bit (Non 64 Bit) Build for App

license file missing

its not really a problem, but FYI:
while installing via cocoapods, this message pops up:
[!] Unable to read the license file /../Pods/ALSystemUtilities/LICENSE for the spec `ALSystemUtilities (1.0)

won't build for 64-bit iPhone

This doesn't work with iPhone 64-bit devices

I get this error when linking the framework:
ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/marcus.milne/Library/Developer/Xcode/DerivedData/ALSystemUtilities-bviykdlzbhozoqdhsgktchmuceqh/Build/Intermediates/ArchiveIntermediates/ALSystemUtilities/IntermediateBuildFilesPath/UninstalledProducts/ALSystemUtilities.embeddedframework/ALSystemUtilities.framework/ALSystemUtilities file '/Users/marcus.milne/Library/Developer/Xcode/DerivedData/ALSystemUtilities-bviykdlzbhozoqdhsgktchmuceqh/Build/Intermediates/ArchiveIntermediates/ALSystemUtilities/IntermediateBuildFilesPath/UninstalledProducts/ALSystemUtilities.embeddedframework/ALSystemUtilities.framework/ALSystemUtilities' for architecture armv7s

ALBattery remaining hours methods not working

Hey @andrealufino

ALBattery remaining hours methods don't work for me.
As I saw the infoForDevice method returns nil on device & on simulator it returns the dictionary, but doesn't find the needed data & it returns in both situations "NS".

Tested on iPhone 5 with iOS 8.4, iOS & iOS Simulator with iOS 8.2.

It applies for all the methods listed:

  • + (NSString *)remainingHoursForStandby;
  • + (NSString *)remainingHoursFor3gConversation;
  • + (NSString *)remainingHoursFor2gConversation;
  • + (NSString *)remainingHoursForInternet3g;
  • + (NSString *)remainingHoursForInternetWiFi;
  • + (NSString *)remainingHoursForVideo;
  • + (NSString *)remainingHoursForAudio;

Any idea why is that so, any changes in Apple's API maybe?

Thanks for the library,

@kexoth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.