Jump to content

11 posts in this topic

Recommended Posts

Posted

help me add sclalertview in theos??

i use : https://github.com/dogo/SCLAlertView

error:

ld: warning: object file (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin/libclang_rt.ios.a(atomic_signal_fence.c.o)) was built for newer iOS version (6.0) than being linked (5.0)
ld: warning: object file (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin/libclang_rt.ios.a(atomic_thread_fence.c.o)) was built for newer iOS version (6.0) than being linked (5.0)
ld: warning: object file (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin/libclang_rt.ios.a(emutls.c.o)) was built for newer iOS version (6.0) than being linked (5.0)
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_SCLAlertView", referenced from:
      objc-class-ref in Tweak.xm.cde924a7.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

have help me fixxx !

Posted (edited)

Makefile add xxxxx_FRAMEWORKS = UIKit

 

 

Did you do #import <SCLAlertView/SCLAlertView.h> in your Tweak.xm?

i have but not work :( error 

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_SCLAlertView", referenced from:
      objc-class-ref in Tweak.xm.cde924a7.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Updated by vinhthai222006
Posted

 

i have but not work :( error 

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_SCLAlertView", referenced from:
      objc-class-ref in Tweak.xm.cde924a7.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Try adding this to your Makefile

xxx_FILES = Tweak.xm $(shell find $(THEOS)/include/SCLAlertView -name '*.m')
xxx_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit
Posted

 

Try adding this to your Makefile

xxx_FILES = Tweak.xm $(shell find $(THEOS)/include/SCLAlertView -name '*.m')
xxx_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit

 

 

error: 


/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:9: error: 
      '__weak' only applies to Objective-C object or block pointer types; type
      here is 'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:23: error: a
      parameter list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:28: error: 
      expected ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1710:13: error: 
      use of undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1711:20: error: 
      use of undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:9: error: 
      '__weak' only applies to Objective-C object or block pointer types; type
      here is 'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:23: error: a
      parameter list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:28: error: 
      expected ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1744:13: error: 
      use of undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1745:20: error: 
      use of undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:9: error: 
      '__weak' only applies to Objective-C object or block pointer types; type
      here is 'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:23: error: a
      parameter list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:28: error: 
      expected ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1754:13: error: 
      use of undeclared identifier 'weakSelf'
            weakSelf.parameterTarget = target;
            ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1755:20: error: 
      use of undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1762:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Posted

 

error: 


/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:9: error: 
      '__weak' only applies to Objective-C object or block pointer types; type
      here is 'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:23: error: a
      parameter list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1708:28: error: 
      expected ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1710:13: error: 
      use of undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1711:20: error: 
      use of undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:9: error: 
      '__weak' only applies to Objective-C object or block pointer types; type
      here is 'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:23: error: a
      parameter list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1742:28: error: 
      expected ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1744:13: error: 
      use of undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1745:20: error: 
      use of undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:9: error: 
      '__weak' only applies to Objective-C object or block pointer types; type
      here is 'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:23: error: a
      parameter list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1752:28: error: 
      expected ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1754:13: error: 
      use of undeclared identifier 'weakSelf'
            weakSelf.parameterTarget = target;
            ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1755:20: error: 
      use of undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCLAlertView/SCLAlertView.m:1762:16: error: 
      type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

You need different headers. Download 1.0.3 from dogo's GitHub

Posted

You need different headers. Download 1.0.3 from dogo's GitHub

 

i have use guide in https://iosgods.com/topic/27214-how-to-do-sclalertview-in-a-theos-tweak-like-this/

makefile

ARCHS = armv7 arm64

CFLAGS = -fobjc-arc # ARC is needed for SCLAlertView

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = YOURTWEAKNAMEHERE
YOURTWEAKNAMEHERE_FILES = Tweak.xm $(shell find $(THEOS)/vendor/include/SCL -name '*.m')
YOURTWEAKNAMEHERE_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit AudioToolbox
YOURTWEAKNAMEHERE_LDFLAGS += -Wl,-segalign,4000

include $(THEOS_MAKE_PATH)/tweak.mk

tweak.xm

#import <SCL/SCLAlertView.h> // Imports the popup headers.

%hook UnityAppController

- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.

    SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
    
    [alert showSuccess: @"Title here"// Success, Error, Notice, Warning, Info, Edit, Custom, Waiting
              subTitle: @"Subtitle here"
      closeButtonTitle: @"Close button"
              duration: 0.0f];
		return %orig;
}
%end

and i use SCLAlertView 1.0.3 download github but error:

==> Compiling /Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m (armv7)…
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:9: error: '__weak'
      only applies to Objective-C object or block pointer types; type here is
      'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:23: error: a parameter
      list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:28: error: expected
      ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1644:13: error: use of
      undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1645:20: error: use of
      undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:9: error: '__weak'
      only applies to Objective-C object or block pointer types; type here is
      'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:23: error: a parameter
      list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:28: error: expected
      ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1678:13: error: use of
      undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1679:20: error: use of
      undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:9: error: '__weak'
      only applies to Objective-C object or block pointer types; type here is
      'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:23: error: a parameter
      list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:28: error: expected
      ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1688:13: error: use of
      undeclared identifier 'weakSelf'
            weakSelf.parameterTarget = target;
            ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1689:20: error: use of
      undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1696:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
fatal error: too many err
Posted

 

i have use guide in https://iosgods.com/topic/27214-how-to-do-sclalertview-in-a-theos-tweak-like-this/

makefile

ARCHS = armv7 arm64

CFLAGS = -fobjc-arc # ARC is needed for SCLAlertView

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = YOURTWEAKNAMEHERE
YOURTWEAKNAMEHERE_FILES = Tweak.xm $(shell find $(THEOS)/vendor/include/SCL -name '*.m')
YOURTWEAKNAMEHERE_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit AudioToolbox
YOURTWEAKNAMEHERE_LDFLAGS += -Wl,-segalign,4000

include $(THEOS_MAKE_PATH)/tweak.mk

tweak.xm

#import <SCL/SCLAlertView.h> // Imports the popup headers.

%hook UnityAppController

- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.

    SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
    
    [alert showSuccess: @"Title here"// Success, Error, Notice, Warning, Info, Edit, Custom, Waiting
              subTitle: @"Subtitle here"
      closeButtonTitle: @"Close button"
              duration: 0.0f];
		return %orig;
}
%end

