Build an iOS app & Node.js API simultaneously - ios

I'm building an iOS app that communicates to a Node.js API I'm also building. Locally, everything is ok, I've structured my iOS code in a way that I only declare the API base URL in one place (ie. 192.168.0.3:5000 - local).
However, you can imagine where I'm going with this.
Once I deploy the API to Heroku, what's the best way for me to manage the iOS side of things in regard to: 1. testing locally with the local API, 2. deploying the iOS app to the app store (ie. how do I tell it to use a different API URL?)
Any advice would be great on setting up a sane development environment for this...

In your XCode project, configure the "debug" version to use the local api and the "release" version to use the web api.

Related

Flutter. Applying a different configuration for Testflight and the App Store

The task is to use different API URLs inside the Flutter application for the app installed through the Testflight and for the app installed through the App Store.
Libraries like: store_checker and detect_testflight
do not give 100% results, and I cannot be sure that they will not stop correctly detecting the installation source after the next update.
I also cannot rely on the kReleaseMode constant, since there is no way to create a build that compiled in debug mode and uploads it on a Testflight. This can only be done in release mode.
Using custom configuration files and setting up the .gitattributes file also seems like a perversion, and is not suitable because, besides the local repositories of many developers, bitbucket is used, in which I cannot add my merge driver. Also, there is no guarantee that other developers will use this driver.
Tell me a simple and concise way to implement this? Didn't Apple come up with the idea that developers would need to use different settings for builds in Testflight and in App Store?

Deploying React Native Apps directly to devices for testing

I'm looking into the best ways to deploy React Native apps to devices for testing. We don't want to put the app on the app store yet, but we do want the app to be downloadable to, say, an iPad.
What is the best way to do this? Do I need a testing platform or something like diawi? Or can I just put the file in an email and install it from there?
Anyway for deploying an iOS application, you have to follow the standard developer portal process. If you already did that then all good to go otherwise you just need to follow this tutorial.
Once you are done with code signing create a build using XCode Archive. This will generate .ipa file for you OR you can upload that to the testflight. If you want to skip testflight, there is one more tool available called diawi.Diawi gives you a link instantly using which you can deploy the application on test devices.
For iOS apps, test flight is the best way to go about this. https://developer.apple.com/testflight/
for Android , use internal testing and beta testing of google play
check android documentation of internal testing here
for IOS,use test flight

Moving Firebase (GoogleService-Info.plist & API Key) to Production on iOS App Store?

My question revolves around how to transition the information in the GoogleService-Info.plist file to Production (i.e. deployed on the iOS App Store)?
My predicament is pretty simple: I am developing a native iOS app in Swift. I am using Firebase ML Kit (Google Cloud Vision API). When I first set up my project in Firebase, I was prompted to download the GoogleService-Info.plist file, which I did. It is on the Desktop on my local computer, and all my local development works fine.
But, now I am ready to deploy this app to the App Store. Obviously, the App Store app is not going to fetch the credentials from my local Desktop. I am confused on how to transition my credentials to Production. I have read all of the Google Cloud docs (Securing API Keys, Service Accounts, etc.) but I have not found a simple, well-explained solution on how to approach this. If you are able to explain this to me as opposed to link to one of these resources that would be incredibly helpful. Thank you very much.
So, already you have a iOS project configured for GCV API. If the FCM development account and production account are same, the GoogleInfoServiceInfo.plist going to be same. So no worries. You can move to production with same file.
If production account is different, in the new production FCM account you have to configure the iOS app in the FCM API console for accessing the GCV API, download the plist file and replace it with the old one in same path. It should work perfectly.
Make sure to backup your old plist file before replacing with new one.

ReactNative - Why does a React Native App need to connect to Local Host?

I have been reading a book on React Native that builds a simple React Native App for IOS in the first few chapters. When compiling and running the project in Xcode, a packager runs in the background and I can also see my app trying to connect to local host.
My understanding is that React Native converts JSX elements to platform specific views. So my question is why does the App need to connect to a server and what is the purpose of the packager running in the background?
Also, how is running the app on an Xcode simulator different from deploying it on the app store?
I have tried to look online for answers, but no one has addressed them. It seems everyone is taking it for granted that all this is obvious.
After looking for an answer, I stumbled upon the following guide from Facebook that answers a different question but also addresses mine indirectly.
So apparently, the localhost is a development server used to link your javascript code to the app, which you use if you are testing on a physical device or a simulator. So the question that comes to one mind after reading this is why not bundle that javascript code with the compiled IOS files? Well, it is best to keep them separate because it enables you to simply change your javascript code from your computer and have it automatically sync with your IOS app.
Now, when it comes to deploying to the app store, you will need to bundle the javascript code and remove the implementation part where it connects to a localhost, which, again, is used for debugging purposes.
You answered your own question it appears! In development mode, the JavaScript bundle is served from the react-native packager server on your machine.
When making a release for the App Store and Google Play, the JavaScript is minified and bundled into the app file (.ipa/.app for iOS, .apk for Android).
Running the app in release mode is possible from Xcode. Depending on how your project is set up, release mode could be a different target, a different scheme within one target, or a build configuration within a target's scheme. For more on iOS targets/schemes, see: Xcode: What is a target and scheme in plain language?

Access a Qlikview dashboard on an iOS app

I have a Qlikview dashboard that I need to present and I've created a site that loads the Qlikview server onto the browser and runs it from there.
I now need to create an iOS app that does this. But the requirement is that the dashboard shouldn't open on the browser. The server should be loaded and run from the app itself. Is there any way to do this?
PS, I'm completely new to iOS App development and any help will be appreciated.
Yes. While saving it as a shortcut and opening it in the browser would be simple, using Apache Cordova is the best way to develop a smartphone app with HTML5/CSS/JavaScript. From the website:
When using the Cordova APIs, an app can be built without any native
code (Java, Objective-C, etc) from the app developer. Instead, web
technologies are used, and they are hosted in the app itself locally
(generally not on a remote http server).
And to make things better, it's open source.

Resources