iOS: In-app messages cause error

How to address error: "[NSURL getParameters]: unrecognized selector sent to instance"

This problem is caused by a known iOS linker bug, in which a static library category is not being loaded by Xcode, and is remedied by a small change to your BuildSettings.

Go to Build Settings.

In the Linking subsection, look for the Other Linking Flags key.

To Other Linking Flags add the value -force_load and the path to the libXPush.a file,
For example, -force_load $(SRCROOT)/libXPush.a .

This command loads all objects and categories in a static library and will solve the problem.