Closed jazz-mobility closed 8 years ago
Hi @jazz-mobility,
Instructions for building custom view controllers and otherwise customizing in-app message display can be found on our technical documentation. For both iOS and Android, Appboy offers multiple levels of in-app message customization, including providing Appboy with your own custom view controllers.
iOS Documentation - Advanced In-App Message Customization Options
Android Documentation - In-App Message Customization
Specifically, here are the sections on providing custom view controllers for iOS and Android. Additional methods of in-app message customization are also described in detail in our technical documentation.
Regarding your other question, Appboy's slide-up, modal and full-screen in-app messages are native components. In addition, we also provide the ability to create and send custom HTML in-app messages through our dashboard.
Please let us know if you have any other questions.
Best, Tiff
Hello Tiff,
Thanks for quick reply, as I can see from the documentation, I still need to ABKInAppMessageSlideup, I want to replace it completely. I have few other questions you can help me with.
How can i detect in beforeInAppMessageDisplayed delegate what kind of IAM it is, e.g. slidup, modal, Fullscreen. How can I get the complete data of a view displayed, I can see the header and buttons are private properties of the ABKInAppMessage class. *How can I add my own close button, change corner radius, position modal alert ?
Basically I want the full control of UI customization of in-app messages.
Hi @jazz-mobility,
ABKInAppMessage
object passed into beforeInAppMessageDisplayed:withKeyboardIsUp:
by [inAppMessage class]
. ABKInAppMessageImmersive
, which is the superclass of ABKInAppMessageModal
and ABKInAppMessageFull
.inAppMessage
object from beforeInAppMessageDisplayed:withKeyboardIsUp:
. Be sure to return ABKDiscardInAppMessage
at the end of the method, so Appboy won't display the default in-app message. Please keep the in-app message object around and don't forget to call the analytics related methods like logInAppMessageImpression
, logInAppMessageClicked
and logInAppMessageClickedWithButtonID:
.Please let us know if this satisfies your use-case, and if you have any other questions.
Best, Tiff
Thanks, This is helpful. Other problem I am facing is on default slide up messages, when i am changing the rotation then it is updating the position after the orientation change, which looks very ugly. I am using bottom position for slide up messages.
Hi @jazz-mobility,
If you want to display in-app messages only in portrait, you can set the supportedOrientationMasks
and supportedOrientations
properties in class ABKInAppMessageController. The code would be like:
[Appboy sharedInstance]. inAppMessageController.supportedOrientationMasks = UIInterfaceOrientationMaskPortrait;
Thanks, Wenzhi
I want to support both orientations, but problem is message view is changing the position after the orientation change, which looks very weird. I am attaching the screenshot.
This is while changing the orientation from landscape to portrait.
Thanks for reporting the issue! This looks weird, and we are investigating it right now. Could you provide the following information:
Thanks, Wenzhi
-> What version of Appboy SDK are you using?
Hey @jazz-mobility,
Thanks for the information!
It seems that the default in-app message isn't working correctly in your app, but I'm having trouble reproducing that behavior. Given that the related code has been unchanged for some time, that the functionality is failing drastically and we’ve had no other reports of this issue, I suspect something unique in your application is triggering this.
As such, could you send your project or a sample project which reproduces the issue to wenzhi@appboy.com?
Thanks, Wenzhi
Hello @Wenzhi,
I think the reason for this issue could be breaking constraints on slide up message.
Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( NSLayoutConstraint:0x1487392b0 '_UITemporaryLayoutHeight' V:[ABKInAppMessageView:0x14aeb3290(70)] NSLayoutConstraint:0x14aeb5470 'UIView-Encapsulated-Layout-Height' V:[ABKInAppMessageView:0x14aeb3290(77.5)] )
Will attempt to recover by breaking constraint NSLayoutConstraint:0x14aeb5470 'UIView-Encapsulated-Layout-Height' V:[ABKInAppMessageView:0x14aeb3290(77.5)]
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Also, How can I update the font of Slide up message ?
Hey @jazz-mobility,
To customize font of Slideup message, you can use NUI framework and follow this documentation.
For the position issue, it might have to do with the constraint conflict you see, although we don't rely on Auto Layout for the slideups’ position. We actually calculate the position and set the frame directly. I tried to create Slideups with your sample message and icon across different devices on both iPhone and iPad, and I still cannot reproduce the constraint conflict and the issue.
Would it be possible for you to share that sample app with us? Also, if you could reach out to me at wenzhi@appboy.com we'd like to inquire more about your setup/environment and we can avoid publishing any sensitive info if we chat over email.
Thanks Wenzhi
Hi @Wenzhi,
Just figured out that we are using our own custom window. Can you please provide a solution when app is using custom windows.
Hey @jazz-mobility,
If you are already using custom windows, I'd recommend implementing and displaying the in-app message yourself.
You can implement the in-app message delegate method beforeInAppMessageDisplayed:withKeyboardIsUp:
. The method will be called when there is an in-app message ready to about to display. Grab the in-app message data in the method and return ABKDiscardInAppMessage
, and then you can display your custom in-app message view with the in-app message data.
As @tiffanylu mentioned above, please keep the in-app message object around and don't forget to call the analytics related methods like logInAppMessageImpression
, logInAppMessageClicked
and logInAppMessageClickedWithButtonID:
.
Please let me know if you have any questions or issues about handling customized in-app messages.
Thanks, Wenzhi
Hey @jazz-mobility,
Does my previous reply answer your question? Do you have any other issues or questions?
If you are fine with the answers, please let us know so we can close the issue. :)
Thanks, Wenzhi
Thanks @Wenzhi
Yes i understood how to provide the custom UI to App boy. We ar enot using this approach as of now.
I tried the custom HTML solution and from last couple of days it stopped showing the image which I have in zip folder. It was working fine initially, but once i updated the segment for less users, HTML message is not showing the image.
<a href="http://google.com"><img src="home_icon.png" width="44" height="44" id="homeImage"></a>
Hi @jazz-mobility
I've sent you an email so we can assist further
Many thanks
Georgia
Hello, I want to totally customize the appearance of In-App messages in iOS as well as Android, is there any way where I can provide my custom view to controller or any other way where i can change each control present in the slide-up, modal and full screen in app messages ?
Another very important question is, are those predefined messages are native components or it is HTML ? A quick answer will be helpful as it is very crucial for over marketing campaigns.