Cordova SQLite Plugin Compatibility - ios

I'm looking to build an iOS hybrid application that also utilizes an Apple Watch application. The watchOS app collects Altimeter data to be stored, and that's it. I was thinking of using this plugin since the watchOS portion is written in Swift. I haven't yet begun the iPhone app, it's just blank right now, but was thinking of making it a hybrid application using Cordova. I've been searching for the best way to share data between the applications, and I think SQLite may be the easiest.
This cordova plugin can be used to manipulate data in an SQLite database using JS. That could be used in the iPhone app. I guess my quesiton is - is this possible? If I create a database in swift using this library, will the Cordova plugin be able to access it? Does anyone have any better ideas for sharing data from a native watchkit app to a hybrid iPhone app?

That will not work. If you create a SQLite database in the watch application running on the watch which is a physically different device than the iPhone running your cordova app, how should the application running on the iPhone access the database?
The way to go to use a watch-kit application in combination with a cordova app is cordova-plugin-apple-watch. The plugin offers three different possibilities to communicate between the watch app and the iphone app:
Message passing
Local notifications and
User defaults
If the data should be accessible by both apps and it should be persistent (like a database) the way to go is probably user defaults. But if you just want to send data from your watch-app to your cordova-app (which will not be needed on the watch anymore) then message passing does also work (the cordova-app can then store the data wherever you want).

Related

Web App accessing iOS camera for QR scanning

For 'check-in' purposes, my staffs have a mobile device (ios and android) that opens my web app through a browser. They then open a page and it allows them to scan a customer's qr code to check them in. I would like it to have as little user interaction as possible. All they staff needs to do is to keep the webapp open, and scan the qr code. The web app will then call an api on my server which check this customer in. So accessing the camera's view is best, i can then run a qr code scanner.
I've been able to do it for android (using getUserMedia) but it doesnt work for ios. (duhhh)
I'm currently using Vue.js(V1), and would like to keep it as it is.
Hybrid Apps: I've looked at OnsenUI(which seems to only work with vue2), Ionic(which doesnt allow me to build/run ios platform as i am using windows).
webapp is coded with vue.js(v1), running on a tomcat7 server, HTML, JS.
Are there any suggestions?
I've found a way to use Phonegap to allow this.
Edit: Phonegap allows you to create a hybrid app that seems like a native app(ios or android). All i did was install phonegap and used one of their plugins (barcodescanner). This is the refrence i used.
But, from my understanding, You'll need to publish the app on the app store, which is a lot of hassle (and cost money).

How to reduce my iOS app's bundle size?

I am working on an iOS app that integrates with multiple bluetooth devices (e.g. printers and barcode scanners). Each of the devices comes with it's own version of SDK and most of them just have objective-c/swift SDKs but not javascript SDKs.
Would like to find out what is the best way to reduce the app bundle size at the same time supporting multiple devices ?
Based on my investigations,
iOS doesn't allow downloading objective-c/swift code dynamically during runtime, hence the option of downloading the SDKs after the user having installed the app is ruled out.
Would like to get a feedback on the feasibility of the below solution. Also let me know if there is a better solution.
iOS version 8+ support embedded frameworks - Have separate iOS driver
apps for each of the supported devices which just installs the device
SDK as a shared embedded framework so that the parent app can
dynamically link to the shared embedded framework if one that matches
the connected device is available, otherwise force the user to
download the respective driver app.
This question has gone unanswered for a little while, so you may have already figured this out, but no, you cannot make shared embedded frameworks on iOS. Only Apple can do that. All of the frameworks you use must be either provided by Apple or embedded inside your app.

React-Native App with a Apple Watch App

I have a react-native based question, we are building a react-native application that will use authentication to call a secured API for data.
This is all built in react-native, however I am wanting to build a Apple Watch app (I know react-native doesn't and won't likely soon support this) So I am planning to go native swift for the Watch App.
My question is, does anyone know if you can use the react-native based authentication and api mapping to supply a json object to the Watch App? I want to simply display a json schedule on the watch from the phone.

Can Firebase work offline with React Native?

I have an existing iOS app that I'd like to start adding some React Native screens to. The app uses Firebase with persistence enabled so that it works offline. Is there a way to also use Firebase directly within React Native while maintaining offline functionality?
If the answer is "Yes", do iOS and React Native share the same local data store? This would be important, so that offline data changes on iOS screens would reflect data changes made from React Native screens and vice versa.
Thanks for sharing your insight on this!
Alternatively, you can use Firestack, which is a native library that works with both iOS and Android on react native.
Offline support is enabled along with storage, the real-time database, authentication, remote configuration (in development), etc.
(disclosure: I am one of the primary authors of Firestack)
Firebase's offline disk persistence is currently only available in its native iOS and Android SDKs. It is not yet available for JavaScript SDK.
The javascript SDK will persist new write requests when you are offline and will sync with the server once you go online. But if you were hoping to show a list with data that was previously fetched from firebase, then you are out of luck with Javascript.
One of the answers mentions Firestack, but it is no longer supported.
On a project I just ended up installing this package https://github.com/invertase/react-native-firebase. It is a bridge to the native ios & Android SDKs for firebase and if you use it you can also use persistence.
Tested and verified. All works great! :)
UPDATE:
It is now possible https://firebase.google.com/docs/database/web/offline-capabilities
OBSOLETE:
As of Firebase JavaScript SDK 3.1.0, offline persistance is still unavailable. It's recommended you use React Native's AsyncStorage.
All of the answers above are out of date!
As of JULY 2020 offline persistence is supported out of the box when you use react-native-firebase.
Read more here: https://rnfirebase.io/firestore/usage#offline-capabilities

Create an iPhone app for personal use without using Xcode or going through the App Store

I want to make a little app just for me. I don't want to distribute it, and don't want to make any money from it, I just need to have this app with me.
I don't have a Mac capable of running Xcode, and I don't want to waste any money on the developer license.
Is there a way I can make an app for only my personal iPhone 4s, without going through the App Store or using Xcode? My iPhone is jailbroken.
A web app might be a better solution.
The short answer is no. You would need a Mac/Xcode to compile/build the application for you. As #Thalecress suggested you might be better off building a web app.
Also check PhoneGap, with it you can deploy your web app in several platforms (including iOS, Android and WP7). Phonegap also offers a build service that you can use to wrap the final web app as a native app to run it on a device (PhoneGap:Buld).

Resources