Giter Site home page Giter Site logo

apache / cordova-ios Goto Github PK

View Code? Open in Web Editor NEW
2.1K 187.0 985.0 31.69 MB

Apache Cordova iOS

Home Page: https://cordova.apache.org/

License: Apache License 2.0

C 0.17% Objective-C 31.15% JavaScript 66.50% Python 0.44% CSS 0.41% HTML 0.59% Shell 0.20% Ruby 0.23% Swift 0.26% Mathematica 0.04%
cordova objective-c nodejs javascript mobile cordova-platform ios hacktoberfest

cordova-ios's Introduction

Cordova iOS

NPM

Node CI codecov.io

Cordova iOS is an iOS application library that allows for Cordova-based projects to be built for the iOS Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript.

Apache Cordova is a project of The Apache Software Foundation (ASF).

Requirements

Create a Cordova project

Follow the instructions in the Create your first Cordova app section of Apache Cordova Docs

To use a shared CordovaLib, for example in development, link the appropriate cordova-ios platform folder path:

cordova platform add --link /path/to/cordova-ios

Updating a Cordova project

When you install a new version of the Cordova CLI that pins a new version of the Cordova-iOS platform, you can follow these simple upgrade steps within your project:

cordova platform rm ios
cordova platform add ios

Debugging in Xcode

Import project in Xcode through File > Open and targeting /path/to/your-cdv-project/platforms/ios/PROJECT_NAME.xcworkspace.

How to Test Repo Development

npm install
npm test

Further reading

cordova-ios's People

Contributors

agrieve avatar audreyso avatar becka11y avatar brianleroux avatar clelland avatar dpogue avatar erisu avatar eymorale avatar filmaj avatar fredgrott avatar jamesjong avatar janpio avatar jcesarmobile avatar khawkins avatar macdonst avatar mmocny avatar mschulkind avatar mwoghiren avatar nachoman avatar niklasmerz avatar purplecabbage avatar raphinesse avatar rayvahey avatar samsonasu avatar shazron avatar silentrob avatar sintaxi avatar stevengill avatar surajpindoria avatar xmaniac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-ios's Issues

Xcode Doesn't Show The Real Debug Stats (Cpu/Fps/MR) Of Any Of My Cordova Builds

Hi Good Afternoon

I can't manage to debug any of my Cordova Builds on Xcode, the Debugger that Displays the Actual (Cpu/Fps/MR) is not showing the Real Stats of the App, is like it doesn't recognise the Webkit where all the game code is running and instead it displays the Stats of the executable Exe which is always around CPU =6%
Example: it targets the >>>> AppName.exe
The App can be Running at Cpu: 80% and it will display just 6% on the Debugger and the same goes for the Memory.
I create a Demo Test if anyone can try it to see what I mean, Please help as I been more than one-month researching and testing and nothing worked.

Cordova Ver: 8.1.2 ([email protected])
[email protected]

Demo for the Project To Test: The Xcode Project is located at (Platforms>>ios)
Demo Test Project

I will leave some Pictures also to show you what I mean
CPU

MR

And this is how much CPU & RAM was consuming The App on an iPhone 6 Device
Test Game Stats

It happens with any build that I build with Cordova and with any Device that I installed.
I test it on iPhones(6,7,8)

Xcode Version Tested:
Xcode 10
Xcode 9.2

Thanks for reading I hope that you help me

How can I generate xcarchive file using `cordova build ios`?

Hi guys! The original question could be found here - https://stackoverflow.com/questions/52893868/use-cordova-cli-to-generate-xcarchive-file

I use cordova -- build ios --device to successfully generated signed *.ipa file, however it seems there is no *.xcarchive file here:

2018-10-18T21:02:53.4125690Z 
2018-10-18T21:02:53.7699240Z 2018-10-18 16:02:53.769 xcodebuild[24727:142486] 
2018-10-18T21:02:53.9046040Z 2018-10-18 16:02:53.904 xcodebuild[24727:142486] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/jr/j1yxcy8x1zqb9pkr64dwp0mw0000gn/T/App_2018-10-18_16-02-53.903.xcdistributionlogs'.
2018-10-18T21:03:01.5280840Z Exported App.xcarchive to: /Users/alekseimelezhik/agent01/_work/2/s/platforms/ios/build/device
2018-10-18T21:03:01.5281720Z ** EXPORT SUCCEEDED **

In my case I have only platforms/ios/build/device/App.ipa file, and cannot fine App.xcarchive ( it seems it gets removed after export ?)

The question is, how to make cordova build to generate ( keep ) *.xcarchive file as well?

Thank you

InAppBrowser + Keyboard Issue XCode 10

This is an issue that touches many areas so I hope placing it here is the proper place.

When running a Cordova project from XCode 10, the Keyboard no longer resizes the height of a flexbox in an InAppBrowser window. The same project, run using XCode 9, shrinks the flexbox (and I assume the height of the WKWebView itself?) to accommodate the keyboard.

The picture is worth a thousand words, so here it is:
ios iab-keyboard

The list of plugins/platforms are as follows:

Platform

cordova-ios 4.5.5

Plugins

Relevant:

cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.2.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"

Additional:

com-intel-security-cordova-plugin 2.0.3 "APP Security API"
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-plugin-calendar 5.1.3 "Calendar"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.1.1 "cordova-plugin-googlemaps"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-vibration 3.1.0 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova.plugins.diagnostic 4.0.10 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-push 2.1.3 "PushPlugin"

Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10

Seeing a blocking issue after updating to XCode 10 related to keyboard displacement and then dismissal.

When an input that would require webview centering is clicked, the viewport is repositioned to center that input, as iOS has traditionally done. However, when dismissing the keyboard, the viewport is not re-positioned properly back to its original position.

This can leave large gaps where the webview is no longer visible. In the attached screenshots, you can see that this leaves a large margin where the viewport is rendering, shifted upwards and off-screen by a 100+ pixels. There appears to be no way do re-position the viewport short of additional input focus changes, each resulting in similar offset issues.

