How to target more latest iOS version

How to target more latest iOS version

I found the latest iOS version available to target is 9.2. Could I change it to 10.2 in case I create a plug-in which require target iOS 10.2 at least ?

P.S. XDK version 3900 on iMac

41 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Use the "Cordova Build Package" export option and modify the config.xml file that is generated by changing this line:

<preference name="deployment-target" value="8.0"/>

Where the "value" will be the target iOS version number you chose in the Build Settings.

Then build with PhoneGap Build or Cordova CLI.

I tried on XDK 3900 on my iMac macOS Sierra (v10.12.3) with XCode 8.2.1, after click <Create Package>, nothing happen and seems it just created the config.xml file without prompt me to save the zip

Attachments: 

I've seen that once before on my machine. It was caused by a bad or missing intelxdk.config.additions.xml file. I thought that issue had been addressed in the 3900 release.

  • Do you have an intelxdk.config.additions.xml file in your project root?
  • If you do, can you attach it to a post so I can check to see if there is a syntax error in it?

Otherwise, what you can do is use this Node.js script to get a similar result > https://github.com/xmnboy/xdk-to-cli < and please read the docs for additional background on how to use PhoneGap Build or Cordova CLI > https://software.intel.com/en-us/xdk/docs/build-xdk-app-with-phonegap-co... <

Here is the xml

Attachments: 

Nothing unusual or a problem in that file. I'll send you a private message for a copy of your project, that might help to understand what is going on.

If you create a project using the "hello cordova" sample does that work correctly? Are you able to export a package with that sample?

I found out the reason. It is because the ios.json, fetch.json, android.json, windows.json contain a plug-in that I previously removed (but don't know why it still keep in json) After I remove that plug-in, it prompts to save zip.

Also, as we using CVS to keep our source, so there are CVS folders in plugins folders. However, I found out XDK 3900 will fail in upload file step when build (use the old method, not create package). So I will remove all CVS folders before build. However, when I use create package, it will not prompt me to save the zip even I put old untouch plugins folder named plugins.o together with plugins folder. plugins.o folder can't at project root.

Thanks for your help.

Quote:

Arthur T. wrote:

I found out the reason. It is because the ios.json, fetch.json, android.json, windows.json contain a plug-in that I previously removed (but don't know why it still keep in json) After I remove that plug-in, it prompts to save zip.

Thanks for that hint. It is normal to see plugins listed in the fetch.json file that are not part of your project.

Quote:

Arthur T. wrote:

Also, as we using CVS to keep our source, so there are CVS folders in plugins folders. However, I found out XDK 3900 will fail in upload file step when build (use the old method, not create package). So I will remove all CVS folders before build. However, when I use create package, it will not prompt me to save the zip even I put old untouch plugins folder named plugins.o together with plugins folder. plugins.o folder can't at project root.

I would maintain the source code control of your plugins outside of your project. For example, create a source-code folder just for maintaining copies of the plugins (and versions) you are using, and apply your revision controls on those files, not on the ones inside of your projects folder. You can always install a revision controlled plugin into a project from a local file, for example, checkout the specific version you need and add to the project using that checked out plugin.

After generate the zip and extracted it to my original xdk project root folder. I follow the guide in how to build by Cordova CLI. However, I found out only config.xml is required and no need the zip because even I cd to the extracted folder from zip and issue 'cordova platform ios', the platform folder is not create in the extracted folder but in my original xdk project root folder and it does the same thing without zip extracted folder (seems platform folder created in config.xml level). Also, I can't generate a signed ipa after issue 'cordova build ios' as it only generate an 'app' extension file in platforms/ios/build/emulator folder.

 

 

Regarding the creation of an IPA when using Cordova CLI, see the second half of this doc > https://software.intel.com/en-us/xdk/docs/build-xdk-app-with-phonegap-co... < I've updated it to help with that issue (more updates to come). Also, see the links to the official Cordova CLI documentation within that doc, they are your ultimate source of information for using Cordova CLI.

Also, see this post from another developer > https://software.intel.com/en-us/forums/intel-xdk/topic/721783#comment-1... <

Seems the doc is mainly same as what I saw last time, so with the same problem but with minor different. Here are the details:

- This time it prompt to save zip even I use the plugins folder with CVS folders.

- I save the zip in different location (not in XDK project), extract it, cd to it

- issue commands

cordova platform add ios (this time the platform folder inside zip extracted folder)

with error:

Discovered plugin "com-mooee-localize-app-name" in config.xml. Adding it to the project
Fetching plugin "com-mooee-localize-app-name@1.0.0" via npm
Failed to restore plugin "com-mooee-localize-app-name" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com-mooee-localize-app-name@1.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/com-mooee-localize-app-name

As com-mooee-localize-app-name is done by us and it already stated in config.xml: <!-- Locally imported plugins may not work if the plugin is private or modified. -->, so I guess I need to copy this plugin manual to zip extracted folder before build, right?

cordova build ios

as the required plug-in missing, so it output same error during build

Failed to restore plugin "com-mooee-localize-app-name" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com-mooee-localize-app-name@1.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/com-mooee-localize-app-name

However at the end, it just generate .app instead of .ipa. What went wrong?

Here are first few lines of build output:

cordova build ios
Discovered plugin "com-mooee-localize-app-name" in config.xml. Adding it to the project
Fetching plugin "com-mooee-localize-app-name@1.0.0" via npm
Failed to restore plugin "com-mooee-localize-app-name" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com-mooee-localize-app-name@1.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/com-mooee-localize-app-name
Building project: /Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/ClinicBooking-pgb-cli-2017-0403-153539/platforms/ios/ClinicBooking.xcworkspace
    Configuration: Debug
    Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/ClinicBooking-pgb-cli-2017-0403-153539/platforms/ios/build/emulator
    SDKROOT = iphonesimulator10.3
    SHARED_PRECOMPS_DIR = /Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/ClinicBooking-pgb-cli-2017-0403-153539/platforms/ios/build/sharedpch

Build settings from configuration file '/Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/ClinicBooking-pgb-cli-2017-0403-153539/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

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

By default, the "cordova build ios" command builds for the iOS simulator that is provided by Xcode. You have to add "--device" to the command to get it to build an IPA. See the doc page, it includes some additional references regarding the creation of an IPA with Cordova CLI, but with the Xcode 8 release it has resulted in a few hiccups in the process.

Here is the text I was hoping you would find in the updated phonegap export doc page > https://software.intel.com/en-us/xdk/docs/build-xdk-app-with-phonegap-co... <:

If you encounter issues when building for iOS, especially an "error 65" message, you are probably experiencing app signing issues. This StackOverflow post may be of value. Likewise, employing this hook.js file by Darryl Pogue may be helpful. Finally, this guide to signing iOS apps may be of interest to the very curious.

Additionally, the --debug and --release and --device Cordova CLI options are not well documented, but are essential for creating a "debug" or "release" iOS build and for directing Cordova to build an IPA rather than a simulator image for the Xcode iOS simulator.

I can build ios with --device --release now after adding the build.json. However, it fail to build for debug by using cordova build ios --device --debug. It just with errors:

No certificate matching 'iPhone Development' for team 'GRFW6393C6':  Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'

** ARCHIVE FAILED **

The following build commands failed:
    Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/DrugsGuide-pgb-cli-2017-0411-14328/platforms/ios/cordova/build-release.xcconfig,-workspace,DrugsGuide.xcworkspace,-scheme,DrugsGuide,-configuration,Release,-destination,generic/platform=iOS,-archivePath,DrugsGuide.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/DrugsGuide-pgb-cli-2017-0411-14328/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/DrugsGuide-pgb-cli-2017-0411-14328/platforms/ios/build/sharedpch

Also it fail to build

cordova build android --device --release

with errors:

Error: /Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/DrugsGuide-pgb-cli-2017-0411-14328/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Applications/MAMP/htdocs/Projects/PuraPharm/XDKApp/DrugsGuide-pgb-cli-2017-0411-14328/platforms/android/src/org/crosswalk/engine/XWalkWebViewEngine.java:55: error: XWalkWebViewEngine is not abstract and does not override abstract method evaluateJavascript(String,ValueCallback<String>) in CordovaWebViewEngine
public class XWalkWebViewEngine implements CordovaWebViewEngine {
       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Try removing the build.json for the iOS --debug build and see if that works any better.

The Android build problem looks like an issue with the Crosswalk plugin. I recommend changing the Crosswalk version number (perhaps just remove the version number so it uses the latest). If you are only deploying to Android 5 and greater devices you do not need to use Crosswalk at all, it's primary advantage, these days, is for Android 4.x devices.

Alternatively, try using PhoneGap Build, it is generally easier to use than CLI.

FYI -- this Cordova doc page may be useful > https://github.com/apache/cordova-cli/blob/master/doc/readme.md#cordova-... <

I know PhoneGap Build, but from their web site: http://phonegap.com/blog/2011/10/13/phonegap-build-pricing-plans-update/

Seems it involves cost. However, I don't know whether I can use the free plan or what is private app / private collaborators. As I'm busy in recent days, I haven't try on CLI yet.

P.S.

In order to use the free plan. Does it mean I need to put our project src to github? If I have 3 projects and don't want to upload to github. Does it means we need 3 private apps?

Quote:

Arthur T. wrote:

I know PhoneGap Build, but from their web site: http://phonegap.com/blog/2011/10/13/phonegap-build-pricing-plans-update/

Seems it involves cost. However, I don't know whether I can use the free plan or what is private app / private collaborators. As I'm busy in recent days, I haven't try on CLI yet.

P.S.

In order to use the free plan. Does it mean I need to put our project src to github? If I have 3 projects and don't want to upload to github. Does it means we need 3 private apps?

The PhoneGap Build free plan includes one "private app slot." Meaning that you can submit the ZIP file we export directly, you do not have to store or submit your app using a public GitHub repo. In fact, you can submit as many apps as you want via that one "private app slot" -- the build system doesn't remember which app you submitted last, so you could submit each of your three apps, sequentially, using a single private slot.

What you cannot do, with a free plan, is use "private plugins." This is a distinct difference between the XDK build system and PGB. In order to build an app that includes "private plugins," on PhoneGap Build, you must have a paid account. Of course, you can do all of this for free if you use Cordova CLI directly, but that requires that you have a Mac to build for iOS and a Windows machine to build for Windows (any machine can be used to build for Android).

Thanks for your information on how we can use the "private app slot." However in order to use it, we need to make our private plugin public. But we don't mind on it as that only use for making the app name multi-lingual. Another option is we need to find out how to make Cordova CLI works. (we do have Mac for generate ipa and we don't need Windows build so far, so this is our choice too if it works)

By the way, is it ok for us to use the PGB once we make our private plugin public? If so, is it just simply put it to github?

See this PhoneGap Build doc page for how to reference a plugin. Publish your "private" plugin to a public GitHub (or GitLab, etc.) git repo and provide the git reference in the <plugin> tag stored in the config.xml file. You can do this via the XDK by using the third-party plugin tool to import your git hosted plugin, add it to your project and then export your project using the Cordova Package Build tile. If you inspect the config.xml that is then generated (after you've removed your private plugin reference added your publicly available git-based plugin) you'll see an example of how to reference your plugin via a public git repo. If the XDK is able to import your plugin via a public git repo it means that PhoneGap Build will also be able to import it.

Just aware as our plugin used for localize the appname and there is no code at all (i.e. no js api provide). It customize the appname by modifiy Strings.xml/InfoPlist.strings accordingly and adding the corresponding locale folders in locales/android or locales/ios

Is that mean I can't use the PhoneGap Cloud Build free plan as this plugin can't simply make public will work.

Quote:

Arthur T. wrote:

Just aware as our plugin used for localize the appname and there is no code at all (i.e. no js api provide). It customize the appname by modifiy Strings.xml/InfoPlist.strings accordingly and adding the corresponding locale folders in locales/android or locales/ios

Is that mean I can't use the PhoneGap Cloud Build free plan as this plugin can't simply make public will work.

I don't completely understand your question. Are you asking:

  • Can your plugin be made public and used even though it does not include any JavaScript?
  • Or are you saying that you do not want to publish it in a public repo because it contains some private information?

If the first question, you can still use PhoneGap Build. The only thing a plugin needs is a plugin.xml file. So to make it a "public" plugin you simply need to publish your plugin.xml file into a GitHub or GitLab (or similar) public repo (that you own, it just needs to be addressable using a public URL) and then specify that git repo as the reference for the plugin. Use my previous instructions to see how to test this.

If the second question (concerned about privacy), and you do not want to publish the plugin in a public git repo, you will have to use a private plan with PhoneGap Build. Or, use Cordova CLI and build on your own system.

No, my question is our plugin only used to localize the app name and it is simply through the plugin.xml to apply the strings.xml and InfoPlist.strings correspondingly. e.g. in plugin.xml, it may like this

  <!-- android -->
  <platform name="android">
    <resource-file src="locales/android/values-en/strings.xml" target="res/values-en/strings.xml" />
  </platform>

  <!-- ios -->
  <platform name="ios">
    <resource-file src="locales/ios/en.lproj" />
    <resource-file src="locales/ios/zh-hant.lproj" />
  </platform>

In other words, after include the plugin, we still need to edit the strings.xml and InfoPlist.strings to the proper app name and create the corresponding locale folder in our plugin (in case different to original of the plugin). As this customization after include the plugin require, even we make it public, it won't work after build as the final app won't has the correct locale app name.

P.S.

for details of the plugin, I make it public in npmjs.org with id = localize-app-name

Okay, I believe I understand now. You need to modify the plugin to include your "locales/android/values-en/strings.xml" (for example) within the plugin folder, which changes as a function of the specific app.

I see a few ways to possibly deal with this with PhoneGap Build (there may be others), shown in order of most likely to work to least likely to work:

  • create a unique version of your plugin for each application and reference it via a GitHub repo, not via NPM
  • create a unique version of your plugin for each application and reference it via NPM, for example:
      localize-app-name-my-app1
      localize-app-name-my-app2
      etc.
  • place the language-specific files into your app, inside the www folder, and reference them from your plugin.xml file using something like:
      ../../www/locales/android/values-en/strings.xml
    this would need to be tested, because it depends on a few things being done in the right order, but it might work
  • use a symbolic link (to do something like above) to reference a file that is outside of the plugins folder (again, like above, this depends on a few assumptions about how PhoneGap Build assembles the project that gets built, as well as depends on the symbolic link getting translated correctly in the process, which can be a big problem).

I have not tested these, but the first two should definitely work. In those cases you are essentially going to create a plugin that is specific to each app you publish.

Thanks for your advice.

I tried to use PhoneGap Cloud Build and it works after make our 'Private' plugin public in npm. Although it is not customized to our target version. But it is good enough to testing the build system. However, I got these issues:

- for ipa, the splash screen won't hide (it works fine for XDK cloud build), but after stop the app and open it again, it shows my 1st screen in the app

- although splash screen will hide in apk case, but it is much longer that expected (now it shows for several seconds where for apk generated from XDK cloud build, it is less then 0.5s)

- don't know why app (ipa/apk) both show the app name not defined in our XDK project build settings: App Name, so I would like to know where XDK get the app name and set in config.xml's <name> </name>

P.S.

extract from config.xml:

<platform  name="ios">
    <!-- prevent screen scrolling for the whole app -->
    <preference name="DisallowOverscroll" value="true"/>

    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <preference name="AutoHideSplashScreen" value="false"/>
    <preference name="SplashScreenDelay" value="1000"/>
    <preference name="FadeSplashScreen" value="false"/>
    <preference name="ShowSplashScreenSpinner" value="false"/>

    <!-- below requires the status bar plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
    <!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
    <!-- status bar overlay for iOS only, if true, navbar height need to add 20px and override original by define in app.css -->
    <preference name="StatusBarOverlaysWebView" value="true"/>
    <!-- haven't try other StatusBarStyle to make the bar text color in black, now it is white -->
    <preference name="StatusBarBackgroundColor" value="#aa3e50"/>
    <preference name="StatusBarStyle" value="lightcontent"/>
</platform>
<platform  name="android">
    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <preference name="StatusBarBackgroundColor" value="#aa3e50"/>
    <preference name="AutoHideSplashScreen" value="false"/>
    <preference name="FadeSplashScreen" value="false"/>
    <preference name="ShowSplashScreenSpinner" value="false"/>
    <preference name="SplashMaintainAspectRatio" value="false"/>
</platform>

 

Quote:

Arthur T. wrote:

- for ipa, the splash screen won't hide (it works fine for XDK cloud build), but after stop the app and open it again, it shows my 1st screen in the app

- although splash screen will hide in apk case, but it is much longer that expected (now it shows for several seconds where for apk generated from XDK cloud build, it is less then 0.5s)

I cannot explain why the delay for the splash screen is inconsistent, but, based on the config.xml snippet you provided, the splash screen will not disappear automatically because the "AutoHideSplashScreen" preference is set to "false" (see the docs here https://github.com/apache/cordova-plugin-splashscreen#preferences).

Based on this info, my guess is that the code that makes the call to hide the splash screen is not getting called (in the IPA case) or is being delayed for some reason (in the APK case). Here is how it is done with the "hello cordova" sample > https://github.com/gomobile/sample-hello-cordova/blob/master/www/js/init... < You might want to make a project from the "hello cordova" sample and build it with PhoneGap Build to see if you get the same results as your app (that it is delayed heavily or doesn't happen). If the "hello cordova" sample works correctly (make sure to add the "false" setting in the "hello cordova" project for the AutoHideSplashScreen preferences to make it equivalent) you can assume that it is probably related to how you implement the call to hide the splash screen. If the "hello cordova" sample does not work, we can use that to debug the issue, as it will likely be an easier set of code to figure out what is going wrong.

Quote:

Arthur T. wrote:

- don't know why app (ipa/apk) both show the app name not defined in our XDK project build settings: App Name, so I would like to know where XDK get the app name and set in config.xml's <name> </name>

The name of the APK and IPA, as it appears on the device when it is installed (which is what I assume you mean), is defined by the <name> tag inside the config.xml file that is exported by the Cordova Build Package tool. See this Cordova doc > https://cordova.apache.org/docs/en/latest/config_ref/#name < for reference. That name should match what's stored in the "App Name" field in the Build Settings. Note that if you have it set to different values in each of the Build Settings screens (Android does not match iOS which does not match Windows), you may not get the one you expected. I believe the tool is configured to favor the Android name over the others, if multiple targets are selected during the export.

- no, it is bug of XDK Cordova Build Package as it used project name (the ? from ?.xdk, ?.xdke) instead of get from App Name in build settings to set <name></name> in config.xml

- could I use variable and value pair of plugin for the purpose of customization after include the plugin?

P.S.

I will try on making "AutoHideSplashScreen" preference is set to "true" and see the effect

fyi: I update config.xml AutoHideSplashScreen to true and now iOS will hide the splash when start up. However, a white blank screen show instead of my app 1st screen.

on Android case, after update config.xml AutoHideSplashScreen to true, the splash screen show time much less (about 2s only). Also, as before, it can show my app 1st screen after close the splash screen.

P.S.

I will try "hello cordova" sample

Quote:

Arthur T. wrote:

- no, it is bug of XDK Cordova Build Package as it used project name (the ? from ?.xdk, ?.xdke) instead of get from App Name in build settings to set <name></name> in config.xml

You're correct, it is a bug. The xdk-to-cli script, however, does the right thing. If you use the xdk-to-cli script you must make sure that you either exit the XDK before running it, or push your app to our backend servers using the Test tab, or switch to a different project (to make sure the current state of the XDK config files get written to disk).

Quote:

Arthur T. wrote:

- could I use variable and value pair of plugin for the purpose of customization after include the plugin?

You might be able to, I'm not sure, you'll have to check to see what can be done with a plugin.xml file in the Cordova docs. Personally, I think it would be simpler to just use the xdk-to-cli script I referenced above.

Quote:

Arthur T. wrote:

fyi: I update config.xml AutoHideSplashScreen to true and now iOS will hide the splash when start up. However, a white blank screen show instead of my app 1st screen.

on Android case, after update config.xml AutoHideSplashScreen to true, the splash screen show time much less (about 2s only). Also, as before, it can show my app 1st screen after close the splash screen.

This sounds like a bug in the apps, you may have to do some debugging with remote CDT. See this doc page for options > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview < If you have access to a Mac, I recommend you use this technique for debugging > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overv... < and for your Android app, I recommend you use this technique > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overv... < also outlined here > https://software.intel.com/en-us/xdk/docs/using-remote-chrome-devtools-t... <

Quote:

Paul F. (Intel) wrote:

This sounds like a bug in the apps

You are right, it is due to <meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-eval' data: blob: filesystem: ws: gap://ready cdvfile: https://ssl.gstatic.com *; style-src * data: 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; child-src * gap://ready; "> in index.html

I need to use gap://ready instead of gap: and put in child-src too

FYI: I finally able to build ios by CLI. Previously fail to sign because I follow doc use "codeSignIdentity": "iPhone Developement" in build.json. However, after check from keychain. I should use "iPhone Developer" (I guess this is default for iOS now)

Now I'm working on android case

same error as before which is

:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/AT/Desktop/ParentPortal-pgb-cli-2017-0523-1876/platforms/android/src/org/crosswalk/engine/XWalkWebViewEngine.java:55: error: XWalkWebViewEngine is not abstract and does not override abstract method evaluateJavascript(String,ValueCallback<String>) in CordovaWebViewEngine
public class XWalkWebViewEngine implements CordovaWebViewEngine {
       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Is there any way to get rid of this error without using phone gap build?

Quote:

Arthur T. wrote:

Is there any way to get rid of this error without using phone gap build?

If PhoneGap Build works, why do you not want to use it? After all, our build system is going away, so building with PhoneGap Build is the right way to go. We have identified the App Name bug and are fixing that; in the meantime, you can use the xdk-to-cli script as a workaround or modify the config.xml before you send to PhoneGap Build.

I'm struggle on that too, although I can use your suggested way in handling our 'private' plugin (make different version in github for our different app) But for CLI case, I can simply copy all plugins to CLI project folder and it will use that instead of get from internet. So I don't need to handle our private plugin and need to submit a version to github for each app (although just do once for each app).

In fact, I'm not concern the app name bug as

1. I'm sure it is simple to fix by your colleagues and most probably available soon

2. before fix version available, I can simply edit the exported config.xml <name></name> to proper value

3977 solved the app name issue when use Create Package in BUILD tab. However, it has different behavior between ios and android version on default app name language. For android case, it will default as the one I entered in build settings. e.g. We customize it with our plugin (npm plugin id: localize-app-name) and only specify values-en for android. So in android case, other than English language, our app will show the app name set in build settings. However in ios case, we specify en.lproj, zh-hant.lproj for the plugin and it will show en.lproj app name whenever device is not Traditional Chinese (not default as the one we set in build settings)

I do not understand what you mean by:

However in ios case, we specify en.lproj, zh-hant.lproj for the plugin and it will show en.lproj app name whenever device is not Traditional Chinese (not default as the one we set in build settings)

Can you provide more details?

Attached is our plugin used for make our app name in different language.

In iOS build settings. We set App Name as 俐學教育學院

Attachments: 

Forget the app name issue I stated for iOS as that is iOS app behavior.
 

How to make our plugin in GitHub repo with different version no. for XDK to select from ?

Now it only get the latest version from repo and there is no choice to change in XDK UI

P.S.

I tried make the plugin with multiple release in repo, but no use.

There are a variety of ways to do this, you could:

You can reference tags and commits as "git ref tags" (a GitHub "release" is just another way of creating a tag or "ref tag"). The plugin add tool provides you with the means to reference a unique git ref tag when you add the plugin. See the very end of this doc page for some help with specifying a "git ref tag" > https://software.intel.com/en-us/xdk/docs/add-manage-project-plugins <

Thanks, it works now.

How other plugin has option to change version?

Quote:

Arthur T. wrote:

How other plugin has option to change version?

I don't understand your question. Are you asking how can you change the version of a plugin? Or are you asking can a plugin change the version of your app? Or???

Leave a Comment

Please sign in to add a comment. Not a member? Join today