Created one app using phonegap in Xcode, want to deploy that into multiple platforms like android phone and etc.
Can any one please give the answer, how can i achive this.
Take the contents of the "www" folder of your application and copy them into the "phonegap/lib/DESIREDPLATFORM/sample/www" where DESIREDPLATFORM stands for the target platform (I.E.: blackberry, android, etc). All files should be copied, except for the "phonegap.js" file, which is specific to each platform.
after that, go to the command prompt, navigate to the phonegap "sample" folder, and compile the application with "ant DESIREDPLATFORM compile" (you already know what DESIREDPLATFORM stands for). It will create the appropriate package for the platform.
One way of doing that is to create a repository(either public or private depending on your need) of your assets folder and using the phonegap build app, you can find it here: https://build.phonegap.com. I have tested that and it works great.
Related
I'm creating a RN app that is meant to be some kind of wrapper. It should have multiple targets (like in Xcode) and all its content (images, text, etc.) should be target dependent. Unfortunately, I cannot find any useful informations about how to achieve this without opening Xcode or Android Studio project and create those targets manually (like here). Is there any other solutions for this?
I was still struggling with described problem but I finally found a solution. It's not easy, needs writing a bit of boilerplate code and looks more like a workaround but I hope it will help someone in the future. What I did is I have completed my wrapper app with the resources for one of my targets so I can have visual effect. In the project's root directory I've created a folder with subfolders for each target. Inside each I have put files (images, source code files, other assets) that are target-dependent. Then I've created bash script that takes one argument - target's name. Based on it, it replaces all the target-dependent files from target's subfolder to the original file's destination in the project structure. In this proces all meta-data informations are also replaced so after firing .sh file I can build the app and upload it to both stores. It's really time consuming to create all these apps separately and publish them and it's maybe not the best solution, but at least it works!
On android, you can edit build.gradle files, java or properties, without having to launch Android Studio (which simply uses Gradle)
You can build different type flavours by only changing app/build.gradle
On iOS, that's another story. Project file (.pbxproj) is a mess,and other Workspace/Scheme files are not easy to read or script. So XCode is the way to Go.
I tried to have dynamic target & Info.plist, there are tools to script that like PlistBuddy
in the end, I saw there are many ways to launch a React Native app for developpers. Some prefer the command line, and only VSCode.
Others want to play with native IDE.
By the way, native IDEs are VERY useful.
e.g. : you want to fine-tune your application performance, using XCode view hierarchy debugger or android Studio Layout Inspector (and be sure you don't use to many views), or use any other performance tools these IDEs offer...
In the end, I used react-native-config along with multiple almost similar configs (Info.plist < target < Scheme for each), here's a post giving an overview of the setup.
We have a Universal Windows 10 Platform (UWP) application containing an unmodifiable C library which creates web files in its working folder. These web files are then loaded by the WebView object for display. This architecture is working fine on other platforms, but it fails on UWP due to a lack of write access to the working folder. Apparently in a UWP app the working folder has special ACL protections which prevent creating files. Is there a way to create a UWP app which is permitted to create new files in its own working folder?
Note, we have tried using a different folder but in those cases the WebView object either will not load a file at all or does not load associated xsl, css, etc files. Very frustrating.
Cheers, Bill :-)
There is no way to write to the installation folder. This is by design to ensure seamless differential updates and clean uninstall of apps.
Have you tried setting the current working directory (to local appdata for example) before using the component?
Thanks,
Stefan Wick - Windows Developer Platform
I want to know how I'd be able to package a node-webkit application as an .appx for the Windows 8 Store? I've been able to create an .exe of my application that works as long as it's in the same directory as its .dll's.
Here's how my directory currently looks:
application/
MyApplication.exe
ffmpegsumo.dll
icudt.dll
libEGL.dll
libGLESv2.dll
nw.pak
I'm unfamiliar with Windows development since I primarily use OSX, so I'm not sure what steps to take next to package this .exe as a .appx. Any help is appreciated.
I had worked with node-web-kit once, and I remember that your node app should have index.html file. WinRt apps are supporting Html5/Js. Try create WinJs app, put all files from nw.pak into project directories(html/css/js) and add your extended library like references to your project. I'm not sure about adding extend libraries, winJs app can give an error.
I'm unable to get Xcode to copy over www resources to my PhoneGap based iPhone app. I considered using Git submodules, but since the app has to work on different platforms (iPhone, Android, etc) and has to be branded differently (images, css, and small changes to some files), it does not solve the complete problem.
I ended with a solution where I created an external core www folder and created symlinks for every file from the different projects. If a file needed special attention on a platform or for a branding requirement, then I could simply replace that instance of a symlink with an actual file.
This all would work like a charm, but for some reason Xcode for does not copy the symlinked resources over to the phone. Does anyone have any idea how to make this work? Or a solid alternative. Even if this takes me a day to fix.
Thanks.
This solution worked perfectly to pull in the symlinks on build. Using this method you can build Phonegap solutions for all platforms and have them branded differently with the absolute minimum code duplication.
In short, create a common directory that contains all your phonegap www contents, and then symlink this from your different projects (platform differences or branding differences). For building on Xcode, add the following to your project's run script:
rsync -pvtrlL --cvs-exclude \
$PROJECT_DIR/../Resources* \
$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH
Note: You also need to dereference symlinks if you build for BlackBerry.
I just want to say that using symbolic links shouldn't be necessary. You can simply drop the folder into xcode, and DO NOT copy the files.
In my case, my shared folder was called "mobile", so I did have to create this run script:
mv $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/mobile $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/www
This simply renames the directory so Cordova can find what it's looking for.
I am writing a Cocoa application that makes use of the ParseKit framework (http://www.parsekit.com/). I've included the Framework in the proper folder, added a Copy Files build phase, and added it to the build phase. I can build and launch the application on my Mac.
However, when I try to run it on another Mac, it crashes. The Console shows the following error message:
dyld: Library not loaded: /Users/Jordan/Files/ParseKit/build/Debug/ParseKit.framework/Versions/A/ParseKit
It looks like when the app launches, it is looking for the framework on my local drive. However, the framework is in the Copy Files build phase, so it has been copied into that application's Contents/Frameworks folder. If if the application were looking in this folder, it would be able to load the framework just fine, but for some reason it's looking for it on my local drive on the original Mac (which obviously doesn't exist on the other Mac).
What am I doing wrong?
Use install_name_tool to change the framework’s install path to “#loader_path/../Frameworks/”.
Since it sounds like you're building it from source, set the install path in its Xcode project. You should submit a patch to the original developers once you get it working (partly to make it easier for you to keep up with future updates to the framework).