To add some additional confusion, it appears this only happens on iOS 12 / XCode 10 produced installs, such that:

  • This issue is present ONLY on builds produced in XCode 10 targeting iOS 12 devices.
  • This issue affects ALL tested device types on iOS 12.
  • This issue is present via Legacy AND Modern build systems
  • iOS 10 / 11 devices targeted via XCode 10 are NOT affected.
  • iOS 10 / 11 / 12 devices targeted via XCode 9 are NOT affected.

Any info on potential workarounds or patches would be greatly appreciated. I've already looked into upgrading our cordova-plugin-ionic-webview plugin (as well as various others), but it appears to not have any relevance with the issue. At this point, we're looking at downgrading XCode in order to get working builds out.


Click Here to See Example Screenshots

Captured via iOS Simulator, but also experienced on various physical devices running iOS 12

Prior to focusing an input:
1

Input focused: / keyboard present
2

Keyboard dismissed / HTML element highlighted in inspector:
3


Click Here for Environment Details

OS: OSX 10.13.6 (High Sierra)
XCode: 10.0 (10A255)
cordova: 8.0.0
cordova-ios: 4.5.4
cordova-plugins:

  • cordova-android-support-gradle-release 1.2.0 "cordova-android-support-gradle-release"
  • cordova-custom-config 5.0.2 "cordova-custom-config"
  • cordova-plugin-app-event 1.2.1 "Application Events"
  • cordova-plugin-apprate 1.4.0 "AppRate"
  • cordova-plugin-camera 4.0.3 "Camera"
  • cordova-plugin-device 2.0.1 "Device"
  • cordova-plugin-dialogs 2.0.1 "Notification"
  • cordova-plugin-facebook4 1.9.1 "Facebook Connect"
  • cordova-plugin-file 6.0.1 "File"
  • cordova-plugin-googleplus 5.2.1 "Google SignIn"
  • cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
  • cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
  • cordova-plugin-market 1.2.0 "Market"
  • cordova-plugin-media 4.0.1-dev "Media"
  • cordova-plugin-nativestorage 2.3.2 "NativeStorage"
  • cordova-plugin-network-information 2.0.1 "Network Information"
  • cordova-plugin-spinner-dialog 1.3.1 "SpinnerDialog"
  • cordova-plugin-splashscreen 5.0.3-dev "Splashscreen"
  • cordova-plugin-whitelist 1.3.3 "Whitelist"
  • cordova-plugin-x-socialsharing 5.3.2 "SocialSharing"
  • cordova-support-google-services 1.1.0 "cordova-support-google-services"
  • de.appplant.cordova.plugin.local-notification 0.8.5 "LocalNotification"
  • es6-promise-plugin 4.2.2 "Promise"
  • phonegap-plugin-multidex 1.0.0 "Multidex"
  • phonegap-plugin-push 2.2.3 "PushPlugin"

Unable to distribute with Xcode 10

When trying to push a project to app store with Xcode 10 i get the following new error

ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

Issue in Cordova iOS 4.5.5 for xcode 10.0

I build successfully app in IOS12 / Xcode20 but I am facing many design related issues like header disappear after moving to a screen and click not working sometimes. So I want to ask you when you release cordova ios 5.0.0 major release to solve design layout related issue. Please reply as soon as possible because this is the very big issue for me and i am hardly waiting for your new release .

Going back to Cordova from native iOS view

I wrote a plugin, using cordova to push from the html interface to the ios native interface, and then there is a UINavigation on the ios interface, I want to click leftnavbar to return to the html interface, what should I do with your code?

Generating a manifest.plist for over-the-air 'enterprise' distribution

We use Enterprise-distribution for our iOS app; and in the Xcode IDE, I configure the produced manifest.plist thusly:

screen shot 2018-10-23 at 1 19 46 pm

While there's a build.json field for Enterprise distribution, "packageType": "enterprise", there doesn't appear to be any documented way to configure the required URLs and manifest for OTA distribution? At the moment, I'm stuck doing that manually, every time.

Is there a sanctioned methodology for this, and/or is it on the roadmap?

Thanks!

No inertial scroll on iOS with facebok plugin page

Hi, i have an app which displays a Facebook content page with the Facebook plugin page.

On iOS, there is no inertial scrolling and i need it. I use Cordova-ios 4.5.5 with Framework7 2.2.1.

There is the html who display it :

<div id="facebook" class="page-content tab tab-link">
      <iframe src="https://www.facebook.com/plugins/page.php?href=*thereIsTheValidHref*&tabs=timeline&width=340&height=500&small_header=true&adapt_container_width=true&hide_cover=true&show_facepile=false&appId" width="340" height="500" style="border:none;overflow:hidden;display:block;margin-left:auto;margin-right: auto" scrolling="yes" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
       <div class="block text-align-center">
                 <div class="preloader color-blue "></div>
        </div>
</div>

The iframe is well displayed. I saw that is possibly the inertial sroll on iframe with safari wich is a problem but I do not really know if it comes from cordova.
It can ?

iOS12 keyboard change window height (change css vh values(font, element height))

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:

cordova (Cordova CLI) : 8.0.0 
local packages:

@ionic/app-scripts : 3.1.11
Cordova Platforms  : ios 4.3.0
Ionic Framework    : ionic-angular 3.9.2
System:

ios-sim : 5.0.13 
Node    : v8.11.3
npm     : 6.1.0 
OS      : macOS High Sierra
Xcode   : Xcode 10.0 Build version 10A255 
Environment Variables:

ANDROID_HOME : /Volumes/TOURO/SDK
Misc:

backend : pro

all elements which has height or font-size or something else depend on height (css vh) change its size, and in landscape mode remove @media (orientation: landscape) classes. I did not get this problem if i use device on ios 11.4

[Discussion]Why not use nsoperation queue instead of dispatch queue in CDVCommandDelegateImpl.m?

I'm using cordova 8.0.0 now to develop my hybrid application. I'm writing some plugin api function as followed

