InAppBrowser not launching - ios

I've installed Phonegap using the npm and my app is working great, except when I call window.open to launch a website it does not give me the footer with the done button so my app get's stuck on the called web page.
I am using XCode to build an ios app.
I've used npm to add the InAppBrowser plugin. It added the to to the config.xml.
I've added the site to my whitelist in config.xml. The site opens fine, just without the done button/footer.
It added the InAppBrowser plugin entry to:
/#myapp#/platforms/#platform#/www/cordova_plugins.js
It added the InAppBrowser plugin folder in /#myapp#/platforms/#platform#/plugins/
The related SRC files for InAppBrowser are in the platform folder as well
(for example IOS plugin src files are: /#myapp#/platforms/#platform#/#appname#/Plugins/)
I added a console.log function to InAppBrowser.js to confirm that the plugin is loaded, but it does not generate a log entry.
I've tried many things to get the footer/done button to show without any success, but I seem to be missing something here.

I solved this problem by recreating the Xcode project using cordova (instead of phonegap). I went through all of the solutions several times with no luck, so I used the terminal to build a new cordova project, added the InAppBrowser to the project, then copied my code and assets from the old project to the new one. Launched the app on my ipad and it all worked just fine.
I don't suspect it's a problem with Phonegap 3.1.0. I think there was a project issue that kept it from working and starting over with a clean project did the trick.
All is well.
One note is that I saw postings that reported cordova interrupts the console.log function, so be careful with that. Alerts work just fine.

Related

Angular route is not working with Cordova iOS

I'm facing an issue with Cordova, Cordova-ios 6.2.0 and Angular 12.0.
When I'm building my app with Cordova and launch it in an emulator (or with a device), I'm arriving to a white screen.
I did some research and try some "fix" but nothing worked.
Finlly, I've find that it could be because of the balise.
So, I tried to play with the tag and modify the href with ., ./, / but nothing worked.
I've tried without and it worked, but without routing.
Has someone already had this problem?
The Angular router needs the app to be hosted on a "proper" HTTP scheme and does not work with file: URLs. You can check how your app runs, if you open the JavaScript console for your app running on an iOS device with Chrome and typing location.href. If you see file: you need to set up a custom scheme.
Please checkout the documentation and this announcement https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html

Selected folder doesn't contain a config.xml in phonegap

I am using windows 7 .my antivirus is now disabled. I want to build a hybrid app. i downloaded phone gap. when i creating new phone gap project their shows "Selected folder doesn't contain a config.xml ". I tried lot of time but i cant able to create a project .after seeing this message selected folder contain 4 folders but it is empty. I want to built a hybrid app but i am stuck in beginning stage.so please help me to solve problem.
i am attaching screenshot of project creation and error message .1st screen shot is how i created project.2nd one is error message when i click create project.3rd one is empty folders created in selected folder for creating project.
When i select a folder with config file it show below error...
It helped me to create the project through the PhoneGap CLI and then just add the project in the Gui. That worked for me
Install phonegap Cli with npm: npm install -g phonegap#latest
Go to your project folder and create the project: phonegap create testproject
Start the PhoneGap Desktop App and add the existing project
We've pinpointed the issue, there seems to be have been a recent change to the template and it seems to have a compatibility issue with the connect-phonegap create API which is used by PhoneGap Desktop to create projects.
We're currently working on a fix.
In the mean time you can also use the PhoneGap CLI as an alternative.

iOS App icon and Splash screen aren't updating for PhoneGap Project

I am using PhoneGap 3.4.0 to create an app.
Within my Phonegap project I have added my own custom app icons here:
MyProject/www/res/icon/ios/icon-57-2x.png
MyProject/www/res/icon/ios/icon-57.png
MyProject/www/res/icon/ios/icon-72-2x.png
MyProject/www/res/icon/ios/icon-72.png
And I have added my own custom Splashscreens here:
MyProject/www/res/screen/ios/screen-ipad-landscape-2x.png
MyProject/www/res/screen/ios/screen-ipad-landscape.png
MyProject/www/res/screen/ios/screen-ipad-portrait-2x.png
MyProject/www/res/screen/ios/screen-ipad-portrait.png
MyProject/www/res/screen/ios/screen-iphone-landscape-2x.png
MyProject/www/res/screen/ios/screen-iphone-landscape.png
MyProject/www/res/screen/ios/screen-iphone-portrait-2x.png
MyProject/www/res/screen/ios/screen-iphone-portrait.png
MyProject/www/res/screen/ios/screen-iphone-portrait-568h-2x.png
I then run this via command line in the MyProject folder:
phonegap build ios
The app seems to compile correctly and I can open the app in xCode and run it in the iPhone simulator, the problem is that the simulator still shows the Cordova default app icon and splashscreen.
I have also replaced the files in the below directress before and after running phonegap build ios but that doesn't seem to fix it either either.
MyProject/platforms/ios/My Project/Resources/icons/
MyProject/platforms/ios/My Project/Resources/splash/
MyProject/platforms/ios/www/res/icon/ios/
MyProject/platforms/ios/www/res/screen/ios/
I've read over the documantation for Icons and Splash Screens but can't seem to figure out why it's not working for me.
Am I missing a step? Should I be running a different command?
Looks like I was doing everything correctly, however in Xcode, I needed to go to:
Product > Clean
...to clear out any old settings and cache.
I found this answer here -> https://stackoverflow.com/a/18868704/647621

Sencha app with Cordova on Xcode

I am trying to build a ios package using sencha and phone gap. I followed the steps here http://vimeo.com/56673251. I am able to build and run the package on ios simulator. However, I can only see the index.html page. All the model, view and controller folders with js files created by sencha are not copied there. So, I am not able to run the app which i built using sencha.
When i click on the app/view/Main.js i get error The requested URL was not found on this server.
Any help on this would be great.
I think that the problem is that they expect you to run only the "production" version of you app inside cordova. When you set production the microloader is not used and everything is compiled into one file instead. That should solve the issue.

phonegap FBConnect Plugins some steps troubles

I started developing the iphone app using phonegap >>
I have used phonegap before for android app>and also fbconnect for android but for ios I am not able to configure it>> I gone through many tutorials and Questions from stackoverflow>
I am following this tutorial
https://github.com/davejohnson/phonegap-plugin-facebook-connect/
and every things goes right but the steps 11 to 14 >> and last ios URL SCHEME
thats are the steps which are confusing me aND I AM UNABLE TO COMPLETE THat steps>>
and if I compile without thats steps>>
its giving the following error>>
error: Cordova/CDV.h: No such file or directory
#Geeniewanted :: this is the screen
For 11. If you click on the top-level 'phonegapFacebookApplication' in your project navigator (with the blue x-code project icon to it's left), that should show you all the project settings on the main center window. There you will find a tab that says "Build Phases", and within that, you'll find an option to add Link binaries with Libraries. #Geeniewanted has nicely written out a solution to that above.
I should warn you though that if you're using the lastest PhoneGap Build, or Cordova, you'll notice that there isn't a Cordova.plist anymore. That is because with PhoneGap 2.3.0 they've changed that to the 'config.xml'. And so you'll have to add your plug-ins to there.
I would recommend that you follow the video tutorial from Facebook-Dev to set up your Facebook iOS SDK within x-code: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/#project
you can use the following link to use the childbrowser plugin and facebook
http://www.drewdahlman.com/meusLabs/?p=88#comment-1544
it's possible to update this to the new inappbrowser

Resources