Coder Social home page Coder Social logo

libcolorpicker's People

Contributors

atomikpanda avatar nepeta avatar noeliel avatar nosskirneh avatar rob311fan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libcolorpicker's Issues

libcolorpicker may causes other apps to crash

Hello there, I'm a Chinese user, and I installed libcolorpicker from Bigboss in order to use Sonus12(another tweak on bigboss). However, it seems cause one app on my phone to crash,(a vocabulary app called 墨墨记单词 in AppStore). I try to remove it from Cydia, and then the app can be opened safely...
Since there is no CrashReporter tool for iOS12, I hava no i idea how to solve this issue, Can you fix it?Thanks.

Can you add a button called Paste From Pasteboard

Can you add a button called Paste From Pasteboard

So if you’ve copied a hex code online you can go to the color picker and just click paste from paste board instead of have to click then paste if that makes sense?

safe mode

latest update is constantly kicking me into safe mode. problem began once i updated libcolorpicker. is there a way to downgrade to previous version? thanks

Hexadecimal Button Crash

Simply put, the hexadecimal button crashes Settings. I have tested this on several tweak preferences.

I am on iOS 13.4.1 on an iPhone 6S using the latest checkra1n jailbreak.

This is just wrong and causing headaches

This snippet of code has caused many issues since this project's inception:

- (void)setLCPOptions {
self.options = [self.specifier properties][@"libcolorpicker"];
if (!self.options)
self.options = [NSMutableDictionary dictionary];

However, I cannot blame the developers to know about the core cause of the issue because it is an odd behaviour.

The problem is that [self.specifier properties][@"libcolorpicker"] returns an NSDictionary, but the code assumes it will be an NSMutableDictionary. Here's DHowett explaining this issue on June 6 on #theos on saurik's IRC server:

06:01:30 The code in libcolorpicker is doing this:
06:01:47 1. Preferences.framework loads up your "specifier" plist, and it sees that "libcolorpicker" is required for it
06:01:59 2. Preferences gives the loaded NSDictionary from your data to libcolorpicker
06:02:13 3. libcolorpicker tried to edit the dictionary by using setObject:forKey:
06:02:21 this is _critical_. okay.
06:02:28 tries*
06:02:39 It's not allowed to do that.. like, ever. It should never change somebody else's dictionary.
06:02:58 That should always fail. They should be using "[options mutableCopy]" to make an editable copy that's disconnected from the original version
06:03:12 But here's a little quick about how property lists work in Cocoa!
06:03:24 There are three property list formats. The text one, the XML one, and the binary one.
06:03:38 FINALPACKAGE converts all your property lists into binary format. They're WAY faster to load, and a lot smaller too!
06:03:45 so it's great for a release version of the package.
06:03:54 I said "quick;" i meant "quirk"
06:04:11 Here's the quirk: XML property lists are loaded into mutable dictionaries .. and then Cocoa just lies about it and says they're NOT mutable
06:04:18 binary property lists are loaded into IMMUTABLE dictionaries
06:04:32 so when libcolorpicker tries to edit it ........ it either fails or succeeds, depending on what format the plist was in
06:05:12 so because the FINALPACKAGE=1 build rules optimized your property lists, libcolorpicker failed to edit the dictionary..
06:05:21 all because it should not have ever tried. that was their fault. they wrote bad code
06:05:26 bad code that "just worked"
06:05:31 because of a quirk. :)

The solution is to simply change:

self.options = [self.specifier properties][@"libcolorpicker"];

to this:

self.options = [[self.specifier properties][@"libcolorpicker"] mutableCopy];

miscellaneous bug fixes and improvements

I love this library a lot, but I heard from Readme of Alderis's repo that this library was abandoned. Sorry to hear that.
If anyone still wants to use this library. I highly recommend to statically link with my fork version.

Statically linking to your tweak, so it won't conflict with Alderis.
And my fork including miscellaneous bug fixes and improvements listed as below:

  • Using native method to read/write pref value, you can implement your own getter/setter.
  • Providing native reload interface, cell won't re-generate when reloading specifier.
  • fix a bug which cause alpha of fallback is always 1.
  • fix a bug which cause alpha is always 0 on some low version device.
  • fix building issues with specific sdk.
  • fully use arc.
  • add a script by which you can test on simulator.

