How can I test a build while developing a feature without updating to the testflight or any other testers - react-native

I am developing an app. I need to test my build before handling to other testers. How can I automate that and how can I build this.
Note: Now I am using testflight to upload (fastlane) my build to the testers. But If I upload this the other testers giving feedbacks. Here I need to test it thoroughly in real device and then I need to submit under testflight.
Can anyone have any idea how can I test it internally before giving the build to testers?
Also, If I archive the file via Xcode to generate ipa file does it make any certificate issues while generating the ipa and installing in real device.

I would suggest to build an ipa file for Ad-hoc deployment since you want to test it internally and if you are in a hurry.
If you have more time. You can update your iOS fastlane Fastfile to increment the build number using "increment_build_number" to prevent override:
desc "Push a new release build to TestFlight"
lane :beta do
increment_build_number(xcodeproj: "sampleAppFLwk.xcodeproj")
match(type: "appstore")
cocoapods
build_app(workspace: "sampleAppFLwk.xcworkspace", scheme: "sampleAppFLwk")
upload_to_testflight(
skip_waiting_for_build_processing: true
)
clean_build_artifacts
end

Solution 1: XCode
You can make a release build from within XCode and run it on local device. Make sure your scheme is configured for release. Go to Product > Scheme > Edit Scheme > Run > Info, set Build Configuration to Release, and uncheck Debug executable. Note that you need the correct certificates to make a release build like this.
I don't know how you could automate this however, so solution 2 might be better and definitely more scalable.
Solution 2: TestFlight Groups
TestFlight lets you have multiple test groups. This means a freshly submitted build doesn't necessarily have to be visible to all testers. Read more about creating groups and adding groups to a build here
Hope this helps :)

Related

Cannot select latest uploaded version to add to testflight

I cannot select the latest version I have uploaded to seed to beta in external testing. First of all whenever I upload a build two version appearing, that have upload time difference of 5 to 15 minutes between them. One of them gets changed from processing to normal available state, but other does not. But now selecting the available build also selects the processing one and my selection is blocked and I cannot select the OK button because probably my selection is blocked by the processing one. I think it is UI frontend issue at itunesconnect side but it could be something I am doing wrong. Please help me if anyone has been able to tackle this issue if they faced. Please see checkout the attached image.
Update:
I Included <key>ITSAppUsesNonExemptEncryption</key><false/> in my subsequent builds that I uploaded according to the new Export compliance message on the iTunes Connect home page. I am still facing the issue. I have contacted Apple Dev support, will keep you updated if I find a solution.
The issue has been mysteriously solved by uploading the application from Application Loader with Aspera turned off instead of using Xcode's organizer window as suggested by Apple Developer support. Make sure you add: <key>ITSAppUsesNonExemptEncryption</key><false/> in your info.plist file before archiving the build. Although mysteriously my previously uploaded builds have also become available for external testing.
Body of email that helped solve the issue:
After further research, it looks like their may be an issue from your
end with your network while trying to upload to this app record in
iTunes Connect.
First, for the best upload experience make sure that all ports and IP
addresses are accessible. Additionally, it’s important to make sure
the internet connection is very good, and that there are no firewalls
blocking the uploads. More information can be found here:
http://help.apple.com/itc/apploader/#/itc8e7ec5a60
Second, it may be beneficial to try using the latest version of
Application Loader. Please note that you can export your project from
Xcode to upload through Application Loader. As a temporary workaround,
once you have Application Loader open, you can go to the File menus
and select the following:
Application Loader > Preferences
Then, select Advanced, and as a temporary workaround you can try
deselecting Aspera and upload the build again. You can follow the
steps below to use the latest version of Application Loader.
Download the latest version of Xcode from the Mac App Store:
-http://help.apple.com/itc/apploader/#/itc8e7ec5a60
Open the latest version of Xcode
Go to the File menu and select Xcode > Open Developer Tool > Application Loader
Lastly, try uploading again to see if the issue persists.
Hello my dear friend there,
I am also having your issue yesterday, I have this similar screen with yours:
The build is duplicated which one of them are processing forever until today.
My personal problem solving was:
Increase my build number in Xcode so that I can reupload my build
Rearchive the build then export for iOS App Store Deployment in Xcode Organizer
Reupload the build using Application Loader
Then try to reconfigure the build in iTunes Connect. For a while it is processing like usual, but it will not take forever, after one hour, the build will be available for testing.
Hope my personal troubleshooting can be applied to your issue too.

How does a Cordova app build know what CodePush environment is applicate?

I have a CodePush app that has three deployments: testing, staging and production.
I have different app builds that align with these:
A build that does out to testers (testing)
A build that goes out to a group of preview users (staging)
A production build (production).
How does CodePush know what deployment it should be sending to a build?
And how do I set up my app to make sure the right build (e.g. staging version of app) is getting the right deployment (e.g. staging deployment in CodePush)?
The CodePush server knows which deployment you want to query for updates against based on the deployment key which is configured in the config.xml file or is passed to the call to sync (with the later taking precedence). If you want to generate three separate builds for QA/staging/production, then you simply need to make sure you update the deployment key that is set in your config.xml file before running cordova build to generate the APK or IPA file.
Unfortunately, Cordova doesn't really have a standard way of defining multiple environments, which would allow you to add your per-environment keys to the config.xml and have the right one be selected when doing an environment-specific build.
Depending on how your app is structured, you could also skip the config.xml file completely, and just pass the deployment key directly to the call to sync(). Then, you just need to make sure your app defines all the neccesary keys in a config somehow and loads the correct one for each build. You can take a look at this starter project for an idea of how this could be generally done.
I have configured CodePush for my dev, test and prod environments. But my application is a react-native one. I think the same will works for Cordova as well.
The important point is CodePush identify particular app by it's CodePushDeploymentKey. First you should create 3 channels on AppCenter for dev, test and prod. Then setup CodePush on those 3 environments and Get relevant CodePushDeploymentKeys.
Then you have to add those 3 keys for 3 different targets on your app. For iOS you can create 3 different targets on Xcode with 3 different plist files and add those different CodePush keys in relevant plist files.
For android you can create 3 different Product Flavors for dev, test and prod and then add DeploymentKeys on each flavor.
In this article I have explained everything step by step with all the screenshots and links.

