Deploying Phonegap 2.x App Development on another Mac - xcode

I used to develop PhoneGap Apps by using 1.x PhoneGap library or Cordova library. After that, I use Cordova 2.x library, and I got confused.
I push my sources to Github and let my friends fork it. We don't know how to deploy the development environment on another Macbook even if that Macbook has the Cordova 2.x library.
First, we found that the project did not have the Cordova lib. So, we Added Cordova 2.x library into the project.But Xcode gave us an error.
If I built Cordova Lib Xcode said :
File
/Users/[MYUSERNAME]/Library/Developer/Xcode/DerivedData/[MYAPPNAME]-gfayprtpflnyaqcwfmepqwlyjglq/Build/Products/Debug-iphonesimulator/libCordova.a
depends on itself. This target might include its own product. build
cordova 2.x Lib
If I build MYAPPNAME Xcode said :
Unknow type name "CDVViewController"

in phonegap folder you find something called update script run it and give it your project adress it should do the job(update references and more) you could find more in phonegap website

Finally I solve my problem by reading this article.
And follow the steps like the author's saying ...
Here is the link : http://zsprawl.com/iOS/2012/10/installing-cordovaphonegap-2-1-for-ios/

Related

Found conflicts between different versions of "System.Numerics.Vectors" in Xamarin Forms 5 project

I'm building a new Xamarin Forms 5 app using VS 2022 17.1.1. Everything in the project appears to be up-to-date.
I've been working on this project for a while and never had this issue. All of a sudden it just appeared today. The last action I took was to install the Plugin.InAppBilling package, thought the package in question is not used by the Plugin.InAppBilling package.
The error is as follows:
All I can see is that the shared project is using System.Numerics.Vectors version 4.5.0 and it seems to be dependency of Xamarin.Essentials which is version 1.7.1 in my project.
However, the version number of System.Numerics.Vectors seems to be 2.0.5.0 in the Android and iOS projects.
I found the GitHub issue here but I'm not seeing any clear resolution to this issue. Even though it appears to be a warning, in my case, I can no longer run the app because I keep getting deployment error to the Android Emulator or actual device. It simply refuses to deploy my app to the device/emulator. So, it's really NOT a warning in my case. It's a show-stopper. I'm a bit surprised about how lightly the Xamarin Essentials folks seem to have taken this issue on GitHub.
Has anyone actually resolved this issue? If so, what's the solution?
BTW, in my case both the Android and the iOS projects are throwing this error/warning and both use System.Numberics.Vectors version 2.0.5.0 even though the shared project has version 4.5.0 installed as a dependency undre Xamarin Esssentials.
I'd appreciate some pointers on how to make this issue disappear. Thanks.
At first, you can try to update the Xamarin.Essentials package in the Android and IOS project with the nuget package manager to the version 1.7.1.
And then, if the error is still here, you can right click the reference and remove the reference of the System.Numberics.Vectors 2.0.5.0 both in your Android and IOS project. Then download the System.Numberics.Vectors 4.5.0 in the nuget package manager both too.

Loading/Building and Running existing Phonegap code in Xcode?

We've created a small project in phonegap on the PC in a www folder. I have moved the files on to the Mac but I can't figure out how to load it into xcode to edit the HTML further and to build/run it in the emulator or on my device.
I've never used xcode before and don't really understand how projects fit and work. I've tried to follow the Adobe Phonegap instructions I can't work out how to open an existing www phongap folder and there's no 'new cordova project' in xocde when creating a project as it shows in the adobe instructions, despite installing node.js, cordova and phonegap as instructed in various instructions I've tried?
I have phongap installed and can create a helloworld app in the phonegap Gui but again, can't figure out how to load it into xcode to build/run? I'm obviously not understanding the how xcode fits in with phonegap etc. and once this falls in to place I'm sure I'll be cooking on gas. Any help would be appreciated :) Thanks :)
cordova platform add ios
and then
cordova build ios
Then you will find the Xcode project folder in your YourApp/platforms/ios/YourApp.xcodeproj within your project. Just import it with XCode.
But Cordova will automatically build your app and emulate it by just using:
cordova run ios

How to upgrade a cordova app and plugins

I have a Cordova (v5.2) app that I run on iOS (platform v3.9.1) and Android (platform v5.0). Is it best to upgrade Cordova from the command prompt, and then manually look for plugin updates, or should I look for plugin updates first then update Cordova? Also, I have recently upgraded from XCode 7.2 to XCode 8 and it is asking me to make changes to recommend project settings, this appears to break thinks. Should I allow XCode to make changes to the project, or should I upgrade Cordova first? I'm looking for a workflow and best way to manage these updates. Any advice is appreciated, thank you.
I would upgrade your Cordova platform first. The main version that I pay attention to is the cordova platform version. So in your case cordova-ios#3.9.1 and cordova-android#5.0.0. These packages are what control the cordova lib that gets injected into your native project. They also determine which version of Xcode you can use.
The cordova-cli pins certain platform versions by default when you run cordova platform add <platform_name>. I usually stick with the most stable release of cordova-cli for my needs and then add specific platforms (usually the latest) manually. cordova platform add ios#lateset.
Any partiular reason you're cordova#5.2, cordova-ios#3.9.1 , and cordova-android#5.0.0?
Infact you can also create a new project after cordova update and add the respective platforms and plugins so that the existing working project will be intact for reference.
If you wanna follow this approach then check out this following SO post. Even that post is related to porting cordova app from one PC to other, the steps still holds good even in this case. Hope it helps.
You should upgrade Cordova first (it's better if you install it globally with npm install -g cordova ).
After that, to update all of your plugins, you just have to remove them and readd them to your project, they will automatically be updated to be compatible with the last Cordova version.
cordova platform remove android
cordova platform add android#5.X.X
If you use the above method, be aware that any changes you made to the android platform folder will be lost (editing the contents of this folder is discouraged).
Alternatively, you may attempt to use the platform update script. For non-CLI projects, run:
bin/update path/to/project
For CLI projects:
Update the cordova CLI version. See The Command-Line Interface.
Run cordova platform update android#5.0.0 in your existing projects.

Attempting to add an MQTT library from NuGet into Xamarin project

I saw that Xamarin was now free and decided to try writing a mobile app using it instead of what another technology I was playing with. After some various hiccups, I was able to get the new Xamarin Android project to build, deploy and run on the simulator. I then decided to try out MQTT connectivity from it before I went any further. No matter which MQTT library I to install from NuGet, for example the System.Net.Mqtt one from Xamarin, I get the following error:
"Could not install package 'System.Net.Mqtt 0.3.12-pre'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."
I tried several others with no success. It does the same for the ios and Android projects. I did try changing the Android SDK version to use for compiling, but still had the same result. I also don't understand why it says MonoAndroid since I thought all the Mono references were changed to Xamarin? I'm using Visual Studio 15 with Update 2. I tried the stable Xamarin version and also tried the latest alpha. I'm not sure what else to try, I'd really to give Xamarin a try for this project. I did some searching and couldn't find anything that appeared to help with this issue.
Thanks in advance for any help.
Use the Package Manager Console. Then, either:
Install the latest version of MQTT library.
Or install first its dependency, RX-Main and then MQTT.
If you still get an error, please share with us the Log that is shown in the PM Console.

Same Jenkins Configuration for 2 Different Jobs

Greetings StackOverflow Community!
Is it possible to have the same configuration setup for an XCode Project and an Appcelerator Project in Jenkins?
I haven't really tried creating Titanium Project, and I'm not sure if it can generate an XCode Project (Like in Unity). If it's possible, can we do a generic setup?
EDITED:
Now I know that an Appcelerator Project builds an XCode project as well. Can we add an additional layer in Jenkins which dynamically determines the project then points the Project directory?
Or would it be best to just have a setup guide for XCode project and a different setup guide for Appcelerator Project in Jenkins? (As I'm documenting a guide, by the way)
Since Titanium indeed generates an Xcode project, you could do pretty much anything you'd do with an Xcode project once Titanium is done. So I'd document the Titanium compile step as a stage before continuing with either a Titanium-compiled or plain Xcode project.

Resources