If needed , I'm willing to create PRs or directly maintain this library.
Thanks, I really love this library.

Color Picker instantly closes

When I try to use the color picker in the Settings app ( trying to configure Flame ), it instantly closes and won’t let me interact with it.
If I hold my finger on it, it stays there, but the background semi-transparent black goes away, and when I release, it also entirely goes away.
I tried to re-install but I can’t seem to get it working.
I am running the latest version of libcolorpicker.

Settings crash when compiled with FINALPACKAGE = 1. (iOS 13)

Crash Log:
`Date: 25/11/2019, 10:16 pm
Process: Preferences
Bundle id: com.apple.Preferences
Device: iPhone 7, iOS 13.2.2

Exception type: NSInvalidArgumentException
Reason: -[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x280139100
Culprit: Unknown
Call stack:
0 CoreFoundation 0x00000001bcd01820 __exceptionPreprocess
1 libobjc.A.dylib 0x00000001bca29fa4 objc_exception_throw
2 CoreFoundation 0x00000001bcc0536c -[NSOrderedSet initWithSet:copyItems:]
3 CoreFoundation 0x00000001bcd05c88 forwarding
4 CoreFoundation 0x00000001bcd07a6c _CF_forwarding_prep_0
5 libcolorpicker.dylib 0x000000010ee4c3e0 LCPParseColorString
6 libcolorpicker.dylib 0x000000010ee4c568 LCPParseColorString
7 UIKitCore 0x00000001c11ea87c __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke
8 UIKitCore 0x00000001c11ea450 -[UIView(Hierarchy) _postMovedFromSuperview:]
9 UIKitCore 0x00000001c11f8d58 -[UIView(Internal) _addSubview:positioned:relativeTo:]
10 UIKitCore 0x00000001c0f1ee78 -[UITableView _addSubview:positioned:relativeTo:]
11 UIKitCore 0x00000001c119310c -[UIScrollView _addContentSubview:atBack:]
12 UIKitCore 0x00000001c0f1ebb0 -[UITableView _addContentSubview:atBack:]
13 UIKitCore 0x00000001c0f3f1a8 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke
14 UIKitCore 0x00000001c11f209c +[UIView(Animation) performWithoutAnimation:]
15 UIKitCore 0x00000001c0f3e9bc -[UITableView _configureCellForDisplay:forIndexPath:]
16 UIKitCore 0x00000001c0f4fd24 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:]
17 UIKitCore 0x00000001c0f1d348 -[UITableView _updateVisibleCellsNow:]
18 UIKitCore 0x00000001c0f3a510 -[UITableView layoutSubviews]
19 UIKitCore 0x00000001c11ff604 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
20 QuartzCore 0x00000001c374d78c -[CALayer layoutSublayers]
21 QuartzCore 0x00000001c3753908 CA::Layer::layout_if_needed(CA::Transaction*)
22 QuartzCore 0x00000001c375e528 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
23 QuartzCore 0x00000001c36a6ed0 CA::Context::commit_transaction(CA::Transaction*, double)
24 QuartzCore 0x00000001c36d0bbc CA::Transaction::commit()
25 UIKitCore 0x00000001c0d9391c _afterCACommitHandler
26 CoreFoundation 0x00000001bcc7ec2c CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
27 CoreFoundation 0x00000001bcc79b18 __CFRunLoopDoObservers
28 CoreFoundation 0x00000001bcc7a0e4 __CFRunLoopRun
29 CoreFoundation 0x00000001bcc798a0 CFRunLoopRunSpecific
30 GraphicsServices 0x00000001c6bd1328 GSEventRunModal
31 UIKitCore 0x00000001c0d6a740 UIApplicationMain
32 Preferences 0x000000010486d94c Preferences + 39244
33 libdyld.dylib 0x00000001bcb04360 start`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.