Setting up xcode configuration/scheme for beta distribution

I'm trying to create a way to be able to distribute a beta version of my app via Testflight without overwriting the production version. I'd like to be able to know in the code whether it's a beta build or a production build (i.e. somehow define #if BETA_VERSION, similar to the global DEBUG variable), and I'd like to be able to differentiate it with a separate app icon on the springboard, as well as a different app name (i.e. MyApp Beta or similar).
I set up a beta configuration by duplicating my release configuration, and I already have a provisioning profile for AdHoc builds (I've been distributing via Testflight for the last six months or so). I know that to change the app name I need to change the bundle display name property in the project's plist file, but I'm not really sure how to make a separate "profile" to hold all of these changes.
I've tried reading through this article, but I couldn't get it to work and I inadvertently messed up all my provisioning profiles when going through the instructions.
I've been struggling with this for a few weeks now. The details of this process are pretty opaque, so any detailed instructions or pointers are particularly appreciated.
Thank you in advance!
PS it probably doesn't help that I'm really confused about the relationship between targets, schemes, and configurations in Xcode.
I use three configurations in my project: Release, Beta and Debug, where Beta is a duplicate of Release. In each of the three configurations, I'm including the following in my target's build settings:
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) CONFIGURATION_$(CONFIGURATION)
What this will do is define a separate preprocessor macro for each configuration. In your code, you can then do the following:
#if defined(CONFIGURATION_Beta)
// Something that should only happen in Beta builds
#endif
You can define additional build settings per-configuration in the “User-Defined” category (at the bottom of the build settings in Xcode), and then reference them in your Info.plist file. For example, you could define a custom BUNDLE_ID build setting that's different for Release, Beta and Debug builds, and then set the value of CFBundleIdentifier in your Info.plist file to ${BUNDLE_ID}, which would allow you to install Release, Beta and Debug builds side by side on your device.
Update:
If you want to see a good example of how to set all of this up, check out the project configuration in Cheddar for iOS.

IOS Application loader shows bundle error

I have already waste 3 days "solving" this problem (actually I have tried everything i could imagine but get nothing).
While binary uploading of my application i get the following error:
ERROR ITMS-9000: "this bundle is invalid. armv7s are required to include armv7 architecture." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage).
Oh I got it, what you only need to do is to disconnect your device (remove the cable connection between your device and system).
Now archive it and validate. You are good to go I believe. :)
Follow These steps while uploading binary:
Make you Project ready to go (Create distribution certificate, appstore provisioning profile with this certificate and application id of the application you are willing to upload, down load both and double click to install them)
Check if every thing is right, like right Icon files default files etc, and in build setting of your application you have selected your appstore provisioning profile to create you build.
Now unplug your device (although debug option should still remain selected to ios device) while archiving your build
After archiving is completed, validate your build (with same account you have created provisioning profile with), and then correct if there's some other errors, or upload the build otherwise.
I got this error, because arch (arm7, arm7s, arm64) + Build Active Arch Only - YES.
I did next:
- disconnect iphone
- exclude arm64-arch
- Set Build Active Arch Only - NO.
Build was successfully uploaded.
The problem to me was very lazy! I just lost the Universal Deployment Target (I had iPhone only for error). Fixed that it worked fine.
I tried removing the cable and re/assigning the provisioning profile(s) etc. In the end I just removed arm64 from the list of valid architectures on the project and target files.
How much does arm64 matter anyway?

How do i prevent Xcode from overwriting iTunes binary?

I have a really annoying problem. My app is published in the AppStore.
Everytime i run the app from Xcode, the iTunes binary just gets overwritten... and next time i need to test something with the production version of the app, i need to re-download it.
Is there any way to solve this?
Thanks in advance!
You need to change your bundle identifier. Here's how I set it up in my projects
Select your Project
Select your target
Navigate to the Info tab
Change the bundle identifier to a custom build setting e.g. I have it as ${BUNDLE_IDENTIFIER}
Now click on Project - (you may wish to keep at target level your choice)
Navigate to the Build Settings tab
Scroll all the way to the bottom to see User-Defined
Click Add Build Setting
(1) Select Add User-Defined Setting
(2) Add Key as the name you chose earlier
Set a different bundle identifier for each scheme
Bonus
You can use the same trick for icons so you can easily tell apart your builds on one device
Changing the bundle identifier, as Paul.s suggested, works — but it means your Release and Debug builds will diverge. Technically they will be different apps that use different containers. There can be good reasons to do this, but it has it's risks too: it's a bit more complicated, and you usually have to work a little harder to make sure you test that the development version properly handles data from the production version. You'll want to make sure any ad hoc builds you send to testers use the production bundle identifier.
Another way to approach the problem is to streamline installing the old version. If you Archive your production builds, then you can install them without downloading them again through the App Store. Just open-up a previously exported IPA and sync.