1

I'm developing this app for iOS which will make use of openDirect with different urls.

"Also, please note that setting an OpenDirect Delegate will negate the automatic webpage loading feature added to MobilePush recently. This is deliberately to not stomp on your URLs and deep links".(http://salesforce-marketingcloud.github.io/JB4A-SDK-iOS/appledoc/Protocols/ExactTargetOpenDirectDelegate.html)

as far as I know I need to set the delegate to avoid ExactTarget opening the default land page which is fine if the app is running on the background, but if the app is killed and receives a push notification this no longer works correctly, I have 2 pages open now one from the delegate and one from the default landing page. On this second case I set the delegate inside "didFinishLaunchingWithOptions".

Any idea in how to get this fixed ?

Cheers

  • FWIW, I'm also having this problem. I want to use the OpenDirectDelegate, and that works fine when the app is running, but if it is not running, it will go to the webview first. I don't want to see the webview at all. – zerodiff Sep 19 '16 at 23:01
  • Hi @zerodiff, I will probably use category to intercept the webview getting presented and try to stop in there(if I cant get any other response with a better option), but I will do toward the end of the week. I can post in here my results then if you still facing the same issue =) – drigonlac Sep 20 '16 at 2:28
  • I'm doing a little testing this week, too. I'll post if I have any progress. – zerodiff Sep 20 '16 at 13:09
  • Did you get this resolved? What SDK version are you trying to implement using this feature and did you happen to follow the template used for ExactTargetCloudPageWithAlertDelegate found here? github.exacttarget.com/Mobile/LearningAppiOS/tree/develop/… ExactTargetCloudPageWithAlertDelegate and ExactTargetOpenDirectDelegate are of course used for different purposes, but they are implemented almost identically. Just let me know if I can help. Thanks! – Tom Brooks Sep 26 '16 at 17:04
  • Thanks but zerodiff answer fixes the issue. Cheers – drigonlac Sep 26 '16 at 22:14
1

I'm not sure this is your exact issue, but mine is that I want to skip the webview that the SDK automatically presents on app startup altogether. At least, it seems similar to what you're trying to do.

The way I fixed it is to add this call before all push notification handling ETPush calls: [[ETPush pushManager] setOpenDirectDelegate:self]; [[ETPush pushManager] handleNotification:userInfo forApplicationState:applicationState];

(Where self is whatever your implementation of the ExactTargetOpenDirectDelegate protocol).

My theory is that it is an order of operations issue -- when the app starts, the notification callback gets called before didFinishLuanchingWithOptions on app startup, and the delegate is not set yet, resulting in the default behavior that shows the webview.

In any case, that skips the webview on app startup in my testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.