Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70612 articles
Browse latest View live

Ionic 6 android 7 support

$
0
0

I am having issue in installing ionic capacitor app apk in a sunmi device running android version 7. Is the ionic latest version compatible with sunmi device android version 7? Is there any configuration required to run the latest ionic capacitor app in this device? You can see the attached screenshot.

1 post - 1 participant

Read full topic


XCode Error on opening

$
0
0

Hi there,

I have a problem with opening the project in Xcode.

We code in VSC on windows machine.
The building on windows works without any error.

Commands i tried:

ionic cordova prepare ios --prod
Ionic cordova build ios --prod

Later i copy the plattform/ios folder to the mac.

Opening the xcworkspace or xcodeproj gives me an generic error

“The project is damaged and cannot be opened due to a parse error.
Examine the project file for invalid edits or unresolved source control conflicts.”

Ionic info //windows machine

Ionic:
   Ionic CLI          : 5.4.16
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

Cordova:
   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.4.1, (and 18 other plugins)

Utility:
   cordova-res                          : not installed
   native-run (update available: 1.5.0) : 1.3.0

System:
   NodeJS : v10.14.2 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Has anyone an hint how to get more details of the error?

Thank you for your help.

1 post - 1 participant

Read full topic

Automation Build Destination to Slack Webhook URL Issues

$
0
0

Hello,

We configured webhooks for Web build to POST a message on successful completion of the build.
Build success message pops up in the Slack channel, but the Preview URL is missing. Is this the expected behavior? As per Webhook documentation, the POST payload should contain the URL to the current successfully build preview. Our subscription is the BASIC plan.

Web Automation Webhook

Appreciate it if anyone of you has encountered this issue and let us know how it is resolved.

1 post - 1 participant

Read full topic

What's the difference between javascript libraries and native ones

$
0
0

Please correct me if I’m wrong here but I’m a little confused and unsure as to why native libraries for things like firebase authentication exist for capacitor? I’m under the knowledge that it is almost entirely a browser in the backend and by this logic should be able to run the normal firebase js SDK. Is this not the case or do people simply prefer the performance and integration of a truly native sign in method?

1 post - 1 participant

Read full topic

Angular PWA tab router limitation? android back button can not go back previous page?

$
0
0

Hi

We are developing a PWA with Ioinc 5 + Angular + capacitor, and there is a page with 3 tabs. the current design allows each tab url to be share and reload without any issue.

However, when I open the pwa homepage, then click to open the tab page, and change tab1 to tab2 to tab3, the android back button (at the bottom in all android devices) can only move back to tab 1 from tab3, can not move back to homepage.

Is this a limitation of Angular tab routing? any way I can fix this?

thanks

1 post - 1 participant

Read full topic

Ion-list auto scrolls to top when updated

$
0
0

I have an ion-list with an *ngFor. Previously, if I would scroll down the list and then reload the scope array bound to the *ngFor, it would populate with the new data, but the scroll position would not change.
Since upgrading to ionic 6 when the array is reloaded, the ion-list auto-scrolls to the top.

Any help would be appreciated.

using:

Ionic:

Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.4
@angular-devkit/build-angular : 13.2.5
@angular-devkit/schematics : 13.0.4
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3

Capacitor:

Capacitor CLI : 3.4.0
@capacitor/android : not installed
@capacitor/core : 3.4.0
@capacitor/ios : 3.4.0

Utility:

cordova-res : 0.15.4
native-run : 1.5.0

System:

NodeJS : v16.13.2 (/usr/local/bin/node)
npm : 8.1.2
OS : macOS Monterey

1 post - 1 participant

Read full topic

IOS with VoiceOver does not focus on Canvas and unable to draw on canvas while VoiceOver is on

$
0
0

Hi,
I’m using Angular2-SignaturePad in ionic app. It works fine with IOS but, as soon as VoiceOver is enabled then the signature pad stops getting focused and the user is unable to draw on it as well. On Android, it works fine while androids talkback is on.

1 post - 1 participant

Read full topic

Capacitor plugin stop responding after exception

$
0
0

I’m using ionic and capacitor v2.5 for creating a plugin

I’m using the following code for catching unhandled exception in the capacitor plugin

public void load() {
    super.load();

    try {
        Thread
                .setDefaultUncaughtExceptionHandler(
                        new Thread.UncaughtExceptionHandler() {
                            @Override
                            public void uncaughtException(Thread thread, Throwable e) {
                                PluginCall call = getSavedCall();
                                call.error("called failed:"+e.getMessage());
                                freeSavedCall();
                            }
                        });
    } catch (SecurityException e) {
        Log.e("Tag", "Error");
    }
}

my problem is that whenever there is an unhandled exception, the plugin stop to respond to calls from the ionic app.

The code operates as “expected” in a sense that gets the call from the method that throwed the exception and the call.error(..); is executed.

I can replicate that with the following code

