Compare commits
2 commits
main
...
ios-parity
| Author | SHA1 | Date | |
|---|---|---|---|
| a48920b451 | |||
| b50102c53c |
3 changed files with 17 additions and 2 deletions
|
|
@ -1,9 +1,20 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
// Utils.m is compiled as plain Objective-C (C linkage), but Tweak.xm/JSI.mm are Objective-C++.
|
||||
// Without extern "C", the C++ TU expects a mangled `showErrorAlert(NSString*, NSString*)` symbol
|
||||
// that Utils.m never emits, breaking the link (confirmed by an actual Theos build on CI).
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
NSURL *getPyoncordDirectory(void);
|
||||
UIColor *hexToUIColor(NSString *hex);
|
||||
void showErrorAlert(NSString *title, NSString *message);
|
||||
|
||||
/** Detects the Hermes bytecode magic header ("Herm"), as opposed to plain-text JS. */
|
||||
BOOL isHermesBytecode(NSData *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -11,6 +11,9 @@ Revenge_FILES = $(wildcard Sources/*.x Sources/*.xm Sources/*.m Sources/*.mm Sou
|
|||
Revenge_CFLAGS = -fobjc-arc -DPACKAGE_VERSION='@"$(THEOS_PACKAGE_BASE_VERSION)"' -I$(THEOS_PROJECT_DIR)/Headers
|
||||
Revenge_CCFLAGS = -std=c++17 -Wno-c++11-narrowing -I$(THEOS_PROJECT_DIR)/Headers
|
||||
Revenge_FRAMEWORKS = Foundation UIKit CoreGraphics CoreText CoreFoundation
|
||||
# JSI types (e.g. jsi::JSError's typeinfo) only exist in the host process's own compiled-in
|
||||
# Hermes/JSI runtime, not anywhere we can statically link against - resolve at load time instead.
|
||||
Revenge_LDFLAGS = -undefined dynamic_lookup
|
||||
|
||||
RevengeResources_INSTALL_PATH = "/Library/Application\ Support/"
|
||||
RevengeResources_RESOURCE_DIRS = Resources
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ static BOOL isSelfCall(void) {
|
|||
- (NSDictionary *)infoDictionary {
|
||||
if (!isSelfCall()) return %orig;
|
||||
|
||||
NSMutableDictionary *info = [%orig mutableCopy];
|
||||
NSDictionary *origInfo = %orig;
|
||||
NSMutableDictionary *info = [origInfo mutableCopy];
|
||||
info[@"CFBundleIdentifier"] = DISCORD_BUNDLE_ID;
|
||||
info[@"CFBundleDisplayName"] = DISCORD_NAME;
|
||||
info[@"CFBundleName"] = DISCORD_NAME;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue