Installing Phonegap on iOS - ios

Recently I was trying to install Cordova onto my mac so I can compile for the iphone, but I ran into a problem. The option to create a Cordova project wasn't there on xcode. I looked online and saw that I needed to create the project through the terminal. I did this, but nothing was created as far as I can see.
On the terminal, after dragging the bin folder to the terminal I did: ./create /desktop/ios-program/ com.appname appname
Did I do something wrong? Thanks

here a complete guide is given to create phonegap environment in xcode
http://www.adobe.com/devnet/html5/articles/getting-started-with-phonegap-in-xcode-for-ios.html
if it is not enough than go for this
http://www.kendoui.com/blogs/archive/11-12-27/setup_your_phonegap_development_environment_on_mac.aspx

http://docs.phonegap.com/en/2.7.0/guide_getting-started_ios_index.md.html
These instructions are pretty clear, even if the directory tree you get after extracting the zip file is not exactly the one they show.
After installing all the requirements:
1. extract the content of phonegap-2.7.0.zip wherever you want
2. go to lib/ios/bin and run the create command with the suggested parameters.
3. open the finder and go to the directory you used as first parameter
4. doubleclick the file with extension xcodeproj to open XCode and the project will be automatically created

Make sure that you are inside \phonegap-2.7.0\lib\ios\bin before entering ./create command.
Refer the Blog Tutorial

Related

Firebase Crashlytics | Swift Package Manager (SPM) Run Script?

I want to add Crashlytics to my app using the Swift package manager.
Now, since the usual way to install Firebase is through CocoaPods, the tutorial on how to set up Crashlytics properly is also adjusted for CocoaPods.
In other words - the run script we should copy from the tutorial is not compatible with SPM, as you can see here:
${PODS_ROOT}/FirebaseCrashlytics/run
So how can I find the file location of Crashlytics using SPM to get the correct run script?
Thanks!
Turns out its inside the DerivedData folder:
~/Library/Developer/Xcode/DerivedData/YOURAPP-.../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run
For your convenience, you can use a build variable to generalize the folder path:
${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run
Finally, your run script should look something like that:
And another quite important thing if a non-default name for the firebase configuration file is used.
This flag is needed to denote it:
-gsp ${PROJECT_DIR}/PATH-TO-CONFIG/GoogleService-Info-Dev.plist
Thus final script should look like
${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run -gsp ${PROJECT_DIR}/PATH-TO-CONFIG/GoogleService-Info-Dev.plist
Where PATH-TO-CONFIG is the path to the firebase configuration file in the project.
Thanks for the suggestions. I'm unable to make this work. I get a crash and the following error message:
/Users/[path-to-my-project]/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
I don't understand why it tries to find the crashlytics script in my Xcode project folder and not in the derived data folder at runtime.
This worked for me, but I had to change Project Settings.
"${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
Add a package by selecting File → Add Packages… in Xcode’s menu bar.
Search for the Firebase Apple SDK using the repo's URL:
https://github.com/firebase/firebase-ios-sdk.git
Next, set the Dependency Rule to be Up to Next Major Version and specify 8.10.0 as the lower bound.
Then, select Add Package.
Choose the Firebase products that you want installed in your app.
If you've installed FirebaseAnalytics, add the -ObjC option to Other Linker Flags in the Build Settings tab.

How to export and run iOS project from Kony Visualizer to Xcode?

I am not used to work with kony platform and I have created simple app but I want to export it and run it as native iOS .xcocdeproj.
Kony Visualizer gives you different ways of building and viewing your app, depending on your needs. In Kony Visualizer Enterprise, you can build your app either from the Product menu, or from a command line. And you can view your built app either by previewing it on a mobile device, or by using device emulators and simulators that you configure. Please refer to this docs link to build for iOS using Kony Visualizer.
Please do this below steps.
once Kar file was build. go to your visualizer installation folder and go to plugins and then you can find com.kony.ios_8.2.28.v201811051627.jar file if you are using 8.2.28 version just for example.
Copy above file and rename it as zip file and unzip it.
once unzip was done inside you can find another zip file please unzip. ( ex: 8.2.28.zip)
you can see folder called VMAppWithKonylib.
now go open command-line tool and go to VMAppWithKonylib location.
now go to gen folder location inside your commandline. gen folder will inside VMAppWithKonylib.
7.now run this command - perl extract.pl konyappiphone.KAR
once extract done now go to VMAppWithKonylib and open project in xcode.
let me know if you are facing any more issues.

add new plugin to phonegap 3.4

I'm trying to add new plugin (https://github.com/xu-li/cordova-plugin-wechat) to my phonegap project. but I get stuck on the installation number 1.
For number 1, they said Add wechat lib to your project. Don't forget to add the "URL Type". but I don't know where should I put library files to? which folder? because I know that every time I use cordova build ios command, it will generate new project files in platforms/ios. Should I put library files after generated?
Thank you.
Make sure you have install the required SDK. use command $ cordova platform add ios. Now add the generated files in the project folder. See if this works. Add Cordova command script file if required.

Phonegap 2.1.0 Cordova/CDVViewController.h file not found

I have installed Xcode 4.5 (no previous phonegap version installed). I have downloaded,extracted and created project by Phonegap tutorial : http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS
After the terminal command : ./create myproject ~/Desktop/myproject com.test.myproject I have successfly created structure.
Than i launch xcode and wanna Play this example project. Xcode build Fails and says:
Lexical or proccessor issue 'Cordova/CDVViewController.h' file not found
I tried to add this missing header in to classes folder, repaired the import syntax, but still same problem.
Does anybody solved this problem?/HOW?
After many attempts I decided to read Readme.md and solve the problem using ./update_cordova_subproject!
Create project using:
./create ~/Desktop/project com.example.project project
Update cordova subproject reference:
./update_cordova_subproject ~/Desktop/project/project.xcodeproj
Build successfull now!

Three20 Issues with Build and Archive on XCode 4

I have ported an existing Three20 xcode 3.2 project to xcode 4 using the tutorial
The code compiles and runs on the device. Now, I am trying to build an ipa (using the archive command) and am running into similar errors as this stackoverflow post
The error is:
cd: /Users/[username]/Library/Developer/Xcode/DerivedData/Pulse_News-cnosepsavjismxbmhuvmmvxnnpgh/ArchiveIntermediates/Pulse News/BuildProductsPath/Release-iphoneos/../three20/Three20Core: No such file or directory
Unfortunately, neither the tutorial nor the post have helped much. Is there something I am missing? Is funny that I am able to build the project and run it fine, but not able to build an archive! Please help.
My guess is the "No such file or directory" error message is correct. Considering this, the answer to your question depends on your providing more information about how you have project dependencies and search paths configured in your project.
For self-help, take a careful look at the path it's saying doesn't exist and see if you can figure out why. Note projects within the same workspace share build paths; if you're not using a workspace, you'll need to verify the search paths point to the build location of the other (three20) project.
This is probably the first of your problems. When you upgrade a three20 xcode 3.2 project to 4, you will probably also get an invalid binary message when you upload to itunes.
The only solution that worked for me was to create a new project, re-add all the source files and run the three20 python script with something like:
python /Users/yourpath/three20/src/scripts/ttmodule.py -p /Users/yourpath/YourProject.xcodeproj Three20 extThree20JSON:extThree20JSON+SBJSON --xcode-version=4 -c Debug -c Release
It's a pain to have to do this but it will probably save you more pain down the line

Resources