Basic question during installing the app that you could meet and also provide some solution to fix the installing issues. If these answer could not be, raise net thread on our discuss community: https://github.com/inspireui/support/issues
My Android simulator not run with Expo ?
First make you you can open the Android simulator successful by using Genymotion
https://docs.expo.io/versions/latest/workflow/genymotion
Could not connect to development server
First, make sure your have run "yarn install" or "npm install" to create the node_modules folder
Then, try the press the Restart button from Expo and Ctrl+R (Window) or Command+R (MacOS) to reload the project on simulator. We will able to see the Building Javascript bundle..xxx% at bottom of the simulator.
My Listing Image is not display
- First issue cause by the Wordpress plugin config, please follow the Getting Started document and make sure the Step 3 "Config the Image" is finished
- Second issue cause by the metro library that showing "require cycle: " warning message. Fix by remove the IF block from node_modules/metro/src/lib/polyfills/require.js (https://gyazo.com/df9e8c80e88d51fed30807b0a369e7e1) - Or, select the build with PRODUCTION MODE to resolve the issues)
"Wrong Segments ..." message When Post New Listing
- You need check config the JWT Authentication for WP-API plugin such as check the .htaccess file has this code
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
- P/S: Put it out of block
"Sorry this user is not scope..." message When Post New Listing
- Solution 1: We have only post a new listing when that user has an editor/administrator role, We need change role to that user.
- Solution 2: Please check JWT Authentication for WP-API plugin on your website. Cause is coming from config of this. Refer here (https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/) or https://docs.inspireui.com/listapp/getting-started/#jwt-authentication
"using Visual Composer". Rest-Api does not render shortcodes and show them in app. To solve this problem do following:
Add this code block to your theme's function.php
add_action( 'rest_api_init', function ()
{
register_rest_field(
//If you need, add more taxonomy to array. In my case it's "posts, pages and job listings". All you use VC.
array('post','page','job_listing'),
'content',
array(
'get_callback' => 'compasshb_do_shortcodes',
'update_callback' => null,
'schema' => null,
)
);
});
function compasshb_do_shortcodes( $object, $field_name, $request )
{
WPBMap::addAllMappedShortcodes();
global $post;
$post = get_post ($object['id']);
$output['rendered'] = apply_filters( 'the_content', $post->post_content );
return $output;
}