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

Swift 4 Migration #117

Merged
merged 26 commits into from
Feb 5, 2018
Merged

Swift 4 Migration #117

merged 26 commits into from
Feb 5, 2018

Conversation

gcutrini
Copy link
Member

Updated code and dependencies.

Still missing implementing Codable API for JSON representation.

@colemancda
Copy link
Contributor

colemancda commented Jan 12, 2018

I already implemented the Codable API. The code is hosted here: https://github.com/colemancda/CoreDataCodable/blob/master/Tests/CoreDataCodableTests/TestSummitJSON.swift

Basically there are 3 model types now:
SummitResponse.Summit -> Model.Summit -> SummitManagedObject

This is because the JSON can have a 1-1 representation to a decodable model, but there are values (e.g. Summit.TimeZone) that cannot be stored in CoreData as a attribute or as a relationship.

If you want you can copy and paste these 3 files to have the Codable model.

https://github.com/colemancda/CoreDataCodable/blob/master/Tests/CoreDataCodableTests/TestSummitJSON.swift
https://github.com/colemancda/CoreDataCodable/blob/master/Tests/CoreDataCodableTests/TestSummitManagedObject.swift
https://github.com/colemancda/CoreDataCodable/blob/master/Tests/CoreDataCodableTests/TestSummitModel.swift

And don't forget to add github "ColemanCDA/CoreDataCodable" "master" to your Cartfile.

Copy link
Contributor

@colemancda colemancda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemancda
Copy link
Contributor

I also modified the CoreData Model .xcmodel so please copy that as well. It also wouldn't hurt to copy the unit tests. (TDD FTW)

@@ -376,3 +376,9 @@ final class EventDetailViewController: NSViewController, ContentController, Mess
}
}
}

