Jump to content

DiDA Code Injection compile error - openurl deprecated


Go to solution Solved by Serachrono,

8 posts in this topic

Recommended Posts

Posted

PvZ2.mm:17:42: error: 'openURL:' is deprecated: first deprecated in iOS 10.0 -

      Please use openURL:options:completionHandler: instead

      [-Werror,-Wdeprecated-declarations]

      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"...

                                         ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:127:1: note: 

      'openURL:' has been explicitly marked deprecated here

- (BOOL)openURL:(NSURL*)url NS_DEPRECATED_IOS(2_0, 10_0, "Please use ope...

^

1 error generated.

make[4]: *** [/Users/HTD/PvZ2/.theos/obj/debug/armv7/PvZ2.mm.0c55d4d0.o] Error 1

make[3]: *** [/Users/HTD/PvZ2/.theos/obj/debug/armv7/PvZ2.bundle/PvZ2] Error 2

make[2]: *** [internal-bundle-all_] Error 2

make[1]: *** [PvZ2.all.bundle.variables] Error 2

make: *** [internal-all] Error 2

 

 

 

I get this error when compiling. Here is the file the problem is talking about.

 

 

#import <Preferences/Preferences.h>



@interface PvZ2ListController: PSListController {

}

@end



@implementation PvZ2ListController

- (id)specifiers {

if(_specifiers == nil) {

_specifiers = [[self loadSpecifiersFromPlistName:@"PvZ2" target:self] retain];

}

return _specifiers;

}



/* The "Visit iOSGods.com" link inside the Preferences button */

- (void)link {

      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://iosgods.com"]];

}

@end



// vim:ft=objc
Posted
2 minutes ago, GodlyOne said:

 

PvZ2.mm:17:42: error: 'openURL:' is deprecated: first deprecated in iOS 10.0 -

      Please use openURL:options:completionHandler: instead

 

;) 

Posted
8 minutes ago, Ted2 said:

replace 'openURL:' with 'openURL:options:completionHandler:'

PvZ2.mm:17:40: error: instance method '-openURL:::' not found (return type

      defaults to 'id') [-Werror,-Wobjc-method-access]

    [[UIApplication sharedApplication] openURL:options:completionHandler:[NS...

                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:107:40: note: 

      receiver is instance of class declared here

NS_CLASS_AVAILABLE_IOS(2_0) @interface UIApplication : UIResponder

                                       ^

PvZ2.mm:17:48: error: use of undeclared identifier 'options'

    [[UIApplication sharedApplication] openURL:options:completionHandler...

                                               ^

PvZ2.mm:17:56: error: use of undeclared identifier 'completionHandler'

    [[UIApplication sharedApplication] openURL:options:completionHandler...

                                                       ^

3 errors generated.

make[4]: *** [/Users/HTD/PvZ2/.theos/obj/debug/armv7/PvZ2.mm.0c55d4d0.o] Error 1

make[3]: *** [/Users/HTD/PvZ2/.theos/obj/debug/armv7/PvZ2.bundle/PvZ2] Error 2

make[2]: *** [internal-bundle-all_] Error 2

make[1]: *** [PvZ2.all.bundle.variables] Error 2

make: *** [internal-all] Error 2

 

 

i tried that already and it gave me this

  • Solution
Posted (edited)

i switched to ios9.3 sdk and changed target so now i just got this error.

 

ERROR: package name has characters that aren't lowercase alphanums or '-+.'.

make: *** [internal-package] Error 255

 

 

nevermind just had to change dm.pl file. 

Updated by GodlyOne
Solved

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