├── .gitignore ├── SFSafariCookies.plist ├── README.md ├── Makefile ├── control └── Tweak.xm /.gitignore: -------------------------------------------------------------------------------- 1 | .theos/ 2 | packages/ 3 | packages-old/ 4 | .DS_STORE 5 | **/.DS_STORE 6 | -------------------------------------------------------------------------------- /SFSafariCookies.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.SafariViewService" ); }; } 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SFSafariCookies 2 | **iOS jailbreak tweak that makes SFSafariViewController share cookies with Safari** 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include $(THEOS)/makefiles/common.mk 2 | 3 | TWEAK_NAME = SFSafariCookies 4 | 5 | $(TWEAK_NAME)_FILES = Tweak.xm 6 | $(TWEAK_NAME)_CFLAGS = -fobjc-arc 7 | 8 | include $(THEOS_MAKE_PATH)/tweak.mk 9 | 10 | after-install:: 11 | install.exec "sbreload" 12 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.thatmarcel.tweaks.sfsafaricookies 2 | Name: SFCookies 3 | Depends: mobilesubstrate 4 | Version: 1.0.2 5 | Architecture: iphoneos-arm 6 | Description: Make SFSafariViewController share cookies with Safari 7 | Maintainer: Marcel Braun 8 | Author: Marcel Braun 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | @interface WKWebsiteDataStore 2 | + (id) safari_dataStoreWithConfiguration:(id)config; 3 | + (id) safari_nonPersistentDataStore; 4 | + (id) safari_defaultDataStoreDisallowingTLSFallback; 5 | + (id) safari_allDataTypes; 6 | + (id) safari_clearHSTSSuperCookies; 7 | 8 | + (id) nonPersistentDataStore; 9 | + (id) defaultDataStore; 10 | + (id) allWebsiteDataTypes; 11 | 12 | + (id) _allWebsiteDataTypesIncludingPrivate; 13 | 14 | - (BOOL) isPersistent; 15 | 16 | - (id) _initWithConfiguration:(id)config; 17 | 18 | - (NSString*) _sourceApplicationSecondaryIdentifier; 19 | - (NSString*) _sourceApplicationBundleIdentifier; 20 | @end 21 | 22 | @interface _WKWebsiteDataStoreConfiguration: NSObject 23 | - (instancetype) init; 24 | @end 25 | 26 | WKWebsiteDataStore *newStore; 27 | 28 | %hook WKWebViewConfiguration 29 | - (void) setWebsiteDataStore:(WKWebsiteDataStore *)store { 30 | if (!newStore) { 31 | _WKWebsiteDataStoreConfiguration *config = [[%c(_WKWebsiteDataStoreConfiguration) alloc] init]; 32 | newStore = [%c(WKWebsiteDataStore) safari_dataStoreWithConfiguration: config]; 33 | } 34 | 35 | %orig(newStore); 36 | } 37 | %end 38 | --------------------------------------------------------------------------------