func pluginAPI( _ command: CDVInvokedUrlCommand ){
    // parameter process
    commandDelegate.run( inBackground: {() -> Void in
        var pluginResult : CDVPluginResult;
        // some logic to handle result
        self.commandDelegate.send( pluginResult, callbackId: command.callbackId );
    } );
}

In my scenario, as I'm delivering the plugin to different teams, I can't control how people will call it. In some cases, people will use some Promise.all in the front-end to call the pluginAPI function for more than 100 times.

Here brings the problem, I notice that the implementation of above run function is as followed:

- (void)runInBackground:(void (^)())block
{
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
}

It's using the GCD global concurrent queue directly, and I don't have an easy way to control the concurrent number of tasks. If the user calls the API more than 64 times(the maximum number of threads of GCD according to some documents), it will spawn up to 64 threads, and block other dispatch queue if I'm trying to dispatch any concurrent task.

For example, in my plugin, I've an array to store some data, which needs to be thread safe. So I implemented some read write lock according to the blog: http://basememara.com/creating-thread-safe-arrays-in-swift/ based on GCD.

let queue = DispatchQueue(label: "MyArrayQueue", attributes: .concurrent)
 
queue.async(flags: .barrier) {
  // Mutate array here
}
 
queue.sync() {
  // Read array here
}

In my code, I have some operation like

queue.sync()
queue.async()

The combination of queue.async/queue.sync call will actually create deadlock when pluginAPI calls already reach the maximum number of thread limit of GCD. It won't in normal cases.

I assume that it might be a common challenge in cordova plugin development, and I'm not sure what's the best practice here as we don't have an easy control of how javascript code calls the plugin API. One potential solution might be use the NSOperation to control the maximum concurrent number of tasks initiated by plugin API layer, which will leave the space for the following function in the execution chain to dispatch some async/sync to the queue. On the other hand, change the DispatchQueue from concurrent to serial will also fix the problem.

Any suggestions or ideas are welcomed!

Why is config.xml not being merged?

I wrote an ios plugin and add <feature name="PluginName"> <param name="ios-package" value="PluginName" /> </feature> to the root config.xml, then I execute cordova build, but I found that my custom plugin didn't take effect.then I wrote config to staging/config.xml, it look effect. but when I execute cordova build again, then staging/config.xml will be covered. so I thought there is a problem with the file coverage mechanism.
image

iOS 12 / UIWebView Keyboard covers INPUT elements at the bottom of page

I've noticed a regression/change in behavior with iOS 12 on our Cordova app using UIWebView. When we have <input> elements at the bottom of the page, tapping to insert focus brings up the iOS keyboard, which promptly covers the element and makes it impossible to see/edit what you are typing. You also cannot manually scroll the page higher to make it visible. It seems the keyboard now overlays the UIWebView, instead of the UIWebView adjusting to accommodate the space above the keyboard.

This is easily reproducable with @dpogue's repro case for the WKWebView issue:

https://github.com/dpogue/WKScrollTest

Simply change this line to true, delete Test Case 8 from the HTML, and run on an iOS 12+ device. Scroll to the bottom of the page, and tap in the input in Test Case 7. The keyboard covers the input.

If you run this same code on iOS 11 or earlier, the viewport adjusts so the input is visible above the keyboard.

This seems similar to #417 but is a distinct issue, as there are no ill-effects once the keyboard is dismissed.

Anyone else seen this/have a workaround or solution?

Example screenshots

Here it is on iOS 12 on iPhone XR:

image

Here it is working on an iPhone 6 with iOS 9.3:

image

Support serving local content with WKURLSchemeHandler

Ref: https://bugs.webkit.org/show_bug.cgi?id=154916#c17

Cordova apps tend to serve local content. On iOS with WKWebView, this causes severe issues with many features, such as the complete inability to XMLHttpRequest or fetch local files due to strict security restrictions. Apps can resort to cordova-plugin-file, but this forces them to write different code to handle iOS, defeating the purpose of Cordova to allow the same code to run everywhere.

According to an Apple engineer, apps ought to be using WKURLSchemeHandler instead: https://developer.apple.com/documentation/webkit/wkurlschemehandler

Please consider officially supporting this in Cordova on iOS.

prod flag not working in xCode 10

The below command line option not working in xCode 10 environment it gives compiler errors

ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"

tried different combinations to put --prod flag but it didn't work for xCode 10 the buildFlag='UserModernBuildSystem=0' is needed to get away with build process as explained here #407

my issue is with the amount of time my app is taking while loading more than a minute I am guessing that it must be due to not combining --prod flag in the compiler options, I tired other optimization as recommended this blog https://blog.khophi.co/optimize-ionic-2-app-production/ but the performance issue remains same

please suggest

index.js seems not working on real device

Hello everyone,

I'm faceing a problem with xcode and cordova ios... My App works fine on android and now I want to run and testing the iOS version.
When I run the App on en emulator and hit a button to activate other buttons it works fine. When I'm trying this on the real device the buttons keep deactivated.

`document.getElementById("start_scanning").addEventListener
("click", activateList);

function activateList() {
document.getElementById("terminal").style.pointerEvents = "all";
document.getElementById("terminal").style.opacity = "1";
}`

There are also other functions like initialize bluetooth and stuff but the function behind the button let me believe that the app dosen't get (in) the index.js.... The jQuery and bootsrep.js working fine though...

I'm starting to get realy frustrated right now... I'm using the safari developer console and not getting a single error. For Android developing I used the google chrome developer console which worked pretty good.

I need your urgent support and maybe some tips for debugging. I used to browse the web for hours...

The Iphone (5s) is on version: 8.1.2
cordova: 8.1.1 (platform ios: 4.3.1 because it supports iOS version underneath 9)

Thank you very much in advance!

Why is ios-deploy required for plain builds (without deployment)?

Why am I seeing this complaint when I'm not even trying to deploy? This happens on cordova build:

