shyambhat/InstagramKit — pull request #5 by ptwohig (2013-12-02 20:27:07+00:00)
Title: Externalize Configuration

Currently, it seems that it is necessary to modify the header "InstagramEngine.h". This solution isn't ideal as it requires you to modify pods managed files, which could get over-written accidentally. This change allows you to specify the credentials in an externalized plist file, or in the application's info plist file.

The new plist configuration keys are as follows:
* InstagramKitAppClientId - the client ID
* InstagramKitAppRedirectUrl - the app redirect URL
* InstagramKitBaseUrl - the base URL for the API (if left blank this uses a default value)
* InstagramKitInstagramKitAuthorizationUrl - the base URL for OAuth via Instagram (if left blank this uses a default value)

You can specify these keys in either the Application's info.plist file, or you can use a separate configuration file "Instagram.plist" and just leave it in the bundle. It will detect which is used when the InstagramEngine is initialized.

I tested this with the demo application as well as changed the demo application's code to use the changes. I did my best to avoid breaking existing code and favored using __deprecated where necessary.