Closed mollyIV closed 1 year ago
Hello @mollyIV, I tried using class-dump as mentioned in the documentation, but it's possible that the code in IDEFoundation.framework
has been rewritten into Swift as it's not really providing any useful output to me. By using Hopper, I found this.
I'm not exactly sure what "action" refers to (maybe just a string?), but I believe the other 3 fields are similar to others that we have in other model objects. It's worth trying to come up with a model and see if parsing your xcactivitylog parses it correctly.
Hello @BalestraPatrick 👋
Thank you for having a look at the issue.
I've been trying to come up with the model to parse my xcactivitylog
and ended up with this:
public class IDEActivityLogActionMessage: IDEActivityLogMessage {
public let action: String // <-- the only new field
}
It results in getting the following model object from the logs that I attached to the issue:
> title: (String) The identity of “XYZ.xcframework” is not recorded in your project.
> shortTitle = (String) ""
> timeEmitted = (Double) ...
> rangeEndInSectionText = (UInt64) ...
> rangeStartInSectionText = (UInt64) ...
> submessages = [(XCLogParser.IDEActivityLogMessage)] 0 values
> severity = (Int) 0
> type = (String) ""
> location = (XCLogParser.DVTTextDocumentLocation) 0x00...
> categoryIdent = (String) ""
> secondaryLocations = ([XCLogParser.DVTTextDocumentLocation]) 0 values
> additionalDescription = (String) ""
> action: (String) "{"frameworkSigningMismatch":{"_0":{"frameworkPath":"\/Users\/blob\/Projects\/foo\/Carthage\/Build\/XYZ.xcframework"}}}"
I've been moving the iterator.next()
to the end when parsing IDEActivityLogActionMessage
in parseIDEActivityLogActionMessage
function, but couldn't get anything more than the action
message and 0, 0, 0 values. After that an iterator was returning null.
I believe getting only an action message should be good enough, no? 🤔
Btw, I called it action
, but I am up for other naming suggestions.
I created a draft pull request. I didn't add unit tests yet, because first, I wanted to make sure that it's a good implementation direction we are heading to 😉
Thoughts? 🙇
I've also been running into this now that we're updated to Xcode 15. Is there anything we can do to get that draft PR through?
It seems that with the introduction of Xcode 15, there's a new "class instance" type:
IDEActivityLogActionMessage
.An example:
According to the XCActivitylog Format documentation, we need to obtain the properties of this class from a private
IDEFoundation.framework
framework. Unfortunately, I wasn't able to do so.If anyone could help to get the list of properties we should include in a new
IDEActivityLogActionMessage.swift
, I'd be happy to implement it 🙏