extension NSStoryboardSegue.Identifier {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@gcutrini
Copy link
Member Author

gcutrini commented Feb 5, 2018

@colemancda merging as is.
Implementing Codable model with CoreDataCodable compliance on another branch.
Creating Codable supporting types with JSON mapping and model jsonDecodable methods on yet another branch.

@gcutrini gcutrini merged commit b441e70 into develop Feb 5, 2018
@gcutrini gcutrini deleted the feature/swift4 branch February 5, 2018 18:17
@gcutrini gcutrini mentioned this pull request Mar 22, 2018
JpMaxMan pushed a commit that referenced this pull request Mar 22, 2018
* [iOS] [13314] Fixes venue map zoom defaults.

* Restores OAuth2 access revoked notification handling.

Updates aerogear-ios-oauth2 lib.

* [iOS] [13370] Splash fallbacks to loaded summit name and date display.

* [iOS] [13431] Updates NOW button logic.

* Version bump to 3.0.2.

* Updates oauth2 lib with token refresh getter fix.

* Version bump to 3.0.3.

* Updates oauth lib to allow keychain tokens read when device is locked.

* Version bump to 3.0.4.

* Resets oauth keychain by changing accounts prefix.

* Version bump to 3.0.5.

* Revert "Version bump to 3.0.5."

This reverts commit 35f3d89.

* [CoreSummit] [tvOS] Fixed tvOS compiler crash

Hopefully this will be fixed in the future

* Revert "[CoreSummit] [tvOS] Fixed tvOS compiler crash"

This reverts commit fe5647d.

* [CoreSummit] Fixes compiler crash.

Removes redundant conformance constraint.

* Updates ImageSlideshow dependency.

For swift(>=3.2) compatibility.

* Updates XCDYouTubeKit dependency.

* Swift 4 Migration (#117)

* [CoreSummit] Fixes closures syntax.

* [CoreSummit] Fixes reduce and sorted closures syntax.

* [CoreSummit] Fixes range at syntax.

* [watchOS] Fixes reduce and sorted closures syntax.

* [watchOS] Fixes html to attributed string conversion.

* [iOS] Fixes reduce and sorted closures syntax.

* [iOS] Fixes closures syntax.

* [iOS] Fixes attributed text keys syntax.

* [iOS] Adds new function signature to match expected argument type.

* [iOS] Disambiguiates type(of: self) usage.

* [iOS] Fixes mocked summit store call.

* [macOS] Fixes closures syntax.

* [macOS] Fixes html to attributed string conversion.

* [macOS] Migrates to swift 4 syntax.

* [macOS] Makes segues strings into identifiers.

* [iOS] Adds missing event kit default calendar unwrapping.

* [iOS] Adds @objc attribute for minimal inference.

* [tvOS] Fixes closure syntax.

* [tvOS] Fixes html to attributed string conversion.

* [tvOS] Coverts metadata identifier syntax.

* [CoreSummit] Treats string as collection.

* [iOS] Treats string as collection.

* Updates R.swift.Library dependency.

* Updates XLPagerTabStrip dependency.

* Updates Cosmos dependency.

* Updates project and settings to target swift 4.

objc inference still set to match swift 3 behaviour

* [iOS] [12678] Rearranges My Summit tabs.

* [iOS] Removes schedule view duplicate constraints.

* [iOS] Fixes schedule view content view layout bug.

* [iOS] Fixes venue detail slideshow full screen image selection.

* [iOS] Renames slideshow input source type.

* [iOS] [11351] Links location to floor map.

* [iOS] [13513] Adds filter by track.

* [iOS] [11887] Adds schedule url deep linking.

* Renames schedule active dates methods.

* [CoreSummit] Fixes summits request.

* [iOS] [13776] Improves splash screen transitioning state.

* [iOS] [13776] Fixes splash screen logo size.

* [iOS] [13776] Adds day counters to splash screen.

* [iOS] [13776] Fixes label instances tracking bug.

* [iOS] [13776] Fixes summit name bug.

* Version bump to 3.0.5.

* [iOS] Adds borders to now button.
gcutrini added a commit that referenced this pull request Oct 18, 2018
* [iOS] [13314] Fixes venue map zoom defaults.

* Restores OAuth2 access revoked notification handling.

Updates aerogear-ios-oauth2 lib.

* [iOS] [13370] Splash fallbacks to loaded summit name and date display.

* [iOS] [13431] Updates NOW button logic.

* Version bump to 3.0.2.

* Updates oauth2 lib with token refresh getter fix.

* Version bump to 3.0.3.

* Updates oauth lib to allow keychain tokens read when device is locked.

* Version bump to 3.0.4.

* Resets oauth keychain by changing accounts prefix.

* Version bump to 3.0.5.

* Revert "Version bump to 3.0.5."

This reverts commit 35f3d89.

* [CoreSummit] [tvOS] Fixed tvOS compiler crash

Hopefully this will be fixed in the future

* Revert "[CoreSummit] [tvOS] Fixed tvOS compiler crash"

This reverts commit fe5647d.

* [CoreSummit] Fixes compiler crash.

Removes redundant conformance constraint.

* Updates ImageSlideshow dependency.

For swift(>=3.2) compatibility.

* Updates XCDYouTubeKit dependency.

* Swift 4 Migration (#117)

* [CoreSummit] Fixes closures syntax.

* [CoreSummit] Fixes reduce and sorted closures syntax.

* [CoreSummit] Fixes range at syntax.

* [watchOS] Fixes reduce and sorted closures syntax.

* [watchOS] Fixes html to attributed string conversion.

* [iOS] Fixes reduce and sorted closures syntax.

* [iOS] Fixes closures syntax.

* [iOS] Fixes attributed text keys syntax.

* [iOS] Adds new function signature to match expected argument type.

* [iOS] Disambiguiates type(of: self) usage.

* [iOS] Fixes mocked summit store call.

* [macOS] Fixes closures syntax.

* [macOS] Fixes html to attributed string conversion.

* [macOS] Migrates to swift 4 syntax.

* [macOS] Makes segues strings into identifiers.

* [iOS] Adds missing event kit default calendar unwrapping.

* [iOS] Adds @objc attribute for minimal inference.

* [tvOS] Fixes closure syntax.

* [tvOS] Fixes html to attributed string conversion.

* [tvOS] Coverts metadata identifier syntax.

* [CoreSummit] Treats string as collection.

* [iOS] Treats string as collection.

* Updates R.swift.Library dependency.

* Updates XLPagerTabStrip dependency.

* Updates Cosmos dependency.

* Updates project and settings to target swift 4.

objc inference still set to match swift 3 behaviour

* [iOS] [12678] Rearranges My Summit tabs.

* [iOS] Removes schedule view duplicate constraints.

* [iOS] Fixes schedule view content view layout bug.

* [iOS] Fixes venue detail slideshow full screen image selection.

* [iOS] Renames slideshow input source type.

* [iOS] [11351] Links location to floor map.

* [iOS] [13513] Adds filter by track.

* [iOS] [11887] Adds schedule url deep linking.

* Renames schedule active dates methods.

* [CoreSummit] Fixes summits request.

* [iOS] [13776] Improves splash screen transitioning state.

* [iOS] [13776] Fixes splash screen logo size.

* [iOS] [13776] Adds day counters to splash screen.

* [iOS] [13776] Fixes label instances tracking bug.

* [iOS] [13776] Fixes summit name bug.

* Version bump to 3.0.5.

* Fixes delete persistence store call ambiguity.

* [iOS] [14023] Fixes filters equatable bug.

* [iOS] Adds borders to now button.

* [iOS] Updates Google Maps to v2.7.0

* [CoreSummit] Fixes summit data update processing.

* Adds data updates unit tests.

* Updates Crashalytics dependecy.

Fixes:

-[ANSWriteEventOperation logLineWithTimestamp:eventName:payloadDictionary:]
 Raw Text
* +[NSJSONSerialization dataWithJSONObject:options:error:]: value parameter is nil

* [CoreSummit] Prevents concurrent data update polling.

Updates event data update test json data.

* [Core Summit] Clears data update storage if no active summit.

* [CoreSummit] Skips data update processing if data wiping.

Simplifies data update processing error recording.

* [CoreSummit] [iOS] Revamps data update error logging to Fabric.

* [iOS] Adds logging to view controllers api error.

* [iOS] [14135] Changes button wording.

* [iOS] [14182] Changes event detail section name wording.

* [iOS] [14075] Fixes deep linking UI transitioning.

* [iOS] Fixes layout bug caused by front view being pushed again to front.

* [iOS] Prevents consecutive presses on menu items.

* [iOS] [14218] Changes filter name wording.

* [iOS] [14179] Adds filtering by video.

* [cespinoza] - #14106 (#119)

* Add CONTRIBUTING.md

* [CoreSummit] [iOS] Checks allowed3 redirect url to identify IDP deep linking.

Defers event viewing after data load completion.

* [CoreSummit] Adds auth revoke and retry on service account api calls.

* [iOS] Adds event search by presentation speaker or moderator.

* [iOS] [14393] Fixes duplicated biography.

Caused by race condition.

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

Successfully merging this pull request may close these issues.

2 participants