iOS Bluetooth background mode change in production build - ios

I have already released my app in AppStore with Bluetooth always enabled in background mode. Now the requirement has changed and now I am removing Bluetooth from the background mode.
With this updated change, when I release the app in TestFlight, the app crashes every time the user opens it. The only way is to uninstall and then install the app. How can I solve this in production build?
Before: in production build
After: Want to release this without app crashing

Related

macOS app is not relaunching if it is getting auto updated in background

We have been facing problems with the app functionality, after their Mac app auto-updates from the Apple App Store. Irony is issue will get resolve once they relaunch the app. Basically the below popup is not coming while app is getting updated & is opened in background (refer attached screenshot). Its happening with mostly all OS version. Any suggestion to relaunch the app when apps get updated automatically while app is running in background.

how to check if app is running fine in release mode?

check app for release mode
I want to know that how can we test an ios app in release mode ,and how to check as it is not possible to run release mode ios, app in simulator so how can we check and what are the steps to do that.and i want to do that without uploading to the app store.
For this you can make Adhoc build or App store build and upload it to Testflight to check feature in release environment.

iOS: app never run on foreground. How do I debug this problem?

Environment:
macOS Catalina 10.15.4
xcode 11.5
iphone iOS 13.5.1
Hello expert, I'm a beginner developer for iOS app development.
I'm developing my iOS app and now testing it on iPhone and iPad.
It works most of the time. So I'm now actually using the app in my ordinarily
life(meaning detaching from xcode).
However, sometimes the app falls into a problematic state.
Occurrence of this problem is once per 2-3 days.
In this state, when I tried to switch the app from background to foreground,
the app behaves looks like crushing, and never run on the foreground.
But, actually the app is not crushed, because I can see the app on the background.
Once the app is in this state, the app never run on the foreground even if
I killed the process and launch the app again.
Since the app is not crushed, I can not see any crush log in my iphone.
Only way to recover this problem is to copy the app from Xcode to the iphone
and launch again.
So here is the questions.
Is there any way to reattach the process running on iOS to the xcode to debug again after disconnecting from xcode on my MAC ?
How should we debug this kinds of problem ?
Any comments/suggestions/advices are highly appreciated.
John
Even if the app crashes it will still be visible in the app switcher since that is just showing a snapshot of your app. But answering your first question you can reattach by plugging your phone and in Xcode going to Debug > Attach to process by PID or Name... there you can enter the name of the target you're debugging, click Attach and as soon as you launch the app in your phone Xcode should begin a debugging session allowing you to better debug this crash.

iOS MDM Kiosk mode

I have a supervised iPad with few applications installed.
When I push a kiosk mode profile for running only single app, iPad switches to single app mode.
What happens if there is an update available to the app running in the kiosk mode?
iOS doesn’t allow any updates in Kiosk mode. So, as an admin, if one needs to update the app, you would remove the app lock policy, then push the app update, and then re-apply the app lock policy.
This post helped me

WatchKit App only starts iPhone Simulator and WatchKit App, but not the IOS App

I have configured the WatchKit App to run on iPhone 6, the WatchKit App Scheme Executable points to WatchKit App.app, Watch interface points to Main, but the IOS App is not starting only the WatchKit App.
When I select the WatchKit App to run on iPhone 6, the iPhone 6 simulator is starting, I see a black screen for a second after that the simulator returns to IOS level but the main app is not starting, only the WatchKit App on the Apple Watch simulator. I can not figure out why the IOS App is not starting?
In order to debug the iOS app while running the Watch Extension, you should follow the steps explained here.
You also need to understand that the iOS App does not have to be running while the Watch app is running. You have several combinations of possible runtime scenarios...all of which your iOS app and Watch App must handle seamlessly.
iOS App is running but not the Watch App
Watch App is running but not the iOS App
Both apps are running in the foreground
Watch App is running in the foreground and iOS App is running in the background
I have also posted some additional information about launching the parent app from the Watch Extension as well as sharing data here.
Hopefully that helps.
If you want to see NSLogs from the container app, you can do this:
put a breakpoint as early in your watch app's processes as possible
run the container app
stop the container app
run the watch app and let it hit the breakpoint
with the watch app running and debugging connected, go to the simulator and open the container app by clicking on it
go back to XCode and go to Debug > Attach to process > Your container app
You should now be connected to both processes, and see breakpoints and logs from both. You can use the thread navigator in the left pane to switch between apps (which you'll need to do to get the watch app running again).
Note that an early breakpoint in the watch app is optional, I just find it useful to make sure any early breakpoints are caught.
There is a bug at the moment which hasn't been fixed yet. To get around and launch the iPhone app do the following:
1) Stop any process in Xcode.
2) Build and run the iPhone app.
3) Stop the iPhone app once launched.
4) Switch to the WatchKit scheme extension and build and run it.
5) Open your iOS app from the iPhone home screen by pressing its icon.

Resources