and i use SCLAlertView 1.0.3 download github but error:

==> Compiling /Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m (armv7)…
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:9: error: '__weak'
      only applies to Objective-C object or block pointer types; type here is
      'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:23: error: a parameter
      list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1642:28: error: expected
      ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1644:13: error: use of
      undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1645:20: error: use of
      undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:9: error: '__weak'
      only applies to Objective-C object or block pointer types; type here is
      'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:23: error: a parameter
      list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1676:28: error: expected
      ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1678:13: error: use of
      undeclared identifier 'weakSelf'
            weakSelf.parameterTitle = title;
            ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1679:20: error: use of
      undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:9: error: '__weak'
      only applies to Objective-C object or block pointer types; type here is
      'int' [-Werror,-Wignored-attributes]
        __weak typeof(self) weakSelf = self;
        ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:23: error: a parameter
      list without types is only allowed in a function definition
        __weak typeof(self) weakSelf = self;
                      ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1686:28: error: expected
      ';' at end of declaration
        __weak typeof(self) weakSelf = self;
                           ^
                           ;
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1688:13: error: use of
      undeclared identifier 'weakSelf'
            weakSelf.parameterTarget = target;
            ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1689:20: error: use of
      undeclared identifier 'weakSelf'
            return weakSelf;
                   ^
/Users/osxvn/theos/vendor/include/SCL/SCLAlertView.m:1696:16: error: type
      specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
        __weak typeof(self) weakSelf = self;
               ^
fatal error: too many err

Try make clean package and see if you get the same thing

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines