Results 1 to 8 of 8
Discuss IOKit workaround in iphone at the iPhone Developer Exchange - Hackint0sh.org; Hi, I know i can't use the IOKit on the iPhone but isn't there some ...
  1. #1
    Rookie Array

    Join Date
    Feb 2008
    Posts
    22
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default IOKit workaround in iphone

    Hi,
    I know i can't use the IOKit on the iPhone but isn't there some other way to communicate with the hardware, like using some other IOKit.h file??

    Thanks in advance



  2. #2
    Rookie Array

    Join Date
    Feb 2008
    Posts
    22
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    i found the headers in the iPhoneSimulator.platform sdk folder

    copied them over to the iPhoneOS.platform

    The IOKit errors are gone but i get the following output (errors) when building for device:
    ---------------------------------------------
    Building target “MyBattery” of project “MyBattery” with configuration “Release” — (3 errors)
    cd /Users/marcdebl/Xcode/MyBattery
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -L/Users/marcdebl/Xcode/MyBattery/build/Release-iphoneos -F/Users/marcdebl/Xcode/MyBattery/build/Release-iphoneos -filelist /Users/marcdebl/Xcode/MyBattery/build/MyBattery.build/Release-iphoneos/MyBattery.build/Objects-normal/armv6/MyBattery.LinkFileList -miphoneos-version-min=2.0 -Wl,-dead_strip -framework Foundation -framework UIKit -framework CoreGraphics -framework IOKit -o /Users/marcdebl/Xcode/MyBattery/build/Release-iphoneos/MyBattery.app/MyBattery
    ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Library/Frameworks//IOKit.framework/IOKit, missing required architecture arm in file
    Undefined symbols:
    "_IOPSCopyPowerSourcesInfo", referenced from:
    -[MainViewController updateLargeBatteryView] in MainViewController.o
    "_IOPSCopyPowerSourcesList", referenced from:
    -[MainViewController updateLargeBatteryView] in MainViewController.o
    "_IOPSGetPowerSourceDescription", referenced from:
    -[MainViewController updateLargeBatteryView] in MainViewController.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    "_IOPSCopyPowerSourcesInfo", referenced from:
    -[MainViewController updateLargeBatteryView] in MainViewController.o
    "_IOPSCopyPowerSourcesList", referenced from:
    -[MainViewController updateLargeBatteryView] in MainViewController.o
    "_IOPSGetPowerSourceDescription", referenced from:
    -[MainViewController updateLargeBatteryView] in MainViewController.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    Build failed (3 errors)
    --------------------------------

    the app works fine on the simulator

    any idea?

  3. #3
    Newbie Array

    Join Date
    Aug 2008
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    You can copy the libIOKit.A.dylib from the iphone (use sftp or something)
    then include the library in your Target.

  4. #4
    Newbie Array

    Join Date
    Aug 2008
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Thanks, devfromhell and The_Kit!!! I had been searching and searching for a solution to my defective iPhone problem -- when the phone falls asleep it can't recieve calls!

    By copying the IOKit lib and linking it into my app, and by copying the headers from the Simulator I was able to write a daemon that prevents the phone from falling into the deepest sleep mode. If anyone is interested in this let me know and I'll try to get it into a cydia repo.

  5. #5
    Professional Array

    Join Date
    Mar 2007
    Posts
    85
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    13

    Default

    Quote Originally Posted by Jankyguy View Post
    Thanks, devfromhell and The_Kit!!! I had been searching and searching for a solution to my defective iPhone problem -- when the phone falls asleep it can't recieve calls!

    By copying the IOKit lib and linking it into my app, and by copying the headers from the Simulator I was able to write a daemon that prevents the phone from falling into the deepest sleep mode. If anyone is interested in this let me know and I'll try to get it into a cydia repo.
    I'd definitely be interested in the source code/Makefile for such an app. I want to experiment with IOkit stuff, but I'm not experienced with OS X, so don't know where to start.

    Would you be willing to release the source?

    Thanks,

    - Paulb


  6. #6
    Newbie Array

    Join Date
    Jul 2008
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by Jankyguy View Post
    Thanks, devfromhell and The_Kit!!! I had been searching and searching for a solution to my defective iPhone problem -- when the phone falls asleep it can't recieve calls!

    By copying the IOKit lib and linking it into my app, and by copying the headers from the Simulator I was able to write a daemon that prevents the phone from falling into the deepest sleep mode. If anyone is interested in this let me know and I'll try to get it into a cydia repo.

    Hi Jankyguy,

    I also looking for a solution for the background issues. My app need to continue running in the background (of course on jailbroken devices) as it is a media player...
    I'm trying with the Insomnia's code but I've ran into several problem, eg. the IOKit issue.
    Can You share the relevant code snippet?

  7. #7
    Newbie Array

    Join Date
    Sep 2008
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hi all,
    I followed the instruction above, copying the IOKit.framework from Simulator and libIOKit.A.dylib from iphone, and added them into the framework folder of my Xcode project. It can be worked on the simulator. However, when building for device, the Xcode had the error messages below.
    --------------------------------------------------
    Building target “Serial” of project “Serial” with configuration “Debug” — (1 error)
    cd /Users/Pu/Desktop/Serial
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -L/Users/Pu/Desktop/Serial/build/Debug-iphoneos -L/Users/Pu/Desktop/Serial -F/Users/Pu/Desktop/Serial/build/Debug-iphoneos -filelist /Users/Pu/Desktop/Serial/build/Serial.build/Debug-iphoneos/Serial.build/Objects-normal/armv6/Serial.LinkFileList -miphoneos-version-min=2.0 -Wl,-dead_strip -framework Foundation -framework UIKit -framework IOKit -lIOKit.A -o /Users/Pu/Desktop/Serial/build/Debug-iphoneos/Serial.app/Serial
    ld: framework not found IOKit
    collect2: ld returned 1 exit status
    ld: framework not found IOKit
    collect2: ld returned 1 exit status
    Build failed (1 error)
    --------------------------------------------------
    Did I miss anything for the device build?
    Thx.

  8. #8
    Newbie Array

    Join Date
    Aug 2008
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Guys,
    I apologize for not checking back in the forum, so I missed your requests for the code.
    I can't find the source any longer, but I think I will rewrite it as soon as I remember how I did it. In the mean time, if you want the binary I can get you that.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 11-17-2009, 09:52 PM
  2. MacNN: Simpler workaround enables iPhone 3.0 tethering
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 06-18-2009, 04:00 PM
  3. MacNN: TeliaSonera working on MMS workaround for iPhone
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 11-19-2008, 05:20 PM
  4. MacNN: Workaround lets iPhone users share apps
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 07-24-2008, 12:30 AM
  5. Replies: 0
    Last Post: 11-30-2007, 02:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 06:45 PM.
twitter, follow us!