-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the crash of -[NSNull _fastCStringContents:] #11
base: master
Are you sure you want to change the base?
Conversation
Some API break changes in the master vs the commit AltStore used. Please pay attention: -- (instancetype)initWithName:(NSString *)name identifier:(NSString *)identifier NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithName:(NSString *)name identifier:(NSString *)identifier type:(ALTDeviceType)type NS_DESIGNATED_INITIALIZER; |
@property (nonatomic, copy, nullable) id machineName; | ||
@property (nonatomic, copy, nullable) id machineIdentifier; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing these property types from NSString
(which it should be) to id
doesn't really seem to address the underlying issue, which is that when parsing certificates the machineName
and machineIdentifier
keys might be "null" (from what I understand). Plus, this makes working with this library from Swift much more frustrating due to type erasure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API is from Apple, they use NSNull
. You have to do compatible hack...
If I'm the author of Apple's Private Framework, I will not use suck a hack logic (return NSNull instead of nil)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, but it'd be better to update -[ALTCertificate initWithResponseDictionary:]
to explicitly check for NULL values and assign nil instead to those properties, rather than assign the NSNull object directly and change the public API.
Any update ? |
See: altstoreio/AltStore#157