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

Performance issues

$
0
0

@mateuspetter wrote:

Hello,

My app was working fine until yesterday, but today it started some big performance issues, it sometimes takes 10 seconds for an ion-list to load, or even a tab to be highlighted.
Sometimes it works fine, with no performance issues, but it is very rare.
Ionic info
cli packages:

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v8.7.0
npm  : 5.4.2
OS   : Windows 10

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic


Slow loading time for ios build

$
0
0

@yundongcai1983 wrote:

Dear all,

I build the app with the following command.

ionic cordova build ios --prod

Then I open the Xcode, connect my iphone and run it. It will launch the app in my iphone.

I have two problems that need your comments:

  1. The first one is that for the first time, it is very slow about 20 seconds. For the second time i run app on my iphone, it seems fast.

I check the log in the xcode, it shows

2017-11-12 22:33:16.127259+0800 PawerUp[6350:4444134] Download Progress: 95%
2017-11-12 22:33:16.130056+0800 PawerUp[6350:4444134] Download Progress: 95%
2017-11-12 22:33:16.130361+0800 PawerUp[6350:4444134] Download Progress: 95%
2017-11-12 22:33:16.481791+0800 PawerUp[6350:4444134] Download Progress: 96%
2017-11-12 22:33:16.482294+0800 PawerUp[6350:4444134] Download Progress: 96%
2017-11-12 22:33:16.484724+0800 PawerUp[6350:4444134] Download Progress: 96%
2017-11-12 22:33:16.850627+0800 PawerUp[6350:4444134] Download Progress: 97%
2017-11-12 22:33:16.855221+0800 PawerUp[6350:4444134] Download Progress: 98%
2017-11-12 22:33:17.258913+0800 PawerUp[6350:4444134] Download Progress: 99%
2017-11-12 22:33:17.666320+0800 PawerUp[6350:4444134] Download Progress: 100%
2017-11-12 22:33:17.723056+0800 PawerUp[6350:4444134] UUID is: and upstream_uuid is: ae0483d8-7250-46b8-9450-2dffaef3868b
2017-11-12 22:33:17.724199+0800 PawerUp[6350:4444134] Download Finished…
2017-11-12 22:33:17.732671+0800 PawerUp[6350:4444134] Versions: (
)
2017-11-12 22:33:17.733425+0800 PawerUp[6350:4444134] Path for zip file: /var/mobile/Containers/Data/Application/3FF42F12-C1F6-44DC-BCE9-8730564613D5/Library/Application Support/www.zip
2017-11-12 22:33:17.733513+0800 PawerUp[6350:4444134] Unzipping…
2017-11-12 22:33:17.740749+0800 PawerUp[6350:4444134] Zip Extraction: 0%
2017-11-12 22:33:17.741565+0800 PawerUp[6350:4444134] Zip Extraction: 0%
2017-11-12 22:33:17.750823+0800 PawerUp[6350:4444134] Zip Extraction: 1%
2017-11-12 22:33:17.774839+0800 PawerUp[6350:4444134] Zip Extraction: 1%
2017-11-12 22:33:17.791220+0800 PawerUp[6350:4444134] Zip Extraction: 24%
2017-11-12 22:33:18.022325+0800 PawerUp[6350:4444134] Zip Extraction: 25%
2017-11-12 22:33:18.034509+0800 PawerUp[6350:4444134] Zip Extraction: 26%

I don’t know why there is a need to download www.zip and unzip it. I have around 10 pages.

  1. I build the .ipa with ad-hoc deploying at the Xcode, it gives me the older version. I check that config.xml has updated to latest version but the changes on pages are not shown.

Your help is much appreciated.
best regards,
yundong

Btw, here is my ionic info:

cli packages: (/Users/caiyundong/Desktop/project/ionic/PetHome/node_modules)
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.7.1
System:
Android SDK Tools : 26.0.2
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v7.9.0
npm : 5.4.2
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235
Misc:
backend : pro

Posts: 1

Participants: 1

Read full topic

Ionic project - multiple clients/frontends in same project

$
0
0

@iwantwin wrote:

Hey all!

I’m trying to get my head around some design(architecture) principles for ionic in general. This is not something that is specific in code. more in structures of how to set up your project.

So basically, I’m having a project that has multiple clients, and thus appearances. The only difference is in the views: colors, paddings, margins, images, sometimes a different page layout. But all apps do the same thing: (for example) serving food in one or more restaurants. Therefore my codebase should be generic for every client, just the visual layer should change. We can have lots and lots of different clients, but we need it to be very easy to get each layout in the latest version of the base-code.

