React native IOS app web-services works on simulator but not real IOS device - ios

I have done with all the settings of my react native project and trying to run on the IOS simulator, it's working fine. Means all the api working properly.
So now I have to share my .ipa file to team members for testing, so creating .ipa file I am using procedure defined on react nativeRunning On Device documentation.
For creating .ipa file using Xcode following below process:-
In Edit Scheme option, change Build Configuration to release.
Clean Build Folder
Create Build.
Archive build.
After that exporting .ipa file using valid certificate.
Solutions I have tried:-
Checked with this solution, because the domain I am using to hit web service is not secured.(It's http)
Enable Transport security flag.
Added main.jbundle (created using command line) to Copy Bundle Resource option in Build Phases.
While adding Alert in api call, getting below error (check image)
Still No luck.
Please let me know, what I am doing wrong?

Please check api server live link is working or not. In my case, I am testing whole api's on local network (In LAN). But when trying with live url, I am also facing this issue.
So that time I made one mistake, that my url should contain http:// but in actual it was https://.
It's pointing to main.jsbundle file, that means it's having issue
related with your code.
So check it once.

Related

Problems loading tdlib on App Store Connect

I ran into a wonderful problem while writing my app in flutter.
I used the tdlib library, which by default for Android is built into flutter, and for the iOS platform it was necessary to compile it via sh script and upload it to App Store Connect with XCFramework, I compiled it, put the folder in the root of the project and the application starts up fine, both from under Android Studio and from under Xcode and works fine in debug mode. But as soon as I upload my application to App Store Connect, Apple starts swearing and saying that my files are not where they should be (namely, dlyb files).
The message from Apple looks like this:
We identified one or more issues with a recent delivery for your app,
"YourAppName" 0.0.22 (47). Please correct the following issues, then
upload again. ITMS-90429: Invalid Swift Support - The files
libswiftDarwin.dylib libswiftMetal.dylib libswiftCoreAudio.dylib
libswiftQuartzCore.dylib libswiftos.dylib libswiftCoreMedia.dylib,
libswiftCore.dylib, libswiftFoundation.dylib, libswiftCoreImage.dylib
aren't at the expected location /Payload/Runner.app/Frameworks. Move
the file to the expected location, rebuild your app using the current
public (GM) version of Xcode, and resubmit it.
I have already tried deleting dlyb files in Runner.app/Frameworks, and moving them, recompiling the .ipa file using various scripts from GitHub, including dlyb files directly, but it doesn't work. The developer wrote in the issue that everything seems to be working (the repository is 8500 commits and is supported to this day), maybe I'm not uploading the application to the App Store correctly? Or did I not connect XCFramework correctly? Maybe someone faced similar?
The XCFramework connection looks like this:

React Native iOS Entitlements file

I'm working on a React Native app that requires use of the camera/photo library. The functionality works in the iOS simulator, however when I test with a physical device I see the following error in the console:
sandbox extension creation failed: client lacks entitlements for path
Based on what I found in the documentation on the Apple development forum, I need to enable the App Sandbox configuration.
This is done by going in Xcode (13.1) to the project > signing & capabilities > click the plus button in the lower-left under TARGETS
When the dialogue box appears, there are various options. However, the sandbox is not one of them.
I found this S/O post that shows the location of the sandbox in the dialogue but does not describe in any detail how to actually add this to a project.
Sandbox extension creation failed: client lacks entitlements? for path:
In the case of a React Native application, how is this done? There is supposed to be a .entitlements file (where I belive the other entitlements should be listed), but I do not see one in the /ios directory in the React Native project or in X-Code. What directory is this located in or if it is to be created, which directory should it be added to? Thanks in advance.

iMessage app, "disallowed nested bundles" error trying to archive/upload with binary framework

I have an iMessage app (not an app with an iMessage extension) in which I have successfully added a binary framework (the project runs just fine on device and simulator)
However, I cannot successfully upload the project to App Store Connect - upload from the archive build returns the following errors:
The relevant text of the error is:
The bundle ... contains disallowed nested bundles. Refer to https://developer.apple.com/go/id=framework-imessage
That link (if you follow the instructions for using an newer Xcode version) leads you back to the link below I used to add the framework to begin with... to run you will need Xcode 11 as I am using an XCFramework.
I added the framework to the iMessage app as instructed by Apple here:
https://developer.apple.com/library/archive/technotes/tn2435/_index.html
(see Embedding a Framework in an iMessage App section)
What do I need to change to the settings for the project or extension in order for the archive/upload process to succeed, while actually including the framework I need? I have searched on StackOverflow, and found a variety of posts related to cocoapods, or around various build settings of "Always Embed Swift Standard Libraries" that do not help.
I have reduced the problem down to a simple sample app you can see here, which builds and runs just fine but cannot be archived and uploaded:
https://www.dropbox.com/sh/jpa4oe7zlnb21wl/AACXkLbxIbayZUtJr3VDwO07a?dl=0
That directory contains a zip file of the project, and an image showing the error encountered.
You have .xcframework in your project. May be you haven't enable Build Libraries for Distribution in Build setting when you have build .xcframework. You can refer this link for this.
Edit:
Error message is Invalid Bundle. So check bundle name of message extension and frameworks which are in the .xcframework.
I've made a few changes regarding the stub app, it seems to work and validate ok.
Remove the Embed Framework from the extension target.
Add the Embed Framework in the app target, set the Destination to 'Frameworks'

Publish Android Application does not work

Just created an .apk with the Publish Android Application option, created a keystore with key and uploaded to the Google Play app store. Everything worked, but when I tried to download the app from the app store i got an error message resembling "The application has an incorrect signature". I thought the "Publish Android Application" part of Xamarin.Studio was supposed to fix everything?
I ran the following command on the .apk afterwards: jarsigner -verify -verbose -certs app.apk At the bottom it said the following: This jar contains entries whose certificate chain is not validated.
Please help, would love to have the app out today :)
My problem was simple. XamarinStudio was setup to use Java1.7, setting it to use Java1.6 fixed it :)

iOS OTA Distribution "unable to download" immediately upon clicking the link

I have an iPad app that we are distributing over the air for QA and Beta testers; we have both a debug and and a release config that we are building. Our build process puts together the website and the PLIST manifest file that that iOS needs to install the app. The release build downloads correctly, but the debug build does not. The only difference between the two manifest files is the application that it's pointing to. I've checked server permissions, signing issues (the same app that won't install OTA can be pushed via iTunes) all to no avail.
Most of the other articles out here deal with the file nearly installing and then choking (that's typically the wrong provisioning file).
Thanks for any help you can provide.
I've gotten this error before when the device has a version of iOS below the supported version of the application.
Check the url on plist file. Make sure it has correct path with http://
It turns out the problem was two-fold. One of the iPads had too old of iOS, and the other was there was a hidden character in the URL
It's also possible that the bundle ID is incorrect. We have multiple bundle IDs so we used to get them mixed up. In addition the icon URL is incorrect. Had that problem too

Resources