cordova 2.2 mapkit - map is not showing up - iphone

I am trying to put mapkit in my phonegap (Cordova 2.2) application. I am following all the instructions but when I build the application then I get the white screen with the buttons "show,hide,shrink,zoom,clear" in the bottom of my simulator screen.
Can anyone please help me to how to show the map?

I was having same issue, problem was that I have not entered the plugin name mapkitview in the phonegap.plist file
Also in the js file, sometimes if you have downloaded the older version of plugin, you need to switch between phonegap and cordova as javascript variables.

Related

Flutter model_viewer plugin for iOS not showing anything

I tried to build an AR app using Flutter and model_viewer plugin. It works just fine in Android but when I tried to test it using iOS it is just showing a blank page. I tried to follow the documentation provided in https://pub.dev/packages/model_viewer by adding :
<key>io.flutter.embedded_views_preview</key>
<true/>
but nothing has changed. Can you explain why?
Did you try to insert YES instead of true, beetwen a balise string like?
io.flutter.embedded_views_preview
YES

Flutter : map dependencie crashes the app

I'm trying to use google map with flutter so i'm using the dependencie "google_maps_flutter"
version: "0.5.18"
The problem is when I add the line below (in my pubsec.yaml)-->
google_maps_flutter: ^0.5.16
dependecies img
the app crashes.
Below is the picture of the error. I've tried to look what 15.0.1 and 16.0.1 were refering to but I have no idea.
error img
Good to know :
When I add the above line the following code is automatically added.
changes in the pubsec.lock file after adding above line
Apparently the error was in my dependencie (pubsec.yaml file) It seems location and google_maps_flutter aren't compatible. Either I had to remove one to make the other work.
Edit :
The plugin "geocoder: ^0.1.2" does work. I can successfully display location (lat & long) from typing addresses or by passing lat & long as parameters.
geocoder docs : https://pub.dev/packages/geocoder

Barcode Scanner add button inside scanning page

I have implemented Barcode Scanner for my Ionic project for both iOS and Android.
But when my Scanner starts, I want to add a button inside the view and add an event to it.
I am using phonegap-plugin-barcodescanner plugin
Please help me with how to append something inside the scanning view.
If you want to add stuff to the layout of your scanner, you need to write code in the plugin itself.
YOU CANNOT INTERACT DIRECTLY WITH THE SCANNER FROM THE JS.
In fact, the plugin you use uses cordova.exec in order to launch the scanner view by passing it arguments.
For Android, you just have to know Java and some XML.
For iOS, you have to know Objective-C / Swift.
For Android, you may have 4 files to modify :
plugin.xml : home of all you dependencies
Your_Activity.java : java file which permits to interact with the scanner view itself by calling buttons, textviews, layouts, etc...
Your_Main.java : java file which gets and returns parameters from the js file of your plugin
Your_Layout.xml : xml file in res/layout which is composed of xml attributes interpreted by java
Beside that, I found two good plug-ins for cordova/ionic apps from GitHub :
phonegap/phonegap-plugin-barcodescanner
tjwoon/csZBar
And there's the expensive one, Scandit, which resolves all of your problems for about 200$ per month, check the pricing for every solution they propose.
If you use their SDK, you may be able to interact with the scanner view from js files because of their work, but they're the only company I know to do that. (perhaps ManateeWorks...)
Under this part is what I've been doing since mid-July, in order to give you ideas.
I'm currently making an ANDROID scanner layout for my ionic app.
You can find my GitHub repository here, I forked it from tjwoon's csZBar and I added some stuff my ionic app needs.
I guarantee nothing, but I'm pretty sure I'll implement an iOS layout soon (at least I'll try), and unfortunately I don't really know android / iOS mobile programming.
Here's a screenshot of the layout
I made a "tab bar" composed of 3 image buttons, a "top bar" composed of text views & image buttons. The scanner is embedded between these two.
There are pop-ups for the app's features, which pause the scanner and respond to click events.
See the README and Java files (csZBar/android/) for more information.
Don't hesitate to ask questions and/or inspect my code.
Warning
1) It's currently on development so use it at your own risks (use branch master, not develop)
2) I only modified the android part, not the iOS!
3) It doesn't work for Windows phone...
After adding plugin, installngCordova with bower install ngCordova
Add link to ng-cordova.js JS file above reference to cordova.js:
index.html
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
Also, don't forget to add ngCordova module:
app.js
angular.module('myApp', ['ngCordova'])
Now you're ready to use the plugin like this:
Controller:
var module = angular.module('starter.controllers', []);
module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner, $ionicPlatform) {
$ionicPlatform.ready(function(){
$scope.scan = function() {
$cordovaBarcodeScanner
.scan()
.then(function(barcodeData) {
alert(JSON.stringify(barcodeData));
}, function(error) {
alert(error);
});
};
});
});
View:
<button ng-click="scan()">Scan</button>

what's happens with transition pages in iPhone

why i having a problem in the iPhone but android work good
problem usually occurs between the pages in IOS
for example :
when go to other page usually go and back in the same time without click the back button .
You should use the fix recommended by Ionic team:
https://gist.github.com/IgorMinar/863acd413e3925bf282c
Place downloaded file into www/js folder.
Add script tag in index.html: <script src="js/ngIOS9UIWebViewPatch.js"></script>
Add new dependency in app.js: angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])
More info about that bug: http://blog.ionic.io/preparing-for-ios-9/

Status Bar in iOS 8 using Cordova issue

In the iOS cordova app which i am currently developing the status bar is initially hidden.
Within the app i am accessing Camera and Device Gallery in order to get the images.
for Device Gallery
navigator.camera.getPicture(
successCB,
failCB,
{
quality : 50,
sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
destinationType : Camera.DestinationType.DATA_URL,
correctOrientation : true
});
Whenever i access the device photo gallery plugin, the status bar is visible on top of my app.
Tried using Cordova Status Bar Plugin, used the below code for hiding the status Bar.
StatusBar.hide();
Its doesnt seems to be working.
iOS SDK : 8.1
Any help is highly appreciated.
thanks
the issue is with the success callback of cordova camera plugin.
the below code was not getting executed properly.
StatusBar.hide();
So tried using setTimeout which did the trick as shown below.
setTimeout(function(){ StatusBar.hide();}, 0);
Please refer Cordova Camera plugin iOS Quirks