Skip to content

Commit

Permalink
Release v3.0.7 (#120)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
gcutrini authored Oct 18, 2018
1 parent 6675e15 commit 370eb7d
Show file tree
Hide file tree
Showing 43 changed files with 103,126 additions and 228 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contributing to the OpenStack iOS mobile app project

### Pull requests
If you would like to submit code for review, please submit a pull request in the Github repository. The OpenStack iOS app development team will review as soon as possible.

### Reporting bugs / submitting suggestions
If you would like to report a bug or have a recommendation on how to improve the app, please submit a new Issue: https://github.com/OpenStack-mobile/summit-app-ios/issues

### Other issues
If you have any other items that you would like to discuss please contact us at [email protected]
2 changes: 1 addition & 1 deletion OpenStack Summit/CoreSummit/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public protocol Configuration {
/// URL of the OpenStack ID server.
static var authenticationURL: String { get }

static var openID: (client: String, secret: String) { get }
static var openID: (client: String, secret: String, allowedRedirectURL: String) { get }

static var serviceAccount: (client: String, secret: String) { get }

Expand Down
69 changes: 37 additions & 32 deletions OpenStack Summit/CoreSummit/DataUpdatePoller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
// Copyright © 2016 OpenStack. All rights reserved.
//

import Foundation
import JSON

#if os(iOS)
import Crashlytics
import Fabric
#endif

public final class DataUpdatePoller {

// MARK: - Properties

public var polling = false

public var pollingInterval: Double = 60

public var log: ((String) -> ())?
Expand Down Expand Up @@ -68,12 +62,22 @@ public final class DataUpdatePoller {
guard Reachability.connected else { return }
#endif

// dont poll if already polling
guard !polling else { return }

// dont poll if no active summit
guard let summitID = self.summit,
let summit = try! SummitManagedObject.find(summitID, context: store.managedObjectContext)
else { return }
else {
// clear latest data update after wipe
if let latestDataUpdate = storage.latestDataUpdate {

storage.clear()
}
return
}

log?("Polling server for data updates for summit \(summitID)")
print("Polling server for data updates for summit \(summitID)")

/// Handles the polling of the data updates
func process(response: ErrorValue<[DataUpdate]>) {
Expand All @@ -82,35 +86,23 @@ public final class DataUpdatePoller {

case let .error(error):

log?("Error polling server for data updates: \(error)")
let nsError = (error as NSError)

log?("Error polling server: \(nsError.code) - \(nsError.localizedDescription)")

case let .value(dataUpdates):

for update in dataUpdates {
var processedCount = 0

for index in 0..<dataUpdates.count {

let update = dataUpdates[index]

if store.process(dataUpdate: update, summit: summit.id) == false {

// could not process update

#if os(iOS)

var errorUserInfo = [NSLocalizedDescriptionKey: "Could not process data update.", "DataUpdate": "\(update)"]

if let updateEntity = update.entity,
case let .json(jsonObject) = updateEntity {

let jsonString = try! JSON.Value.object(jsonObject).toString(options: .prettyPrint)

errorUserInfo["JSON"] = jsonString
}

let friendlyError = NSError(domain: "CoreSummit", code: -200, userInfo:errorUserInfo)

Crashlytics.sharedInstance().recordError(friendlyError)

#endif

print("Could not process data update: \(update)")
log?("Could not process: \(update.identifier)")

#if DEBUG
return // block
Expand All @@ -119,6 +111,15 @@ public final class DataUpdatePoller {

// store latest data update
storage.latestDataUpdate = update.identifier

processedCount = index

// exit loop if data wiping
if update.className == .WipeData &&
update.operation == .truncate {

break
}
}

if dataUpdates.isEmpty == false {
Expand All @@ -127,9 +128,11 @@ public final class DataUpdatePoller {

try! context.performErrorBlockAndWait { try context.validateAndSave() }

log?("Processed \(dataUpdates.count) data updates")
print("Processed \(processedCount) data updates")
}
}

polling = false
}

// execute request
Expand All @@ -142,6 +145,8 @@ public final class DataUpdatePoller {

store.dataUpdates(summit.id, from: summit.initialDataLoad ?? Date()) { process(response: $0) }
}

polling = true
}
}

Expand Down
46 changes: 42 additions & 4 deletions OpenStack Summit/CoreSummit/FeedbackRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,28 @@ public extension Store {

http.request(method: .get, path: url) { (responseObject, error) in

// forward error
guard error == nil
else { completion(.error(error!)); return }
else {

if error?.code == 401 {

// revoke and retry
http.authzModule?.revokeAccess { (responseObject, error) in

guard error == nil
else { completion(.error(error!)); return }

self.feedback(summit, event: event, page: page, objectsPerPage: objectsPerPage, completion: completion)
}
}
else {

// forward error
completion(.error(error!))
}

return
}

guard let json = try? JSON.Value(string: responseObject as! String),
let page = Page<Feedback>(json: json)
Expand Down Expand Up @@ -62,9 +81,28 @@ public extension Store {

http.request(method: .get, path: url) { (responseObject, error) in

// forward error
guard error == nil
else { completion(.error(error!)); return }
else {

if error?.code == 401 {

// revoke and retry
http.authzModule?.revokeAccess { (responseObject, error) in

guard error == nil
else { completion(.error(error!)); return }

self.averageFeedback(summit, event: event, completion: completion)
}
}
else {

// forward error
completion(.error(error!))
}

return
}

guard let json = try? JSON.Value(string: responseObject as! String),
let jsonObject = json.objectValue,
Expand Down
23 changes: 21 additions & 2 deletions OpenStack Summit/CoreSummit/ListMembersRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,28 @@ public extension Store {

http.request(method: .get, path: url) { (responseObject, error) in

// forward error
guard error == nil
else { completion(.error(error!)); return }
else {

if error?.code == 401 {

// revoke and retry
http.authzModule?.revokeAccess { (responseObject, error) in

guard error == nil
else { completion(.error(error!)); return }

self.members(filter, sort: sort, page: page, perPage: perPage, completion: completion)
}
}
else {

// forward error
completion(.error(error!))
}

return
}

guard let json = try? JSON.Value(string: responseObject as! String),
let page = Page<Member>(json: json)
Expand Down
11 changes: 6 additions & 5 deletions OpenStack Summit/CoreSummit/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public final class Store {
public let createPersistentStore: (NSPersistentStoreCoordinator) throws -> NSPersistentStore

/// Block for resetting the persistent store.
public let deletePersistentStore: (NSPersistentStoreCoordinator, NSPersistentStore) throws -> ()
public let deletePersistentStore: ((NSPersistentStoreCoordinator, NSPersistentStore)?) throws -> ()

/// The server targeted environment.
public let environment: Environment
Expand Down Expand Up @@ -71,7 +71,7 @@ public final class Store {
session: SessionStorage,
contextConcurrencyType: NSManagedObjectContextConcurrencyType = .mainQueueConcurrencyType,
createPersistentStore: @escaping (NSPersistentStoreCoordinator) throws -> NSPersistentStore,
deletePersistentStore: @escaping (NSPersistentStoreCoordinator, NSPersistentStore) throws -> ()) throws {
deletePersistentStore: @escaping ((NSPersistentStoreCoordinator, NSPersistentStore)?) throws -> ()) throws {

// store values
self.environment = environment
Expand Down Expand Up @@ -129,7 +129,7 @@ public final class Store {

public func clear() throws {

try self.deletePersistentStore(persistentStoreCoordinator, persistentStore)
try self.deletePersistentStore((persistentStoreCoordinator, persistentStore))
self.persistentStore = try self.createPersistentStore(persistentStoreCoordinator)

self.managedObjectContext.reset()
Expand Down Expand Up @@ -205,7 +205,7 @@ public final class Store {
var config = Config(
base: environment.configuration.authenticationURL,
authzEndpoint: "oauth2/auth",
redirectURL: "org.openstack.ios.openstack-summit://oauthCallback",
redirectURL: environment.configuration.openID.allowedRedirectURL,
accessTokenEndpoint: "oauth2/token",
clientId: environment.configuration.openID.client,
refreshTokenEndpoint: "oauth2/token",
Expand All @@ -221,7 +221,8 @@ public final class Store {
config = Config(
base: environment.configuration.authenticationURL,
authzEndpoint: "oauth2/auth",
redirectURL: "org.openstack.ios.openstack-summit://oauthCallback",
// redirectURL not needed for service account, constructors requires it though
redirectURL: "",
accessTokenEndpoint: "oauth2/token",
clientId: environment.configuration.serviceAccount.client,
revokeTokenEndpoint: "oauth2/token/revoke",
Expand Down
25 changes: 22 additions & 3 deletions OpenStack Summit/CoreSummit/SummitRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public extension Store {

let managedObject = try summit.save(context)

managedObject.initialDataLoad = NSDate() as Date
managedObject.initialDataLoad = Date()

try context.validateAndSave()
}
Expand Down Expand Up @@ -61,9 +61,28 @@ public extension Store {

http.request(method: .get, path: url) { (responseObject, error) in

// forward error
guard error == nil
else { completion(.error(error!)); return }
else {

if error?.code == 401 {

// revoke and retry
http.authzModule?.revokeAccess { (responseObject, error) in

guard error == nil
else { completion(.error(error!)); return }

self.summit(identifier, completion: completion)
}
}
else {

// forward error
completion(.error(error!))
}

return
}

guard let json = try? JSON.Value(string: responseObject as! String),
let summit = Summit(json: json)
Expand Down
23 changes: 21 additions & 2 deletions OpenStack Summit/CoreSummit/SummitsRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,28 @@ public extension Store {

http.request(method: .get, path: url) { (responseObject, error) in

// forward error
guard error == nil
else { completion(.error(error!)); return }
else {

if error?.code == 401 {

// revoke and retry
http.authzModule?.revokeAccess { (responseObject, error) in

guard error == nil
else { completion(.error(error!)); return }

self.summits(page, objectsPerPage: objectsPerPage, completion: completion)
}
}
else {

// forward error
completion(.error(error!))
}

return
}

guard let json = try? JSON.Value(string: responseObject as! String),
let response = SummitsResponse(json: json)
Expand Down
23 changes: 20 additions & 3 deletions OpenStack Summit/CoreSummit/VenueRoomJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,33 @@ extension VenueRoom: JSONDecodable {
classNameString == VenueRoom.JSONClassName,
let identifier = JSONObject[LocationJSONKey.id.rawValue]?.integerValue,
let name = JSONObject[LocationJSONKey.name.rawValue]?.rawValue as? String,
let venueIdentifier = JSONObject[JSONKey.venue_id.rawValue]?.integerValue,
let floorIdentifier = JSONObject[JSONKey.floor_id.rawValue]?.integerValue
let venueIdentifier = JSONObject[JSONKey.venue_id.rawValue]?.integerValue
else { return nil }

self.identifier = identifier
self.name = name
self.venue = venueIdentifier
self.floor = floorIdentifier > 0 ? floorIdentifier : nil

// optional
if let floorIdentifier = JSONObject[JSONKey.floor_id.rawValue]?.integerValue {

self.floor = floorIdentifier > 0 ? floorIdentifier : nil

} else {

if let floorJSON = JSONObject[JSONKey.floor.rawValue] {

guard let floor = VenueFloor(json: floorJSON)
else { return nil }

self.floor = floor.identifier

} else {

self.floor = nil
}
}

self.descriptionText = JSONObject[LocationJSONKey.description.rawValue]?.rawValue as? String

if let capacity = JSONObject[JSONKey.Capacity.rawValue]?.integerValue {
Expand Down
Loading

0 comments on commit 370eb7d

Please sign in to comment.