Closed seeReadCode closed 7 years ago
It might be nice to have these:
reverse_domain (expected in framework, for error reporting)
startup_message (expected in framework)
map_url (used in our app)
gps_idle_interval_in_seconds (expected in framework)
We can set them dynamically per project via our plist in the meantime.
Project config vals are updated from the server and accessible ( see https://github.com/seeRead/roundware-ios-framework-v2/blob/develop/Pod/Classes/RWFrameworkAPI.swift#L115 and https://github.com/seeRead/roundware-ios-framework-v2/blob/develop/Example/RWFramework/ViewController.swift#L162 ) but still need to confirm that critical booleans are observed within the framework.
So it appears that the listen/speak booleans immediately set off their related actions after they are consumed from the server via getProjectsIdSuccess
. See:
https://github.com/seeRead/roundware-ios-framework-v2/blob/develop/Pod/Classes/RWFrameworkAPI.swift#L131-L145
Next I will compare with play()
, stop()
, startRecording()
and start()
Generally, my approach has been to have the data that comes from the GET project
response be values that are likely to need adjusting during testing or deployment of an app. So things that are pretty static for the most part, I think make more sense to remain in the app's plist.
That said, startup_message
used to be something that the server sent in api/1
, though I don't remember specifically what the mechanism was or where it came from. It is not a field in project
because this was viewed more as a server-wide feature to tell users if the server was down or otherwise experiencing issues.
I think your approach of setting them in the plist for now makes the most sense as I don't have a firm enough grasp on what will be the best ultimate approach. map_url
will certainly remain in the plist for the foreseeable future, and I imagine reverse_domain
will as well.
Understood. Also, just to reiterate from the above comment https://github.com/seeRead/roundware-ios-framework-v2/issues/2#issuecomment-229509266, the project config from the server is set here https://github.com/seeRead/roundware-ios-framework-v2/blob/develop/Pod/Classes/RWFrameworkAPI.swift#L115 and then read to start speak/listen immediately after the successful GET project
response here https://github.com/seeRead/roundware-ios-framework-v2/blob/develop/Pod/Classes/RWFrameworkAPI.swift#L131-L145
So I will double check that these config values are checked within play()
, stop()
, startRecording()
and start()
AND I will change the GET project
callback so that it doesn't immediately call the listening or speaking functions.
Edited to clarify / be real English.
I'm slightly confused about this. The speak/listen enabled and geo_speak/listen enabled booleans should be set based on the values received from GET project
, though I assume they will have some default value specified locally in the plist as well. I'm not sure what you mean by getting positives back from the server but not wanting to turn on immediately?
@hburgund I updated my previous comment to make more sense. Is it clear now?
Yes, thanks, I think I understand what you are saying now and it makes sense. Please feel free to check in with @zobkiw anytime with framework questions as he knows all the history and thinking behind decisions there.
Currently GET for a project returns:
See http://roundware.org/docs/api/index.html