DoSomethingArchive / LetsDoThis-iOS

:iphone: iOS source code for DoSomething: Take Action on the News
http://app.dosomething.org
MIT License
2 stars 0 forks source link

Adds Campaign Magic Link support #1048

Closed aaronschachter closed 8 years ago

aaronschachter commented 8 years ago

What's this PR do?

Run this branch on Debug. Load Animals > Space Jam (campaign id 1631) and verify:

Verify Animals > Bumble Bands has a Magic Link rendered per https://github.com/DoSomething/LetsDoThis-iOS/issues/1035#issuecomment-241581164

Can test the toggle with a production campaign by setting and unsetting its Magic Link Property in the Phoenix admin. To verify changes, you'll need to force quit the iOS app and reload the campaign.

Screenshot

simulator screen shot aug 22 2016 3 47 21 pm

Relevant tickets

Fixes #1035

cc @lkpttn @NearChaos

aaronschachter commented 8 years ago

There's some odd (or unknown to me) caching behavior going on the production Phoenix API that I didn't experience on staging.

About 30 minutes ago I set a magic_link_copy value for Bumble Bands on production to unblock testing, but I can only get a value to appear within the AFNetworking GET response by adding setting the cache=false query parameter (https://github.com/DoSomething/LetsDoThis-iOS/commit/fc84323df139e31af294a439f59e2ba07b85aa3f). I tried clearing the production Drupal cache but it didn't update it within iOS. The strange thing is that when i load the URL in browser, I do see the updated magic_link_copy... its the iOS simulator that's not seeing any updates.

Merging for now (without the cache=false hotfix) and keeping an eye on it, suspecting / hoping it's just the Varnish cache... but seems odd if it looks fine on web:

Chrome:

screen shot 2016-08-22 at 4 35 47 pm

Xcode:

screen shot 2016-08-22 at 4 36 03 pm

cc @weerd @katiecrane

aaronschachter commented 8 years ago

I've tested on Dog Days of winter also, but didn't load the Campaign Detail until I first set the copy in Phoenix admin and cleared cache. It does show up.. but still not seeing it for Bumble Bands.

aaronschachter commented 8 years ago

Seeing the link appear for Bumble Bands now in latest test build, removed as an item in #1049.