I tried using some Cordova plugins that do not work for me. if anyone has experience with this help me to sort out this problem.
cordova plugin add cordova-plugin-sign-in-with-apple
this plugin does not work for me.
1 post - 1 participant
I tried using some Cordova plugins that do not work for me. if anyone has experience with this help me to sort out this problem.
cordova plugin add cordova-plugin-sign-in-with-apple
this plugin does not work for me.
1 post - 1 participant
Hi everyone,
I am trying to make a request to show a WebView using InAppBrowser plugin, but I need to send some headers to get the content, and InAppBrowser does not offer me this option.
I don’t know if there is any way to do it using this plugin, or I need to find another one than can do it.
Thank you for your time in advance.
Hope to hearing from you soon.
1 post - 1 participant
1 post - 1 participant
I get this error occasionally.
Access to XMLHttpRequest at ‘https://myUrl/cart?param=1’ from origin ‘http://localhost’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, http://localhost’, but only one is allowed
How can i solve the problem?
1 post - 1 participant
Hello,
I try different solutions, ion-button, button ion-button, button href, … but nothing work.
In Page html (ion-content)
<ion-button (click)="openExternalPage()">openExternal</ion-button>
<ion-button (click)="logEvent($event)">Log</ion-button>
<ion-button (click)="openExternalPage('google.com')"><ion-label>openExternal Label</ion-label></ion-button>
And in class HomePage
openExternalPage(url:string): void {
console.log('go => ' + url);
}
logEvent(event) {
alert('test');
console.log(event);
}
Thank you for help
1 post - 1 participant
Hi Team,
I have migrate my IOS ionic v1 app to IOS 13 and xcode 11.5. when I install the app and try to login first time then I am able to login successfully. But when I kill the app and try to open the app then it wont allow me to auto login.
In the config.xml have added these settings
<preference name="WKSuspendInBackground" value="false" />
<preference name="iosScheme" value="httpsionic" />
<allow-navigation href="httpsionic://*" />
<allow-navigation href="http://localhost:8100/*" />
when i try to open the app after killing the app from task manager. it wont allow me to login. Its giving me an error
Request header field Authorization is not allowed by Access-Control-Allow-Headers.
First Time run work as expected :-
after killing the app and open it again :-
this is the console log
from last 2-3 days i am stuck here.
Please let me know what I am missing something here.
this is my ionic info
Ionic:
Ionic CLI : 5.3.0
Ionic Framework : ionic1 1.2.4
@ionic/v1-toolkit : 2.0.11
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 18 other plugins)
Utility:
cordova-res : not installed
native-run : 0.2.8 (update available: 1.0.0)
System:
ios-deploy : 1.9.0
ios-sim : 8.0.2
NodeJS : v10.16.3 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
1 post - 1 participant
After upgrading to Ionic 5 cannot resize the slider after passing the breakpoints property into the options. Were there any breaking changes in terms of the ion-slides component options?
slideOptsFour = {
autoplay: {
disableOnInteraction: false,
},
loop: true,
slidesPerView: 3,
breakpoints: {
// not working
500: {
slidesPerView: 2,
},
},
};
1 post - 1 participant
Hi All - I’m relatively new to Ionic so thanks in advance for helping me out.
My question: is it possible to select the ionic-css for a media query and update it’s value via the domController? In particular, I’m looking for a query that would allow me to update CSS properties present in a @media (prefers-color-theme: dark).
Background on the question:
I’ve created a theme-switcher-service for my Ionic application. This is how it works: every user is associated with an organization, and each organization has a primary / secondary color. The primary / secondary colors drive the variables.scss file with all of the --ion-color-primary, --ion-color-secondary, etc.
The way I accomplish this is as follows:
This works perfectly in terms of overriding default colors in the ::root of the variables.scss file. However, I have been having a lot of trouble overriding the default colors when the app is in dark mode.
In particular, for the following media query: (prefers-color-scheme: dark) - I can’t seem to figure out a good way to overwrite the default colors in this media query with the custom colors. If it’s possible, please let me know if there is a way to create a themeVariable object that can target the CSS of media queries.
If you need any other information from me please let me know. Thank you in advance for your help!
1 post - 1 participant
Hi there !
I’m using ‘Geolocation’ (plugin) from Capacitor on my Ionic project.
I use watchPosition()
for tracking the user progression.
We have some isssues, because a lot of users (of the application) are saying that the geolocation isnt working.
For some reasons, it seems that after a while, when my app is put in background and then reopened, the app has no internet connection nor GPS. If I go on the Google Map App for example, I have an internet connection and GPS is working. It looks like my app is in “plane mode” after a while, but don’t understand why… Someone already have a similar issue?
These bugs are on Android most of the case
In the majority of cases, people restart the app and the bug is fixed.
Thank you!
1 post - 1 participant
not only for social sharing plugin, there’s other things like select box “Done” language.
how can I change those language translated to my language?
I tried to change it language to Korean on Xcode but it won’t change any.
1 post - 1 participant
I have tried all solutions mentioned before on this topic on the forum. However, I am still stuck here. Would someone please help me with this?
[react-scripts] i 「wds」: Project is running at 0000
[react-scripts] i 「wds」: webpack output is served from
[react-scripts] i 「wds」: Content not from webpack is served from C:\Users\afzan\myDemo\public
[react-scripts] i 「wds」: 404s will fallback to /
[react-scripts] Starting the development server…
[react-scripts]
[react-scripts] Files successfully emitted, waiting for typecheck results…
After this line, the app does not display in a browser as it should.
Some details of the environment are as below-
OS: Windows 64 bit
Ionic version: 6.10.1
Cordova version: 9.0.0
Node version: 6.14.5
2 posts - 2 participants
Hello!
I’ve converted my app to a PWA and i’ve noticed that, when I change the route, the url changes too:
for example if my app runs on localhost:8100 when i click “home” the url becomes localhost:81/home
I’ve fixed this using this.router.navigate([’/home’], {skipLocationChange: true}); and my url bar now only shows localhost:8100
The problem is with the Tabs: if i click on the tabs, even if I use skipLocationChange, the url changes too, as you can see from the image below.
Image may be NSFW.
Clik here to view.
There is a way from preventing the url bar to changes or to show the full path when I click on the tabs?
My goal is to keep the url bar always with “localhost:8100” even if the path changes.
thank you!
1 post - 1 participant
What plugin to use for Google iot core mqtt integration ? Struggling on it from days , any comments would be extremely helpful.
1 post - 1 participant
Is there a way to embed a date picker with ionic? I’ve been reading the docs but I can’t find anything about this.
Example image:
1 post - 1 participant
I want to place a button in right side
<ion-header style="background-color: #44739d;">
<ion-toolbar color="#44739d">
<ion-title>Header</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-label>Operating System</ion-label>
<ion-select ok-text="Okay" cancel-text="Nah">
<ion-select-option value="dos">DOS</ion-select-option>
<ion-select-option value="lunix">Linux</ion-select-option>
<ion-select-option value="mac7">Mac OS 7</ion-select-option>
<ion-select-option value="mac8">Mac OS 8</ion-select-option>
<ion-select-option value="win3.1">Windows 3.1</ion-select-option>
<ion-select-option value="win95">Windows 95</ion-select-option>
<ion-select-option value="win98">Windows 98</ion-select-option>
</ion-select>
</ion-item>
</ion-list>
<ion-list>
<ion-item>
<ion-label>Operating System</ion-label>
<ion-select ok-text="Okay" cancel-text="Nah">
<ion-select-option value="dos">DOS</ion-select-option>
<ion-select-option value="lunix">Linux</ion-select-option>
<ion-select-option value="mac7">Mac OS 7</ion-select-option>
<ion-select-option value="mac8">Mac OS 8</ion-select-option>
<ion-select-option value="win3.1">Windows 3.1</ion-select-option>
<ion-select-option value="win95">Windows 95</ion-select-option>
<ion-select-option value="win98">Windows 98</ion-select-option>
</ion-select>
</ion-item>
</ion-list>
<ion-button>Next</ion-button>
</ion-content>
<ion-footer style="background-color: #44739d;">
<ion-toolbar color="#44739d">
<ion-title>Footer</ion-title>
</ion-toolbar>
</ion-footer>
Questions :
Is there any ionic class? that I can call and put the button right side without writing any CSS by myself
[ a special note : if u want to talk about 12 columns system , then answer me : How can i put the button to the end of 5th column? ]
Is there any way to use CSS utility in a way that : the button will be on right side no matter what the screen size is?
[sometimes, in small screen, my button is just gone from screen - that means too much right side, how to avoid that : I want to preserve responsiveness ]
1 post - 1 participant
Hi guys,
Is it possible to apply ‘border-top-right-radius’ to ion-content inside ion-menu?
I have tried to change ‘border-top-right-radius’ to ion-content inside ion-menu but it not worked.
there are class under shadow-root called ‘menu-inner’. If I apply ‘border-top-right-radius’ inside this class, it works as i want. But problem is I am unable to change this from project.
Please see the picture attached for details
Please help
1 post - 1 participant
Hello developpers, i am using ionic 4 with spring boot web service , the problem is after installation application in my phone the web service is not run ?
i use in Controller.java
@CrossOrigin(origins = "*")
@RestController
public class CarController {
@Autowired
CarRepository carRepository;
@GetMapping(path = "/cars")
public ResponseEntity<List<Car>> retriveCars() {
try {
List<Car> cars = new ArrayList<>();
carRepository.findAll().forEach(cars::add);
if (cars.isEmpty()) {
return new ResponseEntity<>(null, HttpStatus.NO_CONTENT);
}
return new ResponseEntity<>(cars, HttpStatus.OK);
}catch(Exception e) {
return new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@PostMapping(path = "/car")
public ResponseEntity<Car> saveCar (@RequestBody Car car) {
try {
Car _car= carRepository.save(new Car(UUID.randomUUID(), car.getMake(), car.getModel()));
return new ResponseEntity<>(_car, HttpStatus.CREATED);
}
catch(Exception e) {
System.out.println(e);
return new ResponseEntity<>(null, HttpStatus.EXPECTATION_FAILED);
}
}
and in api.service.ts
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { Car } from './car';
@Injectable({
providedIn: 'root'
})
export class ApiService {
constructor(private http: HttpClient) { }
baseUrl='http://localhost:8081';
retrieveCars(){
return this.http.get<Car[]>(this.baseUrl+ '/cars');
}
saveCar(car: Car) {
return this.http.post<Car>(this.baseUrl+'/car', car);
}
My question is how can i communicate in ionic and springboot? i need help please
2 posts - 2 participants
I am getting the following error when requesting the user permission:
{
"error": "requestPermission",
"message": "Unknown error."
}
Here’s a code snippet for checking and requesting permission:
let PERMISSIONS_NEEDED = [
this.androidPermissions.PERMISSION.CAMERA,
this.androidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE
];
this.androidPermissions.checkPermission(PERMISSIONS_NEEDED[0]).then((result) => {
// If no permission, request permission.
if (!result.hasPermission || result.hasPermission == false || result.hasPermission == "false") {
alert("REQUEST-PERMISSION");
this.androidPermissions.requestPermissions(PERMISSIONS_NEEDED).then((_) => {
alert("PERMISSION-GIVEN");
})
.catch(err => {
alert("REQUEST-PERMISSION-ERROR: " + JSON.stringify(err)); // <<<<<<<<<<<<<<<< error
});
}
// If permission is already granted, proceed normally.
else {
alert("ALREADY-HAVE-PERMISSION");
}
}
Additional Information:
Android Permissions
plugin has been installed as instructed on the Ionic Official Documentation
1 post - 1 participant
I have a strange behavior that, maybe, could depend on the version of Ionic that I installed (6.10.1).
Tabbed browsing works perfectly but, unlike the video, when I click on “offers” rather than “discover” the content of the page changes (Discover page, Offers page) but the header does not. I have come to the conclusion that this mechanism is desired. What do you think about it?
<ion-header>
<ion-toolbar>
<ion-title>Places</ion-title>
</ion-toolbar>
</ion-header>
<!-- <ion-content> -->
<ion-tabs>
<ion-tab-bar slot="bottom">
<ion-tab-button tab="discover">
<ion-label>Discover</ion-label>
<ion-icon name="search"></ion-icon>
</ion-tab-button>
<ion-tab-button tab="offers">
<ion-label>Offers</ion-label>
<ion-icon name="card"></ion-icon>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
<!-- </ion-content> -->
Thanks a lot for everything.
1 post - 1 participant