ObjectiveKit
ObjectiveKit copied to clipboard
Swift5
Nice to meet you.
I am Koutarou Ishikawa, Japanese application engineer.
I am trying to do a "programming-shakyo" on the framework PXSourceList
: porting it from Objective-C to Swift.
When I compiled "ObjectiveKit" with Xcode 11, there were some errors in it. So I fixed it.
- Changes list:
-
Swift version: from 3 to 5.
-
The location of definition
performMethod(_:)
: Moved from RuntimeModification.swift to NSObject.swift. NSObject.swift into added group 'Extensions', without Folder. RuntimeModification.swift into added group 'Protocols', without Folder. -
Changed the implementation location of the following methods to ObjectiveClass and RuntimeClass:
addSelector(_:from:)
,addMethod(_:implementation:)
, andexchangeSelector(_:implementation:)
. -
The parameter
implementation
ofaddMethod(_:implementation:)
: correctted fromImplementationBlock
to@escaping @convention(block) () -> Void
. -
The sources of variable
unwrapped
inivars
,selectors
,protocols
, andproperties
on ObjectiveClass: correctted fromivarList?[i].unsafelyUnwrapped
topropertyList![i].self
. -
Moved
build.sh
,LICENSE
,ObjectiveKit.podspec
,README.md
into added group 'Supporting Files', without Folder. -
Since only calling MapKit in the Test class, added the MapKit.framework to the target "ObjectiveKit". However, I personally think not correct that adding MapKit.framework to ObjectiveKit.xcodeproj in order to pass 'testIntrospection()'.
-