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!
Related
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'.
I am using Xcode 4.6.x and the iPad iOS version is 6.1.3. I have added the device in Provisioning Profile. But when i connect it does not allow me to debug.
I have checked the Base SDK, it is 6.1 and Deployment Target is 6.1. I have tried to switch off and restart the iPad, but it's not working yet.
Can anyone help me ?
First clean your project [alt + clean] i.e. Clean Build Folder, Quit xCode, then remove app from your device.
Now build project and run. Delete all data from Derived Data folder. Also make sure you are not using distribution profile.
Hopefully this will work.
Check it once again the device id, add to provisioning profile.
Remove old provisioning profile.
Remove the app from the device. and remove form DerivedData folder also
Than add latest provisioning profile.
Than try to debug hopefully its work.
I'm attempting to install a TestFlight app on XCode's iOS simulator using the iPhone simulator. The link to the TestFlight app takes me to a page that says "This device will need to be registered before it can install betas."
There is a friendly Register button. When I click the register button, it says "Registering Device" and then it takes me to the iPhone's General settings page. If I navigate back to the TestFlight page, it says "Registration Failed."
Does anyone know of a way to install a TestFlight app on the iPhone Simulator? Thanks.
The app you are trying to install is an app compiled for arm architecture, which is different from the simulator (the simulator is not an emulator). The simulator only runs x86 apps compiled for it. You will need to contact the developer of the application to send you the x86 binaries, and add them directly to the application directory of the iOS simulator. The directory (on Xcode 4.5 beta 4) is /Applications/Xcode45-DP4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications. Note that the simulator's sdk version has to match the version of iOS you are trying to use the simulator with.
If you need test your Release application
you can run your on a release build go to
->Product->Scheme -> Edit scheme-> in Run change debug to Release
in this you can check your release build in simulator
If I had to guess, I would presume that since the Simulator is not a valid device, it is not able to install the TestFlight Profiles onto the device, and therefore failing registration process (when you are directed to the iPhone's Settings, it tries to install a profile on your device).
May I ask why you are trying to install the app via the iPhone Simulator? If the app's code exists on GitHub, you can use the GitHub for Mac app to checkout the code, and XCode to compile the project and build it to the iOS Simulator. There should not really be any reason to have to install TestFlight on the iOS Simulator.
i am about to launch app in app store,
i am trying to run code in release mode , i downloaded the release mode profile
but when i compile code from iphone they say
"A valid provisioning profile for this executable was not found."
how to solve this pls help
############## EDIT
now i can run release mode on my iphone but i got this msg
The program being debugged is not being run.
so now can i upload this release file to appstore???
my setting
Code Sign Entitlements:Entitlements.plist
Code Sign Identity: my iphone dist release profile
any iphone dev: my iphone dist release profile
are these parameters sufficient to lauch app??
You need to make sure your connected device is provisioned through the iPhone Provisioning Portal. Check it's status by opening the Organiser in Xcode (Window -> Organizer) or press crtl + command + O.
Your iPhone will have to have a valid provisioning profile on an active iPhone developer account in order for you to run your app on your device.
However, running in Release mode and Device mode are different things, if you're trying to run in Device mode without a certified Device, that would cause this error. It wouldn't matter whether it was in Debug or Release mode though.
You shouldn't be trying to run in release mode. You can't actually do that, it would use the Distribution provisioning profile which can't be installed on devices. (it's used for signing the code for App Store submission)
Create/install the Development profile (make sure you have the correct bundle and device list set) and set "code signing" for Debug to use that profile.
You can compile the code in release but you have to use a Certificate file that you have provisioned for the device. If you use the Distribution Certificate then you can only install the file through the normal distribution channels, (e.g. AppStore)
If you want to run your code in release on your device however you will sign it with the same Certificate you signed it with before. Only sign with the Distribution Cert if you are Uploading it to Apple.
EDIT:
Running in Release should be a fairly easy process.
Setup the project just like you would for debug.
Use the same signing certificate, and your developer profile.
Edit the selected scheme.
And Select Release rather than debug.
You may also want to change the Debugger to None
The rest of the settings should work the same as when you debug.
Therefore if you are using the Entitlements.plist when you run in debug, then you will use them when you run in release.
once again. (DO NOT USE DISTRIBUTION PROFILE)
I'm trying to use Instruments to look at resource usage in my Monotouch app. However, I can't get the app to launch through Instruments.
When I hit the record button in Instruments, the app launches on my iPhone, buzzes (signifying it's a debug build), then crashes - and Instruments reports:
Target failed to run: Remote exception encountered : 'Failed to get task for pid 384'
The app runs fine when I launch it directly on the phone.
I've tried it with debug builds and ad hoc builds (using the parameters defined on the Monotouch support page). Always the same.
I'm using Monotouch 3.2.5, iOS 4.3.1 (on a 3GS), Xcode 4 and Snow Leopard.
I've see this issued mentioned in a few places around the web, but haven't seen a resolution. Anyone know how to resolve it?
It's a signing problem: to run under the control of Instruments, the app is compiled with the Release build settings, not the Debug build settings, which usually means the app is signed with your Distribution certificate instead of your Developer certificate.
The app needs to be signed with a Developer certificate for Instruments to be able to control it.
Change your signing option to Developer on the Release build and you should be fine.
I also ran into this issue with Xcode 4. What worked for me was...
From Xcode 4, run on the connected iOS device.
Launch the Instruments app manually.
Choose my template (in this case TIme Profiler).
Choose my app from the Target menu (to the right of the Record button).
Click the Record button.
The suggested Entitlements solution did not work for me (since Entitlements are evidently no longer required in Xcode 4).
The suggested signing solution did not work either. Also, it would be inconvenient to change this every time I wanted to test with Instruments.
Check your Entitlements.plist for the signed app. If get-task-allow is false, it will prevent Instruments from attaching to the process.
How about launching Instruments from inside XCode? If you're using Xcode 3, it's in the Build menu and then Run with performance tools. This will fire up Instruments and automatically start recording.