public void foo(PluginCall call) {
    saveCall(call);
    throw new exception();
}

Any thoughts on why the plugin stops to respond after that?

1 post - 1 participant

Read full topic


Unable to integrate pdfkit for client-side PDF rendering. How to configure rollup?

$
0
0

Hi, I tried for two full days to get things running, but I cannot get my stencil app successfully compiled when trying to use pdfkit and blob-stream for pdf generation.

I set up a kind of minimal example for describing the problem: https://github.com/dSeidel/pdfkit-minimal.

Currently, I can use pdfkit on the server-side, i.e., in my project I made some test cases for manually rendering and storing pdfs on the server. Everything is fine, but as soon as I add some button to my app that should trigger rendering on the client-side, the app does not compile (that’s what the minimal example should make clear). And then the I can only get from one problem to the next.The readme.md and the commit history document the - in my opinion - most promising iteration on build trys.

I’d be glad if someone would have a solution for me. I also tried to not package pdfkit and blob-stream and serve it standalone via the assets folder, but in this case I struggle to use it in my components. If compilation is not possible at all, maybe someone could hint me on how to succeed this way.

Best, Daniel.

1 post - 1 participant

Read full topic

Keep App Android studio

$
0
0

App build susscessful, but keeps stopping (App info , close app)
######################################

logs
W/rice.onlinesho: Accessing hidden method Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;Ljava/lang/String;II)Landroid/graphics/Typeface; (light greylist, reflection)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.pt.patrice.onlineshop, PID: 15717
java.lang.ExceptionInInitializerError
at com.pt.patrice.onlineshop.ArticleRepository.updateData(ArticleRepository.kt:23)
at com.pt.patrice.onlineshop.MainActivity.onCreate(MainActivity.kt:16)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: com.google.firebase.database.DatabaseException: Failed to get FirebaseDatabase instance: Specify DatabaseURL within FirebaseApp or from your getInstance() call.
at com.google.firebase.database.FirebaseDatabase.getInstance(com.google.firebase:firebase-database@@19.2.1:97)
at com.google.firebase.database.FirebaseDatabase.getInstance(com.google.firebase:firebase-database@@19.2.1:57)
at com.pt.patrice.onlineshop.ArticleRepository$Singleton.(ArticleRepository.kt:13)
at com.pt.patrice.onlineshop.ArticleRepository.updateData(ArticleRepository.kt:23)
at com.pt.patrice.onlineshop.MainActivity.onCreate(MainActivity.kt:16)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

##################### Repository##############
package com.pt.patrice.onlineshop

import com.google.firebase.database.*
import com.pt.patrice.onlineshop.ArticleRepository.Singleton.articleList
import com.pt.patrice.onlineshop.ArticleRepository.Singleton.databaseRef
import com.pt.patrice.onlineshop.fragments.ArticleModel
import javax.security.auth.callback.Callback

class ArticleRepository {

object Singleton {
    //se connecter a la reference "article"
    val databaseRef = FirebaseDatabase.getInstance().getReference("articles")

    // creer une liste qui va contenir nos articles

    val articleList = arrayListOf<ArticleModel>()
}


fun updateData(callback:()->Unit) {
    // absorber les donnees depuis la databaseRef  -> liste d' articles

    databaseRef.addValueEventListener(object : ValueEventListener {
        override fun onDataChange(snapshot: DataSnapshot) {
            //retirer les anciennes

            articleList.clear()
            //recolter la liste
            for (ds in snapshot.children) {
                val article = ds.getValue(ArticleModel::class.java)
                // verifier que l'article n'est pas null
                if (article != null) {
                    // ajouter un article á notrd liste
                    articleList.add(article)
                }
            }
            //actionner le callback
             callback()
        }

        override fun onCancelled(snapshot: DatabaseError) {
            TODO("Not yet implemented")
        }


    })

}

}
#############Main Actifity###########

package com.pt.patrice.onlineshop

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.pt.patrice.onlineshop.fragments.HomeFragment

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
//Charger notre plante repository
val repo = ArticleRepository()

    //mettre a jour laliste des articles

   repo.updateData {
       //injecter le fragment dans notre boite (fragment_container)
       val transaction=supportFragmentManager.beginTransaction()
       transaction.replace(R.id.fragment_container,HomeFragment(this))
       transaction.addToBackStack(null)
       transaction.commit()
   }


}

}

image

1 post - 1 participant

Read full topic

Use Argon2 in ionic 6

$
0
0

Hi everybody,

I search an solution to hash my password with argon2 before send in my app.

Thanks

1 post - 1 participant

Read full topic

Capacitor camera: reducing image size before uploading

$
0
0

Hi there,

I am getting images too large in size despite having adjusted quality, width and height

const image = await Camera.getPhoto({
  quality: 20,
  width : 200,
  height : 200,
  allowEditing: false,
  source: CameraSource.Camera,
  resultType: CameraResultType.Base64
  });

