Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Swift 4.2 #494

Open
sunilprajapatisa opened this issue Oct 30, 2018 · 18 comments
Open

Support for Swift 4.2 #494

sunilprajapatisa opened this issue Oct 30, 2018 · 18 comments

Comments

@sunilprajapatisa
Copy link

Currently supporting latest branch to swift 4.2 ? or any other branch ?

@qiter
Copy link

qiter commented Nov 8, 2018

thx please pod install 4.2 Lib!
soon! thx!

@Khalian
Copy link
Collaborator

Khalian commented Nov 8, 2018

The official effort to update to swift 4.2 is now underway : #496 which also includes the old PRs that attempt to migrate it. Please review the changes.

Sorry for the delay. I had some issues migrating to later versions of XCodes, but that is now fixed, so you can expect faster response cycles from me on version updates.

Also @goktugyil I would need your final sign off before merging this.

@Esqarrouth
Copy link
Owner

Sure, ping me when it's complete

@ashislaha
Copy link

ashislaha commented Nov 12, 2018

Any idea when it will be upgraded into swift 4.2. @Khalian any update from your side?

@Khalian
Copy link
Collaborator

Khalian commented Nov 12, 2018

@goktugyil I got the Ios stuff to build, but not the mac and tvos targets, and I cannot reproduce it on my local environment. Can you take a look? #496.

@Khalian
Copy link
Collaborator

Khalian commented Nov 12, 2018

@goktugyil referencing https://travis-ci.org/goktugyil/EZSwiftExtensions/builds/453835156?utm_source=github_status&utm_medium=notification.

- ERROR | xcodebuild:  /Users/travis/build/goktugyil/EZSwiftExtensions/Sources/EZSwiftFunctions.swift:205:75: error: 'userDidTakeScreenshotNotification' has been renamed to 'NSNotification.Name.UIApplicationUserDidTakeScreenshot'

There is a whole bunch of UIKit naming changes crap that is a part of swift 4.2 for some reason. This is weird because.

  1. This actually builds fine for both ios and tvos, and just falls apart of macOS on travis.
  2. All targets and tests run fine on XCode 10.1 on my system.

I really am not an expert with anything related with UIKit and this is beyond my expertise (particularly because of the fact that I might some cause some sort of regression, we dont have particularly good unit test overage on the non Foundation classes).

ANY HELP FROM ANYONE ON THIS BRANCH WOULD BE APPRECIATED RIGHT NOW.

You would think that Swift and Apple would care for backwards compatibility on all its platform, but whoever designs these APIs appear to be horribly brain damaged.

@isimple4
Copy link

@Khalian Update the .swift-version file to 4.2 should fix those pod lint errors, just tried on my repo.

@Khalian
Copy link
Collaborator

Khalian commented Nov 13, 2018

@isimple4 Definitely helped but theres a new issue now

pod lib lint
-> EZSwiftExtensions (2.0)
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
- NOTE | xcodebuild: warning: Capabilities for App may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the build settings editor. (in target 'App')
- NOTE | xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')

I will take a look at this new nonsense tomorrow.

@isimple4
Copy link

@Khalian There are some issues still around after Xcode 10. Check CocoaPods/CocoaPods#8116 and CocoaPods/CocoaPods#8125 for more information.

@Khalian
Copy link
Collaborator

Khalian commented Nov 13, 2018

Also this

Touching EZSwiftExtensionsTest.xctest (in target: EZSwiftExtensionsTests-tvOS)
2018-11-13 07:40:30.300 xcodebuild[20376:33770] [MT] IDETestOperationsObserverDebug: (0A7B4361-8B94-4CFE-A3D5-CA56B3E650AF) Beginning test session EZSwiftExtensionsTest-0A7B4361-8B94-4CFE-A3D5-CA56B3E650AF at 2018-11-13 07:40:30.300 with Xcode 10B61 on target <DVTiPhoneSimulator: 0x7f89d73599b0> {
SimDevice: Apple TV 1080p (6A5E7CD5-0C3D-486B-9DCF-84B7850285C1, tvOS 10.0, Shutdown)
} (10.0 (14T328))
2018-11-13 07:40:30.301 xcodebuild[20376:34449] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Logs/Test/Run-EZSwiftExtensions-tvOS-2018.11.13_07-40-07-+0000.xcresult/3_Test/Diagnostics/EZSwiftExtensionsTest-38C78983-BC9F-44CD-8C0D-19E259BE74FB/EZSwiftExtensionsTest-1A1D803C-CCA5-4D3B-8F9E-EDB0BEDFB56F/Session-EZSwiftExtensionsTest-2018-11-13_074030-Vsd5Ji.log
2018-11-13 07:40:41.622 xcodebuild[20376:34449] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7f89d75f2530>
2018-11-13 07:40:41.624 xcodebuild[20376:33770] [MT] IDETestOperationsObserverDebug: 11.335 elapsed -- Testing started completed.
2018-11-13 07:40:41.624 xcodebuild[20376:33770] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2018-11-13 07:40:41.624 xcodebuild[20376:33770] [MT] IDETestOperationsObserverDebug: 11.335 sec, +11.335 sec -- end
2018-11-13 07:40:41.625 xcodebuild[20376:33770] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7f89d7148700 {Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Test runner exited before starting test execution." UserInfo={NSLocalizedDescription=Test runner exited before starting test execution., NSLocalizedRecoverySuggestion=If you believe this error represents a bug, please attach the result bundle at /Users/travis/Library/Developer/Xcode/DerivedData/EZSwiftExtensions-cknupuhyerhvhtfuqvigkfkoxukr/Logs/Test/Run-EZSwiftExtensions-tvOS-2018.11.13_07-40-07-+0000.xcresult}}}
Testing failed:
xctest (20536) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying error: Test runner exited before starting test execution.))

@isimple4
Copy link

isimple4 commented Nov 13, 2018

That might be an issue of Travis when simulator was interrupted before starting tests.
Not able to reproduce locally.

@Khalian
Copy link
Collaborator

Khalian commented Nov 13, 2018

@isimple4 Neither can I. And retries do not seem to help. I raised a forum issue on the travis community forum for guidance. https://travis-ci.community/t/cant-run-unit-tests-on-swift-4-2-xcode-10/848. Maybe we can ask for more powerful travis workers or something like that.

@isimple4
Copy link

@Khalian There is an issue travis-ci/travis-ci#6675 discussing about it for couple of years but leaving no official solution. IMHO we could ship it after fixing pod warnings since everything looks locally good to go.

@relsirc
Copy link

relsirc commented Apr 1, 2019

any update on this?

@lenvonsam
Copy link

lenvonsam commented May 13, 2019

how to work on swift4.2

@Esqarrouth
Copy link
Owner

An update for 5 is coming: #501

To work on swift4.2 you can change the version of your pod to 3. You can have separate swift versions in different frameworks you use in the project.

@Sampri21
Copy link

Sampri21 commented Feb 3, 2021

@goktugyil Can you please update for Swift4.2 in replacing UIWebview to WKWebView..as apple is rejecting the app's

@Esqarrouth
Copy link
Owner

Please open or review a PR with the wanted changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants