TrueTime.swift icon indicating copy to clipboard operation
TrueTime.swift copied to clipboard

Unable to update/install TrueTime on Objective C project through Cocoapods

Open leotalha opened this issue 6 years ago • 4 comments

I am using Truetime for quite a time. Recently I updated my xcode to 10.2 which required updating the pods with Swift 3. When I run pod update, all pods get updated except TrueTime. And this error comes up

  • Result does not specify a Swift version and none of the targets (MY_APP_NAME) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.
  • TrueTime does not specify a Swift version and none of the targets (MY_APP_NAME) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

Also I have tested it on a new project but it gives same issue. Please note that this issue comes up only on Objective C projects and not on Swift projects.

leotalha avatar Apr 05 '19 05:04 leotalha

I did a workaround but this issue needs to be handled.

Workaround:

In my 'All Objective-C' project, I created a new file with "swift" language. This automatically added a Swift Version option in Build Settings of the Target. After that the pod was able to be installed or updated.

Another Related Issue

After the update/Install, the xcode displayed an error Add () to forward @autoclosure parameter on line 131 of ResultProtocol.swift return left.fanout(right) When I modified the code, xcode asked me to unlock the file first, which I did and the code started working.

As far as I understand, this issue should be resolved as well.

leotalha avatar Apr 05 '19 07:04 leotalha

I've had PR #68 open for the past 10 days or so which fixes my issues with using this library in an Objective-C project in the latest Xcode 10.2

raysarebest avatar Apr 08 '19 14:04 raysarebest

+1 for @raysarebest 's fix;

Tried pod 'TrueTime', git: '[email protected]:Aloompa/TrueTime.swift.git', branch: 'dependency-updates' and the project compiled :-)

RocKhalil avatar Apr 10 '19 07:04 RocKhalil

@leotalha : Can you check if this is still an issue on master?

dhavalshreyas avatar May 17 '19 00:05 dhavalshreyas