Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement handleNotification to ensure compatibility with iOS 10 and earlier #31

Merged
merged 4 commits into from
Sep 4, 2018

Conversation

Andrew-Tan
Copy link
Contributor

@Andrew-Tan Andrew-Tan commented Aug 25, 2018

This pull request resolves the issue specified in here: #30

@shankari
Copy link
Contributor

@Andrew-Tan can you update the PR with the testing that you did?

@Andrew-Tan
Copy link
Contributor Author

@shankari

Tested on an iPhone emulator with iOS 9.2
Formerly the browser got stuck after clicking login. After the fix, the app successfully returns back to the main screen with the proper user information.

@shankari
Copy link
Contributor

Cool! I have created a build with the fix and am uploading to TestFlight.
@uwtcat if you can test it before I submit for review, that would ensure that the bug is really fixed.
Can you send me your appleID via email so that I can invite you to TestFlight and then send you a link to test the new native version...

@uwtcat
Copy link

uwtcat commented Aug 27, 2018

@shankari, thank you! I'll send you my developer username in private to avoid spam.

Copy link
Contributor

@shankari shankari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling sometimes feels tedious, but it is actually really important...

// For compatibility with iOS 10 and earlier
NSURL* url = [notification object];
if ([url.scheme isEqualToString:@"emission.auth"]) {
[self.currentAuthorizationFlow resumeAuthorizationFlowWithURL:url];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shankari
Copy link
Contributor

shankari commented Aug 30, 2018

While testing this, found that the update to the ionic deploy plugin (that supports downloading a custom UI), required to fix https://github.com/e-mission/e-mission-phone/issues/443, broke on iOS 10. It still works on iOS11. The observed broken behavior is that ionic detects that there is no update on iOS 10, but that there is an update on iOS 11. So clicking on the update link on iOS 10 doesn't popup the prompt to download the new UI-only update.

Filed an issue against ionic - hopefully they will respond soon.

@shankari
Copy link
Contributor

Just confirmed that old version of the plugin works fine on iOS10.

@shankari
Copy link
Contributor

@uwtcat if ionic doesn't respond soon, or doesn't have a great answer as part of their response, I am tempted to roll back the update to the ionic deploy plugin, since it seems flaky, and focus on only the other fixes for the immediate release. I'll let you know by sometime tomorrow.

@Andrew-Tan
Copy link
Contributor Author

Andrew-Tan commented Sep 1, 2018

Added completion handling logic

@shankari
Copy link
Contributor

shankari commented Sep 2, 2018

@uwtcat @Andrew-Tan has just added one more code fix. I have just uploaded version 1.0.6 that includes that fix. I tried it out in the emulator, and it worked - can you please verify that this version also works on a physical device before I submit it?

Also, @Andrew-Tan, after logging in, I clicked on "Open AccessMap", which tried to redirect to https://emission.accessmap.io/emission?uuid=34a4de78-87e2-4c29-ba3c-2b5a6413420d, but the resulting page is blank.

Given that it is the main button right after logging in, we should probably fix that too before deploying. If you can verify that this is not a native issue, we can submit now and fix the javascript later...

@shankari
Copy link
Contributor

shankari commented Sep 2, 2018

@uwtcat @Andrew-Tan I tested in the emulator, and the accessmap page loads on iOS11 but not on iOS10. Anat, have you tried clicking the button to load the AccessMap page?

@shankari
Copy link
Contributor

shankari commented Sep 2, 2018

Ok, so the website load issue has nothing to do with e-mission. If I launch safari on the 10.2 simulator and try to navigate to https://emission.accessmap.io, I still get a blank screen. On 11.4, the same URL loads the page. @uwtcat you can verify this too.

The error that I see from safari is

[Error] TypeError: Object.values is not a function. (In 'Object.values(n.i(o.a)(r.a))', 'Object.values' is undefined)
	./reducers/defaults.js (map.bundle.js:73:20060)
	t (vendor.bundle.js:1:106)
	./reducers/activities.js (map.bundle.js:73:16401)
	t (vendor.bundle.js:1:106)
	./reducers/index.js (map.bundle.js:73:21014)
	t (vendor.bundle.js:1:106)
	./store/create-store.js (map.bundle.js:74:9026)
	t (vendor.bundle.js:1:106)
	./index.js (map.bundle.js:73:14227)
	t (vendor.bundle.js:1:106)
	webpackJsonp (vendor.bundle.js:1:420)
	Global Code (map.bundle.js:1)

This looks like something that needs to be fixed in the code for accessmap; we don't need to discuss it here. @Andrew-Tan let me know if you want to you want me to open another issue if you want to continue discussing the WSOD error.

@shankari
Copy link
Contributor

shankari commented Sep 2, 2018

Action items:

  1. @uwtcat verify that emission 1.0.6 still looks good
  2. @Andrew-Tan figure out root cause of the WSOD, and confirm that it doesn't require native changes
  3. @shankari after 1) and 2) are verified, submit to app store review

@Andrew-Tan
Copy link
Contributor Author

The Emission AccessMap site is developed by @nbolten, so he should be able to look into this issue.
Nick, can you look at the problem @shankari described in this thread and try fixing it?

The app itself has nothing to do with the website (they are decoupled completely at current stage), so after @uwtcat had verified the change, please feel free to submit to app store review

Thanks you :)

@uwtcat
Copy link

uwtcat commented Sep 2, 2018 via email

@shankari
Copy link
Contributor

shankari commented Sep 2, 2018

@uwtcat ok, so once you verify that 1.0.6 still works properly, I will submit to the app store.

@nbolten
Copy link

nbolten commented Sep 2, 2018

Hey all! I've pushed the polyfills that I fixed in the dev branch, should work fine on slightly older iOS now and be testable.

If this impacts the general release, give me a bit of a heads up, as this endpoint was meant for testing and we need to verify that analytics are working properly.

@uwtcat
Copy link

uwtcat commented Sep 3, 2018 via email

@shankari
Copy link
Contributor

shankari commented Sep 3, 2018

@uwtcat if you can verify that 1.0.6 works well on TestFlight, I can submit to App store today morning

@uwtcat
Copy link

uwtcat commented Sep 3, 2018 via email

@shankari
Copy link
Contributor

shankari commented Sep 3, 2018

@uwtcat can you uninstall the old app and try with reinstalling 1.0.6? I just tried on my test phone (9.2) and it worked fine. "Open AccessMap" worked too.

@uwtcat
Copy link

uwtcat commented Sep 3, 2018 via email

@shankari
Copy link
Contributor

shankari commented Sep 4, 2018

Just submitted. Current review times are 5 days.
http://appreviewtimes.com/

In the meanwhile, android users, and iOS 11+ users can continue testing...

@shankari shankari merged commit 27f24b4 into e-mission:master Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants