I'm using ionic CLI version 4.12.0 to create an app, when I use this command ionic Cordova platform add ios
ionic CLI adding the Xcode files of my App, but when I run the App on the real device I get this error
ERROR: Start Page at 'www/index.html' was not found.
and
Internal navigation rejected - <allow-navigation> not set for url='about:blank'
I think my ionic CLI does not generate the www folder files like in ionic3 CLI, is there something missing. www folder is totally empty and not shown in Xcode files
As pointed out in the comments ionic cordova platform add ios will only download the needed tools for iOS.
To build the www directory, run ionic cordova prepare ios after adding the platform.
According to the docs, ionic cordova prepare ios does the following:
Perform an Ionic build, which compiles web assets to www/.
Copy the www/ directory into your Cordova platforms.
Transform config.xml into platform-specific manifest files.
Copy icons and splash screens from resources/ to into your Cordova platforms.
Copy plugin files into specified platforms.
Hi I am trying to compile a program for windows using these instructions on github. I have installed the required dependencies (VS2017, cmake, cuda 8, amd app sdk 3.0).
I have placed the required xmr-stak-dep.zip in my C:/ folder, and the command tree. does line up with what is shown. The files are all accessible.
C:\xmr-stak-dep>tree .
Folder PATH listing for volume Windows
Volume serial number is XX02-XXXX
C:\XMR-STAK-DEP
├───hwloc
│ ├───include
│ │ ├───hwloc
│ │ │ └───autogen
│ │ └───private
│ │ └───autogen
│ └───lib
├───libmicrohttpd
│ ├───include
│ └───lib
└───openssl
├───bin
├───include
│ └───openssl
└───lib
The problem is when the program is finally built by running the commands below; when the program is executed I recieve the error libeay32.dll & ssleay32.dll cannot be found. The command below does show that it did set cmake to that path containing those ddl files.
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl
mkdir build
cd build
I have found this post that does show possibly how to fix this, but I am unsure how I would use the command with my configuration being this is my first time ever compiling a windows program.
As a note, I used the dev branch from here for the source.
There is nothing wrong with your compilation. It's just that your program depends on those DLLs. Windows only looks in certain places when trying to find the DLLs that a program depends on.
This article describes how windows looks for DLLs: https://learn.microsoft.com/en-us/cpp/build/search-path-used-by-windows-to-locate-a-dll
The easiest options are to copy the openssl .dlls into the directory alongside your .exe, or to add the directory containing them to your path. The latter can be done temporarily via set PATH=C:\XMR-STAK-DEP\openssl\lib;%PATH% (presuming the DLLs are under openssl\lib else substitiute openssl\bin)
Im new to native script and ive been to trying to test on device or emulator. thats what im getting.
C:\Users\Muzi J\Documents\tns\HelloWorld>tns run android --device 4TE7N17106003969
Copying template files...
- Installing tns-androidInstalling tns-android
C:\Users\Muzi J\Documents\tns\HelloWorld
`-- tns-android#2.5.0
Exception: The plugin tns-android#2.5.0 is already installed
There are a couple things you can try:
Delete your platforms folder and remove the line item inside the main package.json that has "android": "2.5.x" Then do a tns platform add android
Try moving your code into a folder without a space in it. I've seen some issues recently in the issues where spaces in the name were causing build issues.
I am in the process of learning how to create applications using Qt. I created a small app that is running fine on any machine that has Qt installed. I want to deploy using dynamically linked Qt libraries to Windows. I followed the instructions found here and with some help of other Stackoverflow articles I was able to get the application running without error, but now nothing shows up. There should be a small UI with buttons and such, but it isn't being displayed despite the fact that Windows Task manager reveals that the application is running.
My first thought was that I was missing some dll files, but even if I copy every dll found in C:\Qt\5.5\msvc2013_64\bin, the entire C:\Qt\5.5\msvc2013_64\plugins directory, msvcp120.dll, msvcr120.dll and the plaforms\qwindows.dll to the application directory I still cannot get it to display the UI.
The same application will run on any Win x64 machine with Qt installed. I just don't find asking users to download a 700mb set of tools to run a 9kb application a very robust solution.
What step am I missing for Qt deployment to Windows?
For specifics I have made this an open source project. You can see the release version of the application built in the bin/Win_x64 directory with all .dll files that I believe are necessary to run the application. If you copy that folder onto a Win x64 machine that doesn't have Qt installed then you should be able to reproduce my error.
Edit1:
I was asked to provide the list of files in my build/Release directory:
ArkCharacterSelector.exe
ArkCharacterSelector.res
CharacterManager.obj
Logger.obj
main.obj
moc_CharacterManager.cpp
moc_CharacterManager.obj
qrc_qml.cpp
qrc_qml.obj
Here are the files that are missing from master/bin/Win_x64:
bin/Win_x64
├── QtQuick (both dirs are from qt_base_dir/qml/QtQuick)
│ ├── Controls
│ └── Window.2
├── QtQuick.2 (both files are from qt_base_dir/qml/QtQuick.2)
│ ├── qmldir
│ └── qtquick2plugin.dll
│
│ (Those are only needed for QtWebKit builds)
├── icudt53.dll
├── icuin53.dll
└── icuuc53.dll
And these files can be removed:
bin/Win_x64
└── platform
├── qwindowsd.dll (debug dll)
└── qwindowsd.pdb (only needed for debugging the debug dll)
Happy deployment!
Until now, all of my experience compiling PhoneGap apps has been via the excellent PhoneGap:Build service. However, I now find myself in a situation where I need to compile locally, because I need to use a plugin that includes a binary file, which precludes it from being included for use with PG:B.
So for these reasons, I need to compile locally. "Great!" I thought, I'll just use the new CLI...
I have developed my app, and I can test it on-device via deploy over USB from Xcode, but trying to get a release build, and sign it, with the provisioning profile embedded, has been a nightmare.
For completeness, this is the basic outline of everything I've done, aside from the app development itself.
$ pwd
/users/adam/dev/myapp/mobile/
$ cordova create build_local com.foo.bar MyApp
Creating a new cordova project with name "MyApp" and id "com.foo.bar" at location "/Users/adam/DEV/myapp/build_local"
$ cd build_local
$ cordova platform add ios
Creating ios project...
$ cordova platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.foo.bar
Name: MyApp
Android target: android-19
Copying template files...
<snip>
Project successfully created.
$ cordova plugin add https://github.com/hazemhagrass/BackgroundJS
Fetching plugin "https://github.com/hazemhagrass/BackgroundJS" via git clone
Installing com.badrit.BackgroundJS (android)
Fetching plugin "https://github.com/apache/cordova-plugin-device.git" via git clone
Installing org.apache.cordova.device (android)
Installing com.badrit.BackgroundJS (ios)
Installing org.apache.cordova.device (ios)
$ cordova plugin add de.appplant.cordova.plugin.local-notification
Fetching plugin "de.appplant.cordova.plugin.local-notification" via plugin registry
Installing de.appplant.cordova.plugin.local-notification (android)
Installing de.appplant.cordova.plugin.local-notification (ios)
$ cordova plugin add https://github.com/kdzwinel/phonegap-estimotebeacons
Fetching plugin "https://github.com/kdzwinel/phonegap-estimotebeacons" via git clone
Installing pl.makingwaves.estimotebeacons (android)
Installing pl.makingwaves.estimotebeacons (ios)
For what it's worth, this last plugin is the reason that I have to compile locally.
Now, here's one other potential monkey wrench: This app is actually two apps. It's the same core codebase, merged into two different deployment branches of the repo, one for each client. So each app will have its own id, name, and config stuff. Because of this, I actually have more than one cordova project folder (1 for each final app) and after creating each project through the steps above, I remove the generated www folder and replace it with a symlink to the shared www folder that exists outside of these phonegap project directories.
This is supported behavior; the CLI allows you to generate your app with a symlink via the --link-to flag (see cordova help create for details). However, doing so seems to have issues; so I've resorted to doing all of the app config up front and then replacing the generated www folder with a symlink after everything is ready to compile.
At this point, I can deploy to either the iOS simulator or Android emulator, and I can deploy to devices over USB, and everything works just fine; all of my plugins are available and function as expected. So I'm ready to compile a release build. Android is easy. iOS, not so much.
$ cordova build ios
<snip>
** BUILD SUCCEEDED **
However, this is a DEV build. The generated file is in the build/emulator/ folder, and when I attempt to sign it, I'm told that it's not signed because of the I386 architecture (which indicates that it's a development build).
$ xcrun -sdk iphoneos PackageApplication -v "platforms/ios/build/emulator/MyApp.app" -o "/users/adam/dev/myapp/MyApp.ipa" --sign "iPhone Distribution: {our cert name} ({our cert id})"
<snip>
Codesign check fails : platforms/ios/build/emulator/MyApp.app: code object is not signed at all
In architecture: i386
<snip>
I've attempted to generate a release build from the cordova CLI. I haven't been able to find the --release flag documented anywhere, but the CLI doesn't complain, and it usually does if it doesn't recognize a flag.
$ cordova build ios --release
<same result as previously>
Attempting to sign this build results in the same problem.
At this point, I started attempting to work directly in Xcode. I've set the .mobileprovision file and the signing credentials up appropriately, to the best of my knowledge:
With these values set, Xcode no longer allows me to build:
So I'm stuck: I have no choice but to build locally, and I can't figure out how to get it to build for release and sign! Please help!
Additionally, if I attempt to embed a provisioning profile, that fails because of an issue with entitlements. I'm not exactly sure what this means, but I'm hopeful that it's a result of working with a dev build, and resolving that will resolve this as well.
$ test -e ~/.ios/DEV.mobileprovision && echo exists
exists
$ xcrun -sdk iphoneos PackageApplication -v "platforms/ios/build/emulator/MyApp.app" -o "/users/adam/dev/myapp/MyApp.ipa" --embed "~/.ios/DEV.mobileprovision"
<snip>
error: Failed to read entitlements from '/var/folders/zs/j2hmt69n12sbjm6gyn0m_q4c0000gn/T/tyYvYPQKf3/Payload/MyApp.app'
Update 1:
This SO question helped in one regard. I don't know how the active scheme (I'm not really sure what that means, but that's the tooltip when I hover over the control) got changed as part of specifying keys/etc, but clearly it did. Changing this back to an iOS Device, like iPhone, allows me to build my project, and even Archive (which, to the best of my understanding, means it's creating the .ipa file I need to submit to the app store), but I can't find the archived file. Where should it be? Can I define this in a setting somewhere in Xcode?
Update 2:
By fiddling with certificates and provisioning profiles I've finally been able to create an archive from Xcode, which I've been told is a release build (is it?). Ideally I would like to be able to build from the command line so that I can automate it as much as possible, so that's where I'll be picking up in the morning. Any advice on that front would be quite welcome!
If you managed to create an archive in Xcode, then your signing certificate and provisioning profiles are known to Xcode, so cordova build ios --release --device should make it.
The steps are:
1) Import your iOS developer certificate for production to the keychain by downloading and double clicking on it in Finder (or get it via Xcode)
2) Download your provisioning profile (with the App ID set to the id attribute of the widget element in config.xml) and double click it on Finder so it goes to the Xcode provisioning profile store
3) cordova build ios --release --device
it looks like you're trying to sign the app with a wildcard provisioning profile (the XCode screenshot). Can you try creating and downloading a distribution certificate and provprofile to your Mac? Then import the .cer file in the keychain access app (doubleclicking should suffice) and doubleclick the provprofile as well.
Now you should be able to select the appropriate values from the release dropdowns in the XCode build settings.
Hope this helps somewhat...
Eddy
One other issue I am seeing from your screenshot is I don't think you can Build an Archive (Release) version using the Developer Signing Idenetity, you would need to create a Distribution certificate and use that one for the Release (Archive) version.