couchbaselabs/mobile-travel-sample

Some comments for Swift

Opened this issue · 0 comments

pasin commented
  1. .init is not necessary.
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L48

  2. Do not need to re-setting the array object.
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L70

  3. .init is not necessary.
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L83

  4. Unclear why the app needs to create/save the hotel doc when bookmarking (Android code doesn't have it).
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L76-L86

  5. .init is not necessary.
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Presenter/HotelPresenter.swift#L133

  6. Develop > Security > User Management
    In the search box, enter "user:demo" is not correct. It should be "user::demo"

  7. Develop > Security > Access Control
    In Try in out section, Typo in "Run the following command in yout terminal."

  8. The replicator's activity issue should be fixed in DB18. The workaround is not necessary.
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Model/DatabaseManager.swift#L243-L248

  9. It is kind of redundant to create a folder named guest as by default the Database will also create a folder with the database name which is already guest. The default director that the guest folder will be created is also the Application Support folder.
    https://github.com/couchbaselabs/mobile-travel-sample/blob/connect_sv/ios/TravelSample/TravelSample/Model/DatabaseManager.swift#L89-L97