After that I take the base64 and upload it to the server.

However I am getting images in the 2-5MB range of size (Android). Is there any way of reducing/compressing the size further?

Already checked [this]() and other similar postings but they seem to adjust the size by reducing the quality param and the width and height (which are already low in my case)

1 post - 1 participant

Read full topic

How does Live Update works in consecutive binary (in)compatible deployments?

$
0
0

According to the article What Are “Binary Compatible Changes”?, the Live Update feature only works on binary compatible changes which makes sense. If we, for example, install and implement a new plugin we want the native changes + web changes to be deployed/available at the same time.

Now how does Live Update works in consecutive deployments of binary compatible changes and not binary compatible changes?

For example, If I deploy a not binary compatible change and then deploy a binary compatible change (web-only change), will the second deployment be blocked from using Live Update since a native app takes time to be approved in app stores?

Thanks in advance!

1 post - 1 participant

Read full topic

ReactFire v4 with Ionic Framework

How to open the "Photo Library" on ios

$
0
0

I am using ionic/angular to develop a web application. In my app, I have a feature where the user can upload an image from their device. When the user clicks on the

<input #file id=“file-input” type=“file” (change)=“onFileSelected($event)” />
element, on ios the “photo library, take photo and browse” options pop up. However, I only want photo library, infact it would be nice if it just went straight into the users photo library. Is this possible? I tried adding accept=".jpg" but this does not work on ios.

1 post - 1 participant

Read full topic


Camera crashes app on Android11

$
0
0

Hello!
My app crashes when user takes a picture. It seems that OS kills app when taking picture, but it happens only with camera in Android 11. Picking images from gallery works fine. Any ideas?
It was working fine before Android 11.

Using capacitor 3

1 post - 1 participant

Read full topic

DeepLink not opening app

$
0
0

Hello!

I did all configurations listed in DOCs for deeplink.
Google site association is up, i get success when testing it by the link in the docs.
Its everything exactly as the docs configurations.
I am generating .apk using the same certificate that generated fingerprint for app association.

Android11
Capacitor3

Can someone help? :slight_smile:

1 post - 1 participant

Read full topic

How to make autoplay delay on individual slide?

$
0
0

I want to configure delay of each slide. is it possible with ion-slides?

Here is my sample code

<ion-content>
  <ion-slides [options]="slideOpts">
    <ion-slide>
      <img src="http://localhost:81/media/2/content/c105f231-587d-48d9-90d1-e07a1861b267.jpg" alt=”slide-1” />
    </ion-slide>
    <ion-slide>
      <img src="http://localhost:81/media/2/content/c105f231-587d-48d9-90d1-e07a1861b267.jpg" alt=”slide-2” />
    </ion-slide>
  </ion-slides>
</ion-content>```

1 post - 1 participant

Read full topic

ISSUE : UI Label,Text & Div Color Changed Automatically after upgrade android version 10

$
0
0

Hello Everyone,

I had developed android application last year for one client. It was working fine only. they had to upgrade android OS version to 10. After that entire application Label ,text ,div background color , toolbar color,content background color are changed automatically. Really Don’t know what is the issue.

**Can anyone please help me the solution to fix it.

Thanks in Advance.

Before :

5 6 7

After :
1 4 3

1 post - 1 participant

Read full topic

No such module '..Kit' when using Capacitor Plugin

$
0
0

I’m building an Capacitor Plugin. To autenticate a user using WebAuthn (since this is not yet suported in WKWebView-based browsers)

Within this plugin I’m using WebAuthnKit I added it to my Podfile of my plugin. Like so:

...
use_frameworks!
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios'
pod 'WebAuthnKit', '~> 0.9.5'
...

After running pod install it works great! Also when I build only my plugin using xcode it builds successfully

But then when I use my plugin in my ionic capacitor app (installed locally via npm) xcode spits out the error
No such module 'WebAuthnKit' on the line in the plugin code where I do import WebAuthnKit to use it.

I can fix it by hand but after running ionic cap sync ios all my changes are gone!
What I do to fix it:

  1. Also add pod 'WebAuthnKit', '~> 0.9.5'to my ionic app podfile
  2. Also run pod install in the ios/App folder of my ionic app
  3. Select Pods project from xcode
  4. Select CapacitorMyPlugin from the targets panel to select my plugin
  5. Add WebAuthnKit to the list of Link Binary With Libraries under Build Phases
  6. Add "${PODS_CONFIGURATION_BUILD_DIR}/WebAuthnKit" in the Framework Search Paths (debug and release) under Build Settings

After this is done the error is gone but I have to repeat these steps after every ionic cap sync ios.

Has anyone used external Kits in a Capacitor Plugin?
How do you link the correct pods from xcode workspace?

(opening .xcodeproj or .xcworkspace makes no difference only when opening .xcodeproj it sais No such module ‘Capacitor’)

1 post - 1 participant

Read full topic

Viewing all 70612 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>