React Native iOS App, crash on Release Mode - iphone

Hi I am facing an issue when I am releasing my app, I am using the react-native 0.39 , but I have a problem, the app works perfect when I run it as debug mode using react-native run-ios and when I run it from xCode, but when I run as release mode using react-native run-ios --configuration Release the app crash imediatly after show it, but here the problem when I run the app in release mode in xCode the app works again perfect, even all my testflight user have the same issue, i have followed the correct steps in order to deploy:
Generate the local bundle
node node_modules/react-native/local-cli/cli.js bundle --entry-file='index.ios.js' --bundle-output='./ios/myapp/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
Change the url in AppDelegate
jsCodeLocation = [[NSBundle mainBundle] URLForResource:#"main" withExtension:#"jsbundle"];
Copy the bundle and the assets to my project
Any idea why I am getting this issue ?
the information about my environment is the bellow
xCode 8.2.1
MacOS Sierra
BaseiOS 8(I have tried change to each version available in my xCode 8,9,10)
Regards

I have some suggestions maybe they can help you:
Clean the build through Xcode
Click on the project in Xcode and you can see two targets. Normally YOUR_APP and YOUR_APPTests. Check YOUR_APPTests Build phases -> LinkBinary with Libraries. You will need to add libReact.a and libART.a
Try to run 'release' mode in xcode directly and test with simulator see if it crashes. You can setup this in 'Product -> Scheme -> Edit scheme -> Run'.

Related

Error if try build app on apple silicon, m1

have problem with my project when trying to build my app on M1 Pro Mac. If I want to build it on simulator, It's works when I added arm64 x86-64 to Excluded arch in build settings to Debug. But sometimes I need to build app on my device iPhone. And it works only if I delete this strokes in build settings. Could someone help with it? I need some settings to work both on device and simulator without adding/deleting Excluded arch build settings every time when I need it.
Xcode shows errors something like that :
"Could not find module 'Moya' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator" and not only for Moya.

How do I run Release configuration on my device through Xcode

I can test a release configuration just fine in the simulator, but it doesn't work on my device. I can install the app package onto the device just fine, but it won't run directly from xcode. Is there a way to do this?
Go into the build settings for that target and change the Code Signing Identity for Release: Any iOS SDK to a developer profile instead of distribution. This will let you run a release configuration in the debugger. Just remember to revert it back to distribution when you submit!

Xcode is not launching my app for debugging

My iOS project installs fine on the iPhone but the application won't launch automatically for debugging.
I'm using Xcode 4.2 (Build 4C199), the latest version for Snow Leopard (10.6.8).
I've already tried deleting the app from the iPhone, restarting the device, cleaning the project and reinstalled xCode.
Any ideas on how to solve this problem?
In Xcode click on where the project name/Device or simulator version is (On the right of the Stop Button), and select Edit Scheme, on the Run Tab select Build Configuration -> DEBUG, and select a DEBUGGER -> GDB.
In my case, I created a new target and a new scheme by duplicating the existing ones, in order to test my app on devices with on older iOS version.
However, the copied scheme had as executable selected "None":
As soon as I selected the right executable there from the drop-down menu, the app launched.
I was having this problem as well. I removed the option Launch due to a background fetch event in Edit Scheme -> Run Debug -> Options and Xcode started launched the app again.
Hope that helps.
Can you confirm you are signing the app with a development certificate? This issue happens when you sign the app with a distribution certificate.
I've been able to solve this problem by Changing Debugger to LLDB, instead of GDB, on the Run Tab, using Build Configuration -> DEBUG, by selecting Edit Scheme (On the right of the Stop Button).

iOS5 - Setting the deployment target and building

I'm using iOS5 GM Seed and created an application using "story board" concept. Now I want to distribute the app to app store and want to set the deployment target to iOS4.2
The app when tested in simulator, its working fine.
When I'm building it for iOS device using development profile to test on device, its giving error: "Story boards are unavailable on iOS 4.3 and prior"
How to resolve this issue and make my app run on ios4.2 as well.
I ran into the same issue today using XCode 4.2. Here is what I did to get it to build correctly:
Set Deployment and Build options back to 5.0.
Clean the project.
Close the project.
Quit XCode.
Restart XCode.
Debug / Build the project.
Since Apple has officially release the XCode 4.2 :
Try closing the project and reopening it after switching to device from simulator.
Worked for me.
I made it work! I do not know how it happened but in build settings, iOS deployment target settings was iOS 4.2 and that is why i got this issue. I set it back to iOS5.0 and nothing more required. It just got to work.
You officially can't do it - Storyboards are supported in iOS 5 and later and are enabled by default for new projects. If your app must run on earlier versions of iOS, though, you cannot use storyboards and should continue to use nib files

iPhone: iOS 4.3 SDK Simulators stuck up and crashing:

I have updated my Mac to 10.6.7 with Xcode 4. I am trying to build and run some projects which has downloaded from Internet. I set the deployment target as 4.1/4.2/4.3 and device family as 'iPhone' and trying to build and run the application in Simulator. For ex: i downloaded a project from the following link from GitHub:
http://www.icodeblog.com/2010/10/07/cloning-uiimagepickercontroller-using-the-assets-library-framework/
I set the deployment target as 4.1 or 4.2 or 4.3 and device family as 'iPhone' and trying to build and run the application in Simulator. But Simulator launches and stuck up infinitely. I had to do force quit of simulator, i checked so many times, but the same result. But at the same time, i'm able to build and run some other my projects without any issues. This is happening only for few projects when i run.
What could be the reason here? Is there any settings that i need to make-up?
Please advise me.
Thank you in Advance!
Trash your /Users/{Your name}/Library/Application Support/iPhone Simulator/ directory and rebuild the projects you are having trouble with.
#Kirby Todd Answer perfectly correct with a small change
notifications doesn't show/ doesn't scheduled in Simulator but works in device Problm on Simulator 4.3?
Make Sure we put a copy of "User's" folder existed in iPhone Simulator folder
Thank U #Kirby Todd