I have found a solution for Android but not able to get one for iOS.
I logged into my app
Perform some tasks that save data in local storage
Go to Home and uninstall the app
Install App again
All previously stored data reappear
It should remove all data upon uninstallation.
If you are using Cordova, add the following in your config.xml-
For iOS
Inside <platform name="ios">-
<preference name="BackupWebStorage" value="none" />
Default value is cloud. https://cordova.apache.org/docs/en/latest/config_ref/index.html
For Android
Inside <platform name="android">-
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:allowBackup="false" android:fullBackupContent="false" />
</edit-config>
Related
I have a Cordova app (built with react) which renders 3d (.glb) models on my iPhone (using three.js).
It's old, and used Cordova's iOS#5 platform. I updated it to Cordova's newer ios#6 platform, and the .glb files no longer load on the iPhone.
They load fine locally, when run in the browser. but they do not load in the iPhone. If I use the older ios 5, it works fine.
Is there a known reason three.js no longer works in ios6? a plugin that needs to be added? a build setting that must now be added that didn't before?
It's most probably because you were running UIWebView which has been deprecated. Now WKVebView does not allow to load files like UIWebView used to.
You could give a try to this plugin https://github.com/globules-io/cordova-plugin-ios-xhr and then set your preferences to
<preference name="AllowUntrustedCerts" value="true" />
<preference name="InterceptRemoteRequests" value="all" />
<preference name="allowFileAccessFromFileURLs" value="true" />
<preference name="allowUniversalAccessFromFileURLs" value="true" />
Note that this is for iOS 6+
I was trying to add Camera Usage Description for my devextreme cordova mobile project but testing it in ios device only get generic message.
I tried adding this code in my config.xml
<plugin name="cordova-plugin-camera" onload="true" />
<config-file platform="ios" parent="NSCameraUsageDescription" target="*-Info.plist" overwrite="true">
<string>We are using a camera to enable you to upload pictures of documents</string>
</config-file>
<config-file platform="ios" parent="NSPhotoLibraryUsageDescription" target="*-Info.plist" overwrite="true">
<string>We are using your pohoto library to enable you to download and save pictures of documents</string>
</config-file>
I tried the suggestion on this link
Build Custom Application Template
But upon building native package in ios I get error.
Error build iOS package: Value cannot be null. Parameter name: buffer
Can anyone help me on this? Or do you have any suggestions creating Camera Usage Description without creating custom application template for devexpress?
Add this line of code in your config.xml
<plugin name="cordova-plugin-media-capture" source="npm" spec="1.4.1" >
<variable name="CAMERA_USAGE_DESCRIPTION" value="We are using a camera to enable you to upload pictures of documents" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="We are using your pohoto library to enable you to download and save pictures of documents" />
</plugin>
Add this in your iOS project .plist under "Privacy - Camera Usage Description"
Can anyone explain this odd padding that exists outside the entire webview?
Our app has been denied by Apple because of this issue.
I have Googled it for days with no success.
Try setting this in your config.xml:
<platform name="ios">
<preference name="target-device" value="universal" />
</platform>
Universal is the default value, so make sure you are not setting target-device to something else ;)
I'm using Phonegap Build to compile a game I made using Construct 2.
Now when I install the game on my iphone a geolocation permission alerts pops up, although my game doesn't use geolocation.
I think phonegap somehow inserts geolocation code into the .ipa file
I thought this wasn't gonna be a problem, but I submitted the game to the appstore and the reviewer is asking me what features of my game use geolocation. My game status in itunes connect right now is 'metadata rejected' because of this.
Is there a way to remove this geolocation thing?
I already googled the problem but I can't find a solution.
Here's my config.xml file:
> <preference name="permissions" value="none"/> <preference
> name="android-targetSdkVersion" value="21" /> <feature
> name="http://api.phonegap.com/1.0/network"/> <gap:config-file
> platform="ios" parent="UIStatusBarHidden"><true/></gap:config-file>
> <gap:config-file platform="ios"
> parent="UIViewControllerBasedStatusBarAppearance"><false/></gap:config-file> </widget>
#gleegum, when you install the plugin via config.xml, it will initiate the Geolocation permission sequence. Did you perhaps accidentally insert the geolocation plugin into your config.xml? -Jesse
Hey guys i'm using phonegap and jquery mobile to build an app for an android phone. Is there any possibility to disable the screen rotation of the app. I am very new to jquery mobile. Sorry if I am asking inappropriate question.
Yes it's possible but you must set it in cordova/phonegap parameter not in your app/www
in your app folder there is config.xml
<preference name="orientation" value="default" />
<!-- all: default means both landscape and portrait are enabled -->
Do you want to do it only using Jquery? Can you think of using Android's Manifest file to fix an orientation for the activity?
Change the following attributes in manifest file:
android:screenOrientation="portrait" or android:screenOrientation="landscape" in the AndroidManifest.xml:
<activity android:name=".MyActivity"a
android:label="#string/app_name"
android:screenOrientation="portrait">
Include the following code in your 'config.xml'
<preference name="Orientation" value="landscape" />
or
<preference name="Orientation" value="portrait" />