ProxymanApp / ProxymanApp/Proxyman
[iOS] Create new Swift Package Manager for GDataXMLDocument
Open
@8bitzz is already working on this.
Since Aug 10, 2023.
✅ Done
enhancement
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
It's error-prone to add GDataXML (Objective-C) code to the project when we have conflicts in the xcodeproject.
Thus, the .m is missing from the project without warning. It crashes the app TWICE time.
Acceptance Criteria
- Bring this library to new SPM
- Integrate into the app
How to do it
- Create an SPM with the name
XMLParserSwift - Add two objective-c files
GDataXMLNode.handGDataXMLNode.m - Find a way to disable the ARC on file (GDataXMLNode.m) (ref: https://stackoverflow.com/questions/67803256/swift-package-manager-add-compile-flag-to-a-single-file-fno-objc-arc)
⚠️ GDataXMLNode.m requires -fno-objc-arc compile flag.
- Add a Swift struct into this SPM, name:
XMLParserSwift.swift - Add a static helper func:
static func prettyPrint(data: Data) -> String {
guard let prettyXML = GDataXMLDocument.prettyPrintXMLData(data) else {
return nil
}
return prettyXML
}
- Verify we can build the SPM without error
- Add this package to Proxyman iOS app
- In Proxyman iOS project, remove
GDataXMLNode.handGDataXMLNode.mbecause we don't need it anymore - Open the class
XMLParserand replace the old code with the newXMLParserSwiftfunc.
How to test
- Use HTTPBot to make a POST request, body = XML file, Header:
Content-Type: application/xml - Open this request on Proxyman -> request -> Body -> Verify the app doesn't crash
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.