I’m obviously missing something huge here. Any ideas how to achieve this?


Some extra information on my dilemma:
Requirements:
Must haves:

  • All components, providers, services, models should be the same per client
  • All views (pages) should be different per client
  • Some SCSS should be different per client, some SCSS should be generic for all clients that make use of the project

Good to have:

  • Some views could be generic (like login)

So this is how we did it before we used ionic/typescript:

  • We created a cordova project
  • We used a lot of js files which were generic
  • We used a lot of .client.js files which were client-specific
  • For each release/test build we did a custom copy of the cordova project, put the specific client files over the generic/base client files (we had the files in the base to be able to test the basic layout for new clients)
  • We had some CI to watch the files and copy & reload the http-server

For our ionic project:
I’m seeing the following problems with writing custom build/watch/hook scripts:

  • Ionic:serve is watching the staging folder, so I can’t copy files in it (the first file copy means rebuild, but a lot of files are changed in a short period, I think ionic:serve can’t handle that, or there is something else going on, but I’m getting a lot of EACCESS/ELIFECYCLE errors here
  • Ionic:build can be triggered áfter the copy, but I can’t copy while my http-server is running, but I also can’t kill the http-server child process for some reason (I think because it spawns child-processes?) (ALSO: this would mean losing ionic’s built-in live reload, which i love)

Posts: 1

Participants: 1

Read full topic

Set up Verizon email on windows 10

$
0
0

@AbbyPaul wrote:

You can’t setup Verizon email on Windows 10 because it has stopped the services of an account. Windows 10 has discontinued the email services of Verizon. A lot of issues were there with the email service. There was not much feature in Verizon and most probably it has stopped giving the services because it has some security issue. Unfortunately, you can’t experience the emailing feature on Windows 10. You can contact experts for further information.
Visit Here:- Verizon Toll Free Service Number

Posts: 1

Participants: 1

Read full topic

FTP Plugin integration

$
0
0

@ManivannanDurairaj wrote:

Hi Guys,
I have implemented FTP plugin in ionic 2. But it shows it.sauronsoftware.ftp4j.FTPException [code=550, message= Access is denied. ] error. I have shared my code.

this.ftp.connect(hostName, userName, password).then(
      resp => {
        console.log(resp);
        this.fPath.resolveNativePath(this.file.externalDataDirectory + "test/").then(
          fileUrl => {
            console.log(fileUrl);
            this.ftp.upload(fileUrl + "test.txt", hostName + "test").then(
              percent => {
                console.log(percent);
                if (percent == 1) {
                  console.info("ftp: upload finish");
                } else {
                  console.debug("ftp: upload percent=" + percent * 100 + "%");
                }
              },
              uplderror => {
                console.log(uplderror);

              }
            )
          },
          err => {
            console.log(err);
          }
        )
      },
      err => {
        console.log(err);
      }

Help me guys.

Thanks,
Mani

Posts: 1

Participants: 1

Read full topic

Publish the fireAdmin admin panel on your own server

Ionic 2 Google-Maps native

$
0
0

@HAmer wrote:

I’m using google maps native in my project it works fine but I want to getLocation without display map.
Can anyone help me?

Posts: 1

Participants: 1

Read full topic

Uploading an Image to Amazon web service s3 using Ionic 2/3 with Angular 2+

$
0
0

@Sharanagouda wrote:

Hi All,

Is anyone Implemented Uploading an Image to Amazon web service s3 using Ionic 2/3 with Angular 2/4
I have tried this much but it’s not working

 public takePicture(sourceType) {
      // Create options for the Camera Dialog
      console.log("takePicture ");
      const options = {
          quality: 100,
          destinationType: this.camera.DestinationType.FILE_URI,
          sourceType: this.camera.PictureSourceType.CAMERA,
          encodingType: this.camera.EncodingType.JPEG,
          targetWidth: 1000,
          targetHeight: 1000,
          saveToPhotoAlbum: false,
          correctOrientation: true
      };

      // Get the data of an image
      this.camera.getPicture(options).then((uri) => {
          const fileTransfer: TransferObject = this.transfer.create();

          var s3URI = encodeURI("https://mybucketname.s3.amazonaws.com/"),
              policyBase64 = "MY_BASE64_ENCODED_POLICY_FILE",
              signature = "MY_BASE64_ENCODED_SIGNATURE",
              awsKey = 'xxxxxxxxxxxxx',
              acl = "public-read";


          let options = {
              fileKey: 'file',
              fileName: uri.substr(uri.lastIndexOf('/') + 1),
              chunkedMode: false,
              mimeType: "image/jpeg",
              headers: {
                  Connection: "close"
              },
              params: {
                  metadata: { foo: 'bar' },
                  token: 'xxxxxxxxxxxxxxxxxxxx' //super_secret_token

              }

          };

          this.loading.present().then(() => {
              alert(options.fileName);
              let s3UploadUri = 'https://s3-us-west-1.amazonaws.com/mybucketname';
              fileTransfer.upload(uri, s3UploadUri, options).then((data) => {
                  let message;
                  let response = JSON.parse(data.response);
                  if (response['status']) {
                      message = 'Picture uploaded to S3: ' + response['key']
                  } else {
                      message = 'Error Uploading to S3: ' + response['error']
                  }
                  this.loading.dismiss();
                  let toast = this.toastCtrl.create({
                      message: message,
                      duration: 3000
                  });
                  toast.present();
              }, (err) => {
                  this.loading.dismiss();
                  let toast = this.toastCtrl.create({
                      message: "Error",
                      duration: 3000
                  });
                  toast.present();
              });
          });
      });

  }

Please help me to solve search max websites still unable to modify the code

forum ionicframework
github
stackoverflow
Ionicframewok forum another

I have accesskey, secrete key and bucket name please tell me how modify above code
Max people looking for answer

Posts: 1

Participants: 1

Read full topic


How i change my color of text based on value in ionic 2

$
0
0

@dipankar123 wrote:

hey guys, I am new in ionic 2
i want to set my background color or text color of text based on value loaded.

in my code {{item.Remarks}} returns value ‘P’ or 'A’
i want to set color of text green if {{item.Remarks}} returns the value=P;
and color Red for value=A;

here is my code:

{{item.AttendanceDate}}
{{item.Remarks}}

Posts: 1

Participants: 1

Read full topic

Cordova-plugin-ibeacon set value of measuredpower?

$
0
0

@MyoungboKim wrote:

Hi. I am developing this beacon plugin using Ionic hybrid app.
I need to change the value of ‘measuredpower’, which is a parameter of startAdvertising().
There is no response even if it is changed to decimal number.
What are the minimum and maximum values of ‘measuredpower’?
Please ask for help.
Thank you in advance.

Posts: 1

Participants: 1

Read full topic

Ionic-native Intent Printer issue

Printer issue while printing a small slip

$
0
0

@sanjay740 wrote:

Hii, I am sanjay. I am new in ionic 3. i am making a application of printing a slip from Android and IOS but it show an error and not print wrong content.

i am using intent in this application and using a ionic native plugin
– ionic cordova plugin add com-darryncampbell-cordova-plugin-intent.

Please help me!!!

Posts: 1

Participants: 1

Read full topic

Ionic 2 Map Issue

$
0
0

@sanjay740 wrote:

Hii I am sanjay,
I make a tracking application in ionic 2. using GoogleMaps of ionic native plugin.
the map controls are loaded properly but map was not rendering(It show map controls but not showing map . it show white screen).
Please help me to out this problem.

Posts: 1

Participants: 1

Read full topic

How to play manifest videofiles

Ionic & Material Design

$
0
0

@sofianeee wrote:

Hi there
i found the ionic UI very simple , so i wanna integrate ionic with material design
my question , is that will infect the app performances ?
sory for my english
Thanks.

Posts: 2

Participants: 2

Read full topic


Can't add Cordova Plugin WKWebView Engine

$
0
0

@kennyalmendral wrote:

I’m on a mac by the way. I run the ff. code in the terminal:

cordova plugin add https://github.com/driftyco/cordova-plugin-wkwebview-engine.gi --save

But for some reasons, I get the ff. error:

Error: Failed to fetch plugin https://github.com/driftyco/cordova-plugin-wkwebview-engine.gi via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t https://github.com/driftyco/cordova-plugin-wkwebview-engine.gi.git
npm ERR!
npm ERR! remote: Invalid username or password.
npm ERR! fatal: Authentication failed for 'https://github.com/driftyco/cordova-plugin-wkwebview-engine.gi.git/'
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Kenny/.npm/_logs/2017-11-13T08_35_16_934Z-debug.log

Anyone encountered the same issue? Thanks everyone :slight_smile:

Posts: 2

Participants: 2

Read full topic

IOS build fails export with --prod --release

$
0
0

@texasman03 wrote:

I have configured and reconfigured my certificates and provisioning profiles in the Apple Developer console. However, when I run:

ionic cordova build ios --device --prod --release

I get:

2017-11-13 02:52:41.540 xcodebuild[13279:394001] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/5n/9fdb583s36339kyg9kmmh0kh0000gn/T/MyApp_2017-11-13_02-52-41.539.xcdistributionlogs'.
2017-11-13 02:52:41.880 xcodebuild[13279:394001] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7f95c8628050>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"MyApp.app\" requires a provisioning profile with the Push Notifications feature.\" UserInfo={NSLocalizedDescription=\"MyApp.app\" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}"
)}
error: exportArchive: "MyApp.app" requires a provisioning profile with the Push Notifications feature.

Error Domain=IDEProvisioningErrorDomain Code=9 ""MyApp.app" requires a provisioning profile with the Push Notifications feature." UserInfo={NSLocalizedDescription="MyApp.app" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

** EXPORT FAILED **

I’m absolutely positive that the certificate and provisioning profile have push notifications activated
I have tried removing the platform and re-adding and re-building, the problem persists. Is there some other setting somewhere that I’m missing?

#IOS #Cordova #Build

Posts: 1

Participants: 1

Read full topic

Help with authentication REST API via token

$
0
0

@asegarra wrote:

Good night Everybody.

I present myself in the forum as new in the IONIC world. I’ve only had a couple of weeks of learning and practice, specifically in Ionic 2 … so far so good, however I have encountered difficulties in the use of external APIs, especially those that are accessed through Token authentication. I tried to adapt the following code from an online tutorial without success:

import {Injectable} from ‘@ angular / core’;
import {Http} from ‘@ angular / http’;
import ‘rxjs / add / operator / map’;
import ‘rxjs / add / operator / toPromise’;

@Injectable ()
export class UserService {

builder(
private http: Http
) {}

getUsers () {
return this.http.get (‘https://randomuser.me/api/?results=25’)
.map (res => res.json ())
.toPromise ();
}
}

What I’m looking for is to access an API to which a GET request is made by means of a header authorization in base64 that should be like this:

Authorization: Basic bmV5c2EuaHVydGFkb0BnbWFpbC5jb206MTY3YmM2OTE1MmY5ZWQxMWFjNzc =

I’ve been looking for a solution for days and I do not get it. Any help they can give me would be very valuable.

It should be noted that I am still a rookie.

Thanks in advance.

best regards.

Posts: 1

Participants: 1

Read full topic

Can i use the new WKWebView Plugin with Cordova only?

$
0
0

@copman wrote:

Hi guys!

I have no clue about ionic, i use cordova and realized the problems with the wkwebview plugin!
You have a version that solves some problems, can i use it with cordova, or do i need ionic?

thanks, wolf!

Posts: 1

Participants: 1

Read full topic

Best practice for a SQLite structure of a mobile diary app?

$
0
0

@AllartSoftworks wrote:

I’m creating a mobile app with Ionic where I log multiple activities (physical and mental ones).

Won’t dive into details: simply I have different forms that user compiles daily to log these activities into a db.

Forms are different because activities are different (“Ate a meal”, “Studied for 3 hrs”, “Ran to work”, …).

I don’t know what it’s better, if

SOLUTION 1) a Wordpress-like solution as a main table for basic entry data and another big table dedicated to variable options or

SOLUTION 2) a main table for basic entry data and a new detailed table for every category.

Example:

SOLUTION 1)

MAIN_ENTRIES table:

id integer,
entry_title text,
entry_datetime text,
recurrency integer,
recurrency_type integer,
recurrency_init_date text,
recurrency_end_date text

ENTRIES_OPTIONS table:

id integer,
main_entries_id integer,
entry_option_name text,
entry_option blob

where entry_option cell is thought as meta_value cell in wp_postmeta in a Wordpress db.

SOLUTION 2)

MAIN_ENTRIES table:

id integer,
entry_title text,
entry_datetime text,
recurrency integer,
recurrency_type integer,
recurrency_init_date text,
recurrency_end_date text

then I’d have a table for every entry type: something like

PHYSICAL_ACTIVITIES table

id integer,
main_entries_id integer,
duration integer,
intensity integer,
short_description text,
long_desc blob

MENTAL_ACTIVITIES table

id integer,
main_entries_id integer,
duration integer,
difficulty integer,
effectiveness integer,
short_description text,
long_desc blob

and so on.

About the former: I think it’s the more scalable solution but it can be harder to retrieve data from the blob field in the ENTRIES_OPTIONS table… maybe I’d have to write some sort of JSON data into it and create functions to retrieve different values.

About the latter: It’s probably the most “expensive” about the performance but to me it’s the clearest to write and mantain.

Don’t know what to choose, any help appreciated, thank you in advance.

Posts: 1

Participants: 1

Read full topic

Viewing all 70448 articles
Browse latest View live