CordovaError: Promise rejected with non-error: 'ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do \'npm install -g ios-deploy\''

IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/armv7/Branch normal armv7 Ld

Hi,

I have used this CLI:

ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"

I have tried a lot of workarounds. But none of them worked. Any help would be a great help here.

** ARCHIVE FAILED **

The following build commands failed: Ld /Users/sampath/Library/Developer/Xcode/DerivedData/You_are_a_CEO-gfwfhmbrnyncfrdrmuirefpabjjv/Build/Intermediates.noindex/ArchiveIntermediates/You\ are\ a\ CEO/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/armv7/Branch normal armv7 Ld /Users/sampath/Library/Developer/Xcode/DerivedData/You_are_a_CEO-gfwfhmbrnyncfrdrmuirefpabjjv/Build/Intermediates.noindex/ArchiveIntermediates/You\ are\ a\ CEO/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/arm64/Branch normal arm64 (2 failures)

Ionic info:

Ionic:

ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : ios 4.5.4
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 29 other plugins)

System:

ios-deploy : 1.9.4
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

package.json

{
    "name": "ambassador",
    "version": "3.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "config": {
        "ionic_copy": "./config/copy.config.js"
    },
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "optionalDependencies": {
        "ios-deploy": "^1.9.4"
    },
    "dependencies": {
        "@agm/core": "^1.0.0-beta.2",
        "@angular/common": "5.0.3",
        "@angular/compiler": "5.0.3",
        "@angular/compiler-cli": "5.0.3",
        "@angular/core": "5.0.3",
        "@angular/forms": "5.0.3",
        "@angular/http": "5.0.3",
        "@angular/platform-browser": "5.0.3",
        "@angular/platform-browser-dynamic": "5.0.3",
        "@ionic-native/app-version": "^4.11.0",
        "@ionic-native/background-geolocation": "^4.15.0",
        "@ionic-native/background-mode": "^4.8.0",
        "@ionic-native/branch-io": "^4.15.0",
        "@ionic-native/camera": "^4.5.2",
        "@ionic-native/clipboard": "^4.9.1",
        "@ionic-native/contacts": "^4.7.0",
        "@ionic-native/core": "^4.14.0",
        "@ionic-native/diagnostic": "^4.15.0",
        "@ionic-native/document-viewer": "^4.15.0",
        "@ionic-native/facebook": "^4.12.2",
        "@ionic-native/file": "^4.5.2",
        "@ionic-native/file-opener": "^4.11.0",
        "@ionic-native/file-transfer": "^4.11.0",
        "@ionic-native/geolocation": "^4.5.2",
        "@ionic-native/google-maps": "^4.14.0",
        "@ionic-native/image-resizer": "^4.7.0",
        "@ionic-native/in-app-browser": "^4.12.0",
        "@ionic-native/keyboard": "^4.11.0",
        "@ionic-native/location-accuracy": "^4.5.2",
        "@ionic-native/mixpanel": "^4.15.0",
        "@ionic-native/music-controls": "^4.8.0",
        "@ionic-native/onesignal": "^4.15.0",
        "@ionic-native/screen-orientation": "^4.11.0",
        "@ionic-native/sms": "^4.15.0",
        "@ionic-native/social-sharing": "^4.9.1",
        "@ionic-native/splash-screen": "4.4.0",
        "@ionic-native/status-bar": "4.4.0",
        "@ionic/pro": "^1.0.20",
        "@ionic/storage": "2.1.3",
        "@vimeo/player": "^2.6.3",
        "angular-progress-bar": "^1.0.3",
        "angular-svg-round-progressbar": "^2.0.0",
        "angular2-google-place": "^2.0.2",
        "angular2-jwt": "^0.2.3",
        "angularfire2": "5.0.0-rc.6",
        "animate.css": "^3.5.2",
        "branch-cordova-sdk": "^3.1.3",
        "com.synconset.imagepicker": "^2.1.10",
        "cordova-android": "6.4.0",
        "cordova-clipboard": "^1.2.1",
        "cordova-custom-config": "^5.0.2",
        "cordova-ios": "4.5.4",
        "cordova-plugin-add-swift-support": "^1.7.1",
        "cordova-plugin-app-version": "^0.1.9",
        "cordova-plugin-background-mode": "git+https://github.com/katzer/cordova-plugin-background-mode.git",
        "cordova-plugin-camera": "^4.0.3",
        "cordova-plugin-cocoapod-support": "^1.6.0",
        "cordova-plugin-contacts": "^3.0.1",
        "cordova-plugin-device": "^2.0.2",
        "cordova-plugin-document-viewer": "^0.9.10",
        "cordova-plugin-facebook4": "^2.5.0",
        "cordova-plugin-file": "^6.0.1",
        "cordova-plugin-file-opener2": "^2.0.19",
        "cordova-plugin-file-transfer": "^1.7.1",
        "cordova-plugin-geolocation": "^4.0.1",
        "cordova-plugin-googlemaps": "^2.4.6",
        "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#2.6.0",
        "cordova-plugin-inappbrowser": "^3.0.0",
        "cordova-plugin-ionic-webview": "^1.2.1",
        "cordova-plugin-mauron85-background-geolocation": "^2.3.6",
        "cordova-plugin-mixpanel": "^4.5.0",
        "cordova-plugin-music-controls": "^2.1.4",
        "cordova-plugin-nativegeocoder": "^3.1.2",
        "cordova-plugin-request-location-accuracy": "^2.2.3",
        "cordova-plugin-screen-orientation": "^3.0.1",
        "cordova-plugin-splashscreen": "^5.0.2",
        "cordova-plugin-statusbar": "^2.4.2",
        "cordova-plugin-whitelist": "^1.3.3",
        "cordova-plugin-x-socialsharing": "^5.4.3",
        "cordova-sms-plugin": "^0.1.13",
        "cordova-sqlite-storage": "^2.5.2",
        "cordova.plugins.diagnostic": "^4.0.10",
        "css-animator": "^2.3.0",
        "es6-promise-plugin": "^4.2.2",
        "firebase": "4.8.2",
        "google-maps": "^3.2.1",
        "info.protonet.imageresizer": "^0.1.1",
        "ionic-angular": "3.9.2",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionic2-auto-complete": "^1.6.2-alpha",
        "ionic2-google-places-autocomplete": "^1.0.2",
        "ionicons": "3.0.0",
        "jwt-decode": "^2.2.0",
        "list": "1.0.0",
        "moment": "^2.22.2",
        "ngx-slick": "^0.2.1",
        "onesignal-cordova-plugin": "^2.4.5",
        "promise-polyfill": "^8.0.0",
        "pubnub": "^4.21.5",
        "pubnub-angular2": "^1.3.1",
        "rxjs": "5.5.2",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.18"
    },
    "devDependencies": {
        "@ionic/app-scripts": "3.1.11",
        "@ionic/lab": "1.0.11",
        "@types/googlemaps": "^3.30.16",
        "typescript": "2.4.2"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "ionic-plugin-keyboard": {},
            "cordova-plugin-whitelist": {},
            "cordova-plugin-device": {},
            "cordova-plugin-camera": {
                "CAMERA_USAGE_DESCRIPTION": "Upload profile pic",
                "PHOTOLIBRARY_USAGE_DESCRIPTION": "Upload profile pic",
                "PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
            },
            "cordova-plugin-file": {},
            "cordova-plugin-file-transfer": {},
            "cordova-plugin-geolocation": {
                "GEOLOCATION_USAGE_DESCRIPTION": "To locate your Location"
            },
            "cordova-plugin-contacts": {
                "CONTACTS_USAGE_DESCRIPTION": "To invite Friends"
            },
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-request-location-accuracy": {},
            "cordova-plugin-statusbar": {},
            "info.protonet.imageresizer": {},
            "cordova-sqlite-storage": {},
            "cordova-plugin-ionic-webview": {},
            "cordova-plugin-music-controls": {},
            "cordova-plugin-background-mode": {},
            "cordova-clipboard": {},
            "cordova-plugin-x-socialsharing": {},
            "cordova-plugin-screen-orientation": {},
            "cordova-plugin-file-opener2": {},
            "cordova-plugin-app-version": {},
            "cordova-plugin-inappbrowser": {},
            "com.synconset.imagepicker": {
                "PHOTOLIBRARY_USAGE_DESCRIPTION": "App would like to access the library.",
                "PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
            },
            "cordova-plugin-facebook4": {
                "APP_ID": "2178440625814934",
                "APP_NAME": "You Are a CEO",
                "FACEBOOK_ANDROID_SDK_VERSION": "4.+"
            },
            "cordova-plugin-mixpanel": {
                "PLAY_SERVICES_VERSION": "+"
            },
            "cordova-plugin-document-viewer": {},
            "cordova-plugin-googlemaps": {
                "API_KEY_FOR_ANDROID": "xxxx",
                "API_KEY_FOR_IOS": "xxxxx",
                "PLAY_SERVICES_VERSION": "15.0.1",
                "ANDROID_SUPPORT_V4_VERSION": "27.+",
                "LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.",
                "LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even this app runs in background."
            },
            "branch-cordova-sdk": {},
            "cordova-plugin-mauron85-background-geolocation": {
                "GOOGLE_PLAY_SERVICES_VERSION": "11+",
                "ANDROID_SUPPORT_LIBRARY_VERSION": "23+",
                "ICON": "@mipmap/icon",
                "SMALL_ICON": "@mipmap/icon",
                "ACCOUNT_NAME": "@string/app_name",
                "ACCOUNT_LABEL": "@string/app_name",
                "ACCOUNT_TYPE": "$PACKAGE_NAME.account",
                "CONTENT_AUTHORITY": "$PACKAGE_NAME",
                "ALWAYS_USAGE_DESCRIPTION": "This app always requires location tracking"
            },
            "cordova.plugins.diagnostic": {},
            "cordova-sms-plugin": {},
            "cordova-plugin-nativegeocoder": {
                "LOCATION_WHEN_IN_USE_DESCRIPTION": "Use geocoder service"
            },
            "onesignal-cordova-plugin": {},
            "cordova-custom-config": {}
        },
        "cordova-plugin-ionic": {
            "APP_ID": "xxxx",
            "CHANNEL_NAME": "Production",
            "UPDATE_METHOD": "background",
            "MAX_STORE": "2"
        },
        "cordova-plugin-ionic-webview": {},
        "platforms": [
            "android"
        ]
    },
    "platforms": [
        "android",
        "ios"
    ]
}

xcode10

[cordova] ** ARCHIVE SUCCEEDED **
[cordova]
[cordova] 2018-12-12 19:00:47.025 xcodebuild[15793:229894] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/tw/30811n4n6hj424n2cq98dkr00000gp/T/appname_2018-12-12_19-00-46.998.xcdistributionlogs'.
[cordova] error: exportArchive: "appname.app" requires a provisioning profile.
[cordova]
[cordova] Error Domain=IDEProvisioningErrorDomain Code=9 ""appname.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="appname.app" requires a provisioning profiwanghailongMAC:app admin$ ionic info

Ionic:

ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 20 other plugins)

System:

ios-deploy : 1.9.4
NodeJS : v10.5.0 (/usr/local/bin/node)
npm : 6.1.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

iPad Pro 2018

Hello,

I've just had an iOS app rejected because of scaling on the iPad Pro - when I test in Simulator, I see black bars on both the 11" & 12.9" new iPads (2018).

I'm using Cordova 8.1.2, Cordova-iOS 4.5.5 & Xcode 10.1.

Does anyone have any advice on how to build the app so it renders correctly on iPad Pro? My app looks great on iPhone Xs/Xs Max, so I suppose I'm correctly using safe-area-inset.

Thanks!

Beta versions of cocoapods cause adding of pod-dependent plugins to fail

When using a beta version of Cocoapods, adding a plugin which uses pods will fail. In my case, the plugin is cordova-plugin-firebase-analytics. The error message is Error: Version should contain only numbers and dots.

It is caused by the beta in the Cocoapods version, which breaks the version checker. That function (see https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/lib/versions.js#L169), checks to see if the installed Cocoapods version is above Cordova's minimum requirement (around 1.0.1 I think). It expects only numbers and dots (just like the error says) -- when it reaches the beta, it errors out, leaving the plugin in a half-installed state.

For now the simple workaround is to not use a beta version of Cocoapods. I'm mainly filing this issue to help others who might be having the same problem. But, it would be good to fix this issue anyway because the cause is relatively simple. I am not sure of the best way to tackle these kinds of version numbers. Maybe just ignore the beta and anything that follows? I am open to suggestions.

To reproduce it:

sudo gem install cocoapods -v 1.6.0.beta.2
cordova create test
cordova platform add ios
cordova plugin add cordova-plugin-firebase-analytics

Unsupported Architecture for iPhone XS MAX (arm64e)

Xcode is unable to build and deploy to iPhone XS Max

[Xcode Error Message]
The run destination xxx’s iPhone is not valid for Running the scheme 'HelloCordova'.
xxx’s iPhone doesn’t support any of HelloCordova.app’s architectures. You can add xxx’s iPhone’s arm64e architecture to HelloCordova.app’s Architectures build setting.

[My Environment Info]
Xcode: 9.4.1
OS: Mac macOS High Sierra
Cordova: 8.0.0
Cordova Platform iOS: 4.5.5

[Test project was created by the following command]
$ cordova create myApp
$ cd myApp
$ cordova platform add ios
$ cordova build ios

Xcode still shows the same error after I manually add 'arm64e' to Architectures build setting.

UIWebView call loadRequest multiple times lead to deadlock in iOS12

In iOS 12,if you call loadRequest twice in succession,like this:

[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://github.com"]]];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://google.com"]]];

webViewDidStartLoad: will callback twice times,but webViewDidFinishLoad: just callbcak once time.like this:

1. didStartLoading
2. didStartLoading
3. didFinishLoad

Everything is correct in iOS 11.Callback sequence:

1. didStartLoading
2. didFinishLoad
3. didStartLoading
4. didFinishLoad

This problem will lead to [CDVUserAgentUtil acquireLock:] block don`t excute.

App crashes on iOS 12.0

Description:
App start crashes on iPad after upgrade to iOS 12.0.
[ERROR] An error occurred while running subprocess cordova.

Steps to Reproduce:

Upgrade iOS to 12.0
Already install Ionic app launch start crash.
Output:

[cordova] error: process launch failed: Unspecified
[cordova] (lldb) safequit
[cordova]
[cordova] Application has not been launched
[cordova]
[cordova] CordovaError: Promise rejected with non-error: 'Error code 1 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/agovind/Anupam/IonicWorkspace/cueapp/platforms/ios/build/device/MPT.app'
[cordova] at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
[cordova] at 
[cordova] at process._tickCallback (internal/process/next_tick.js:188:7)
[ERROR] An error occurred while running subprocess cordova.

My ionic info:
Ionic:

ionic (Ionic CLI) : 4.0.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.9

Cordova:

cordova (Cordova CLI) : 8.1.1 ([email protected])
Cordova Platforms : android 7.0.0, browser 5.0.3, ios 4.5.5

System:

ios-deploy : 1.9.2
NodeJS : v8.9.4 (/usr/local/bin/node)
npm : 5.8.0
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255

Environment:

ANDROID_HOME : not set

Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive" with Xcode 10

Cordova -v : 8.0.0
After running cordova platform add ios I see
Using cordova-fetch for cordova-ios~4.5.4
But later sais iOS project created with [email protected]
On macOS High Sierra (10.13.6) and Xcode 10.

I have tried removing and adding platforms. Also, reinstalling stuff as well. I follow the commands below but see error below at build:

cordova create myApp org.apache.cordova.myApp myApp cd myApp
cordova platform add ios
cordova build ios

I get the error below:

Building project: /Users/ben/Desktop/myTest/platforms/ios/myTest.xcworkspace Configuration: Debug Platform: device User defaults from command line: IDEArchivePathOverride = /Users/ben/Desktop/myTest/platforms/ios/myTest.xcarchive

Build settings from command line: CONFIGURATION_BUILD_DIR = /Users/ben/Desktop/myTest/platforms/ios/build/device SHARED_PRECOMPS_DIR = /Users/ben/Desktop/myTest/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/ben/Desktop/myTest/platforms/ios/cordova/build-debug.xcconfig': CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist CODE_SIGN_IDENTITY = iPhone Developer ENABLE_BITCODE = NO GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)" OTHER_LDFLAGS = -ObjC SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

error: archive not found at path '/Users/ben/Desktop/myTest/platforms/ios/myTest.xcarchive' ** EXPORT FAILED **

(node:4984) UnhandledPromiseRejectionWarning: Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,myTest.xcarchive,-exportOptionsPlist,/Users/ben/Desktop/myTest/platforms/ios/exportOptions.plist,-exportPath,/Users/ben/Desktop/myTest/platforms/ios/build/device (node:4984) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:4984) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[ANNOUNCEMENT] Status of Xcode 10 support

A few issues have started to come in regarding the state of Cordova projects on Xcode 10. This is a rough summary of the situation:

Xcode 10 uses a new build system by default (previously available on an opt-in basis in Xcode 9). The cordova-ios project structure is not compatible with this new build system and results in failures.
Officially, we do not claim to support Xcode 10.

Currently the best workaround is to opt-out of the new build system:

  • If you're building on the command-line, you can specify --buildFlag="-UseModernBuildSystem=0":

    # Cordova CLI
    cordova run ios --buildFlag='-UseModernBuildSystem=0'
    cordova build ios --buildFlag='-UseModernBuildSystem=0'
    
    # Ionic CLI
    ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
    ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
    
  • If you're building with a build.json config file, you can add the following under the iOS release or debug config:

    "buildFlag": [
      "-UseModernBuildSystem=0"
    ]
  • If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"

    Xcode example Workspace Settings is under the File menu Change the Build System option to Legacy Build System

    Thanks kitolog for the screenshots!

We're going to investigate what's required to make cordova-ios compatible with the new build system, and hope to include that in the next major version ([email protected]).

Form control cursor stays at the same place on scroll

My app with cordova-iOS version 4.3.1 has a form page with multiple controls. On any control focus, keyboard pops up. On page scroll , focused control gets scrolled but the cursor stays on the screen at the same place for a while, cursor vanishes after the scroll stop.
I have a workaround to keep the cursor out of focus on scroll. But let me know if there is other workaround or it is gonna fix in further releases.

Update Objc-Test for Local & TravisCI

Issue

Running objc-tests locally fails due to the current version of Xcode that is installed.

In most cases, developers may upgrade to the latest stable release of Xcode as they are released.

In my case, one of my macOS environments is using Xcode 9.4, the latest stable release, which supports iOS 11.4. This version of iOS does not support iPhone 5, which is the current target simulator for the objc-tests.

With the current test configuration, running locally causes test failures.
While Travis CI is still configured with 9.2, tests remain to pass.

Goal

This will allow tests to pass successfully on Travis CI and locally when using Xcode 9.3 or higher.

Side Notes:

Travis CI configured with Xcode 9.4 fails to open the iPhone simulator. Therefore I have fallen back the the previous version 9.3.

Xcode 9.4 Test Results: https://travis-ci.org/erisu/cordova-ios/builds/419480866
Error:

$ open -b com.apple.iphonesimulator
LSGetApplicationForInfo() failed with error -10814 while trying to determine the application with bundle identifier com.apple.iphonesimulator.
The command "open -b com.apple.iphonesimulator" exited with 1.

CocoaPods Improvement

Overview:

The purpose of this ticket is to improve Cocoapod support by:

  • Deprecate the framework usage of type="podspec"

The current framework tag type="podspec" provided basic CocoaPods support in the beginning. Continuing to support this method but expand on the tag to support more features will become messy. Additionally, some configurations are not at an individual pod level.

In this case, the best option is to deprecate this method and implement a new method for handling CocoaPods.

  • Improve readability

The new method/structure in plugin.xml will improve the readability.

  • Add missing default configurations

The new method/structure in plugin.xml will also provide the ability to give users flexibility with global pod configuration and down to the individual pods.

Goals

Requirement Proposal

cocoapods cordova build ios fails with linker issues (works pefectly in Xcode UI)

I have been debugging and investigating this issue for almost three days. I am at my wits end and hopefully I have enough information now so you can give me an appropriate answer or we can identify an actual.

First and foremost, I started with SO to do a bunch of research before I came here and posted my own question: https://stackoverflow.com/questions/51772407/cordova-cant-build-from-cli-but-build-from-xcode-xcworkspace-works-perfectly

Here's what I'm finding:

cordova build ios fails with the following

/Users/jpgilchrist/Development/github/soschat/soschat-mobile-3.0/VeociSTAGE/platforms/ios/Pods/FirebaseCore/Firebase/Core/FIRNetwork.m:23:9: fatal error: 
      'GoogleToolboxForMac/GTMNSData+zlib.h' file not found
#import <GoogleToolboxForMac/GTMNSData+zlib.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** BUILD FAILED **


The following build commands failed:
	CompileC /Users/jpgilchrist/Library/Developer/Xcode/DerivedData/VeociSTAGE-awzedsneagcsyzbvjuozwzgwilon/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FirebaseCore.build/Objects-normal/x86_64/FIRNetwork.o FirebaseCore/Firebase/Core/FIRNetwork.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

However, if you actually open the .xcworkspace and then build/run from Xcode it works perfectly! This got me to thinking and a started down a deep rabbit hole. Eventually I tried xcodebuild -workspace VeociSTAGE.xcworkspace -scheme VeociSTAGE and it worked there as well!

This started me down a very deep rabbit hole learning way more about the innards of the cordova build process then I really needed to know (but, hey knowledge is knowledge and I'm happy I know it now).

I found platforms/ios/cordova/Api.js and eventually the xcodebuildArgs and I deduced that a custom xcconfig is being used and I have no idea what in the xcconfig is causing it, but running it with the xcconfig causes my issues. Without it builds.

Cordova build iOS error: Cannot read property 'toLowerCase' of undefined with Xcode 9.4.1

Ionic:

ionic (Ionic CLI) : 4.0.2 (/Users/lzz/.nvm/versions/node/v8.9.1/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.8

Cordova:

cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0, ios 4.5.5

System:

Android SDK Tools : 25.2.3
ios-deploy : 1.9.2
ios-sim : 6.1.2
NodeJS : v8.9.1 (/Users/lzz/.nvm/versions/node/v8.9.1/bin/node)
npm : 5.5.1
OS : macOS Mojave 10.14.1 Beta
Xcode : Xcode 9.4 Build version 9F1027a

Environment:

ANDROID_HOME : /Users/lzz/Library/Android/sdk

Reinstall xcode 10, and such a mistake

Why?

cordova compiling issues with xCode 10

While there is a work-around to get away with cordova build for iOS xCode 10 as mentioned in this post #407
yet there is a limitation that I cannot use --prod flag in the command line options while I use --prod flag throwing compiler errors, my App experiencing more than 2 mins load time while tested in one of iOS devices from TestFlight, I am hoping if I use --prod the load time will come down.

[iOS][Cocoapods] Setting deployment-target doesn't change the iOS version in Podfile

Hi,
I'm working on a plugin which is only working for iOS 10 and superior.
I try to set the deployment-target preference but it doesn't seem to update the value platform :ios, '8.0' in the Podfile.

By checking the code it should be working:

this.minDeploymentTarget = minDeploymentTarget || '9.0';

and
var minDeploymentTarget = self.getPlatformInfo().projectConfig.getPreference('deployment-target', 'ios');

Env:
Mac OS 10.14.1
cordova 8.1.2 ([email protected])
cordova-ios 4.5.5

It may be related to #335

Regards,

Tests fail to find cordova-common

While working on PR 461 i tried to run the tests and got the following error:

[mario@mac13dev ~/github/cordova-ios]$ npm test

> [email protected] test /Users/mario/github/cordova-ios
> npm run unit-tests && npm run test:component && npm run objc-tests && npm run e2e-tests


> [email protected] unit-tests /Users/mario/github/cordova-ios
> jasmine --config=tests/spec/unit.json

DEPRECATION: Setting throwOnExpectationFailure directly on Env is deprecated, please use the oneFailurePerSpec option in `configure`
DEPRECATION: Setting randomizeTests directly is deprecated, please use the random option in `configure`
internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module 'cordova-common'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/mario/github/cordova-ios/tests/spec/unit/Api.spec.js:22:21)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 4
npm ERR! [email protected] unit-tests: `jasmine --config=tests/spec/unit.json`
npm ERR! Exit status 4
npm ERR! 
npm ERR! Failed at the [email protected] unit-tests script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Test failed.  See above for more details.
[mario@mac13dev ~/github/cordova-ios]$ npm -g list --depth=0
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
[mario@mac13dev ~/github/cordova-ios]$ node --version
v10.13.0

This was on macosx 10.13. It's not clear to me whether this is a cordova-ios, general cordova or a setup bug of mine. I was advised to file a an issue regarding this so here it is.

<config-file> isn't reflected in generated Info.plist

Affected version: 4.5.5
Workaround: Downgrade to 4.5.4

The following extract from config.xml is no longer working in [email protected]:

<platform name="ios">
  <config-file parent="NSMicrophoneUsageDescription" target="*-Info.plist">
    <string>We use the microphone to convert speech to text when composing messages.</string>
  </config-file>
  <config-file parent="NSSpeechRecognitionUsageDescription" target="*-Info.plist">
    <string>We use speech recognition to convert speech to text when composing messages.</string>
  </config-file>
</platform>

Expecting values in the generated Info.plist:

<key>NSMicrophoneUsageDescription</key>
<string>We use the microphone to convert speech to text when composing messages.</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>We use speech recognition to convert speech to text when composing messages.</string>

Actual result:

<key>NSMicrophoneUsageDescription</key>
<string>Request to use Speech Recognition</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Request to use Microphone</string>

The scenario above works as expected in [email protected].

Line separator (U+2028) and paragraph separator (U+2029) Got JS Exception SyntaxError

When Objective-c call JavaScript use function stringByEvaluatingJavaScriptFromString: with Line separator (U+2028) or paragraph separator (U+2029), JavaScript will get error.
In CDVUIWebViewEngine.m, function evaluateJavaScript:completionHandler:. The caller may pass in these special characters.Before call stringByEvaluatingJavaScriptFromString:,we can do some filtering.

Investigate & Fix Test with Jasmine@^3.2.0

Overview

With the recent release of [email protected], two of the tests have begun to fail.

The Goal

  • Investigate if the test failures are caused by our tests or a bug introduced by Jasmine.
  • If the issue is caused by our tests, the tests should be updated to work with [email protected].

Error Log

Suite error: Platform Api .prototype addPlugin
  Message:
    TypeError: plugin.getFrameworks is not a function
  Stack:
        at <Jasmine>
        at /Users/travis/build/apache/cordova-ios/bin/templates/scripts/cordova/Api.js:106:414
        at _fulfilled (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:854:54)
        at /Users/travis/build/apache/cordova-ios/node_modules/q/q.js:883:30
        at Promise.promise.promiseDispatch (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:816:13)
        at /Users/travis/build/apache/cordova-ios/node_modules/q/q.js:877:14
        at runSingle (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:137:13)
        at flush (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:125:13)
        at process._tickCallback (internal/process/next_tick.js:61:11)
Suite error: cordova/lib/list-devices run method
  Message:
    TypeError: Cannot read property 'forEach' of undefined
  Stack:
        at <Jasmine>
        at /Users/travis/build/apache/cordova-ios/bin/templates/scripts/cordova/lib/list-devices:40:17
        at _fulfilled (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:854:54)
        at /Users/travis/build/apache/cordova-ios/node_modules/q/q.js:883:30
        at Promise.promise.promiseDispatch (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:816:13)
        at /Users/travis/build/apache/cordova-ios/node_modules/q/q.js:877:14
        at runSingle (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:137:13)
        at flush (/Users/travis/build/apache/cordova-ios/node_modules/q/q.js:125:13)
        at process._tickCallback (internal/process/next_tick.js:61:11)

Recent Reported Issues

Below is a list of reported issues with [email protected]. These can be used to identify if our test issues are related.

CDVAppDelegate - missing application:openURL:options implementation

Our company is using a deep linking feature provided by the customurlscheme cordova plugin. In combination with LSSupportsOpeningDocumentsInPlace set to true, an external invocation leads to a crash of the application with NSInternalInconsistencyExecption due to missing implementation of UIApplication -> AppDelegate -> application:openURL:options method.

Our fallback implementation seems to work here, but is obviously incomplete:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    return [self application:app openURL:url sourceApplication:nil annotation:(NSString*)@""];
}

Is there a default implementation which could be used in this use-case or is there something wrong with our handling of in place document editing?

Thanks in advance. I appreciate any advice how to handle this situation.

cordova-ios and serviceworker

Hi,

is there a way to implement a service worker in a cordova ios app ?
symptom : navigator.serviceWorker do no exists at runtime.

My understanding is that the serviceworker is not available to webapp because of launching files under file:// protocol and webkitview do not allow serviceworker except under https protocol...

My app works fine outside of cordova on Ios device (wep shortcut) but a native webapp is my goal...

Is there a workaround ?

thanks

PS: I'm testing under ios 12 and Xcode 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.