07-24-2017 06:52 AM
It is recommended that the API secret be kept server-side. How am I supposed to make a call to the server to generate a secure URL using the api key and secret, when the OOSecureURLGenerator protocol has a secureURL method that returns immediately without an asychronous callback:
* @brief A protocol used to request a signed URL for Player API requests
@protocol OOSecureURLGenerator <NSObject>
* Generate the secure URL
* This method should use one of the following security method to create a complete NSURL:
* @li Create a signature from the parameters (including API Key and Domain, which are not guaranteed to be in params) and a secret
* @param[in] host the hostname for the URL
* @param[in] uri the URI for the URL
* @param[in] params the URI params for the URL (not including any security params that the security method would use)
* @returns a secure NSURL created from the parameters using one of the supported security methods
- (NSURL *)secureURL:(NSString *)host uri:(NSString *)uri params:(NSDictionary *)params;
07-24-2017 09:37 AM
You will need to create a different environment to manage those calls. You need to build something like a middleware where you will make those calls to it instead of leaving that method in the app.
In our sample apps we leave the method in the app just an example but it is not the best practice.