+ Reply
Results 1 to 2 of 2

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Import <SpringBoard/SpringBoard.h>

is a discussion within the

File Mods

forums, a part of the

iPhone Modding

section;
...
  1. #1
    iPhoneaholic s0ulp1xel's Avatar
    Join Date
    Apr 2011
    Location
    HiltonHeadIsland, SC
    Posts
    462
    Thanks
    13
    Thanked 18 Times in 11 Posts

    Default Import <SpringBoard/SpringBoard.h>
    I'm making a MobileSubstrate tweak with theos for the first time.

    this is my Tweak.xm

    Code:
    #import <SpringBoard/SpringBoard.h>
    #import <UIKit/UIKit.h>
     
    %hook SBApplicationIcon
    -(void)launch
    {
    NSString *appName = [self displayName];
    NSString *message = [NSString stringWithFormat:@"The app %@ has been launched", appName, nil];
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:appName message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alert show];
        [alert release];
        %orig;
    }
    %end

    and this is my Makefile
    Code:
    include theos/makefiles/common.mk
    
    TWEAK_NAME = LaunchNotifier
    TARGET = iphone:6.1
    ARCHS = armv7
    LaunchNotifier_FILES = Tweak.xm
    LaunchNotifier_FRAMEWORKS = UIKit Foundation
    include $(THEOS_MAKE_PATH)/tweak.mk

    I have placed the SpringBoard header files in /opt/theos/include/

    When I run "make" in Terminal on my macbook air (10.8.2)
    Output:
    Code:
    /private/var/root/launchnotifier/theos/makefiles/targets/Darwin/iphone.mk:41: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.Making all for tweak LaunchNotifier...
     Preprocessing Tweak.xm...
     Compiling Tweak.xm...
    In file included from Tweak.xm:1:
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:7:26: error: UIApplication.h: No such file or directory
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:9:40: error: MCProfileConnectionObserver.h: No such file or directory
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:10:34: error: UIApplicationDelegate.h: No such file or directory
    In file included from Tweak.xm:1:
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:12: error: expected `;' before ‘<’ token
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:14: error: cannot find protocol declaration for ‘MCProfileConnectionObserver’
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:16: error: ISO C++ forbids declaration of ‘SBUIController’ with no type
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:16: error: expected `;' before ‘*’ token
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:54: error: ISO C++ forbids declaration of ‘SBApplication’ with no type
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:54: error: expected `;' before ‘*’ token
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:55: error: ISO C++ forbids declaration of ‘SBApplication’ with no type
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:55: error: expected `;' before ‘*’ token
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:66: error: ISO C++ forbids declaration of ‘SBAppContextHostManager’ with no type
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:66: error: expected `;' before ‘*’ token
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:69: error: cannot find protocol declaration for ‘OS_dispatch_source’
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:72: error: declaration of ‘int SpringBoard::SBApplication’
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:54: error: conflicts with previous declaration ‘int SpringBoard::SBApplication’
    /private/var/root/launchnotifier/theos/include/SpringBoard/SpringBoard.h:54: error: duplicate member ‘SBApplication’
    cc1objplus: warnings being treated as errors
    Tweak.xm: In function ‘void _logos_method$_ungrouped$SBApplicationIcon$launch(SBApplicationIcon*, objc_selector*)’:
    Tweak.xm:7: warning: no ‘-displayName’ method found
    Tweak.xm:7: warning: (Messages without a matching method signature
    Tweak.xm:7: warning: will be assumed to return ‘id’ and accept
    Tweak.xm:7: warning: ‘...’ as arguments.)
    make[2]: *** [obj/Tweak.xm.9526df84.o] Error 1
    make[1]: *** [internal-library-all_] Error 2
    make: *** [LaunchNotifier.all.tweak.variables] Error 2

    What is wrong with my code???

  2. #2
    What's Jailbreak?
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    try this

    export THEOS_DEVICE_IP = your_ip_address
    export ARCHS=armv7
    export TARGET=iphone:latest:4.3
    SDKVERSION = 6.1

    include theos/makefiles/common.mk

    LaunchNotifier_FRAMEWORKS = UIKit

    TWEAK_NAME = LaunchNotifier
    LaunchNotifier_FILES = Tweak.xm

    include $(THEOS_MAKE_PATH)/tweak.mk

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts