ObjectiveKit icon indicating copy to clipboard operation
ObjectiveKit copied to clipboard

Swift5

Open stein2nd opened this issue 4 years ago • 0 comments

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:), and exchangeSelector(_:implementation:).

    • The parameter implementation of addMethod(_:implementation:): correctted from ImplementationBlock to @escaping @convention(block) () -> Void.

    • The sources of variable unwrapped in ivars, selectors, protocols, and properties on ObjectiveClass: correctted from ivarList?[i].unsafelyUnwrapped to propertyList![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()'.

stein2nd avatar Jun 22 '20 01:06 stein2nd