Skip to content

Conversation

@dreampiggy
Copy link

@dreampiggy
Copy link
Author

dreampiggy commented Jun 27, 2020

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;

Comment on lines +19 to +20
@property (nonatomic, copy, nullable) id machineName;
@property (nonatomic, copy, nullable) id machineIdentifier;
Copy link
Owner

@rileytestut rileytestut Aug 31, 2020

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.

Copy link
Author

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)

Copy link
Owner

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.

@dreampiggy
Copy link
Author

Any update ?

saltman007web

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.