I am depending on push notification services in my iPhone app, and tested with development and ad-hoc production certificates it is working fine. But when I submit the app to the App Store, I have to create Appstore production certificate, is there any way to test APNS with this certificate before publishing the application to Apple.
I have been able to Package an Ad Hoc distribution which provides an .ipa for iOS devices that I have specified in the Apple Developer Center.
I then send the .ipa to the specified devices using Diawi.com (which is an awesome service like test flight), but can be used prior to submitting to the app store (like the old test flight)
Here is the actual problem. Using the Appstore production profile, we can create an .ipa file but we cannot install it on the device directly, it has to come from Appstore. It can only be uploaded to the App Store. So, the problem is as we cannot install the package on iPhone we cannot send the push notifications to test it before submitting the package to Appstore. So, technically it is not possible to test the set-up. I was just curious to know if somebody cracked it.
The APNs production certificate is universal, so it does work in both development and distribution, see Apple documentation here.
For the AppStore distribution certificate:
Before uploading your app to iTunes Connect, optionally distribute it for testing on registered devices using an ad hoc provisioning profile or team provisioning profile.
Here's the whole run-through on how to achieve this: App Distribution Guide.
Another option is using TestFlight, details can be found under the previous link.
Related
I'm building my app for iOS using ionic package.
https://docs.ionic.io/services/package/
I created certificates for both development and production, including push.
https://docs.ionic.io/services/profiles/
development - built successfully using ionic package, installed on iOS with no problem.
production - built successfully using ionic package, when I try installing it on iOS it starts installing the app normally, then when almost finished the app disappears and it ends up not being installed, no errors appear.
Why does it happen?
In order to test the production .ipa on my device, I'm installing it via the iTunes software. (I'm not publishing it in the App Store yet)
The same goes for the development .ipa, though for this one it's a given.
I found this old issue which suggests it might be due to bundles ids that don't match:
In-House App Disappears After Install
The widget id in my app's config.xml is identical to the App ID on Apple Developer.
Are there more places that are supposed to be identical which I'm not aware of? Perhaps info I'm inputting when creating the certificates?
My final goal is to publish this app in the App Store, it's not an In-House app - I'm stating this to avoid confusions.
I have faced the same issue when i was building my iOS apps , after a couple of research i came with this fact :
When you prepared the Production build (Store App ) it will not be able to install in the development devices . if you need to test that production app in your development device you need to build the app with ADHoc Provisioning Profile . then only it is able to allow you to install in the Development devices.
AdHOC provision profile is a distribution provisioning profile that allows your app to be installed on designated devices and to use app services without the assistance of Xcode. It’s one of the two types of distribution provisioning profiles that you can create for apps. (You use the other type of distribution provisioning profile later to submit your app to the store.) An ad hoc provisioning profile ensures that test versions of your app aren’t copied and distributed without your knowledge.
When you’re ready to distribute your app to testers, you create an ad hoc provisioning profile specifying an App ID that matches one or more of your apps, a set of test devices, and a single distribution certificate.
The App Store version app is, as its name implies, for use only when distributing via the App Store. It exists for signing your app for distribution via the App Store and can't be used for any other purpose. Unless you install an app that has been signed by it via the App Store it will obviously fail.
If you want to distribute an app for internal use to a few devices and for a relatively short period, you should use an Ad Hoc profile (which i explained in above ); if to a lot if users for an extended period, you need to register as a corporate developer and follow a different process.
For More Details regarding Adhoc refer the following link:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html
You can't just directly install production build onto your test device, its against apple's policy.
So in order to do that you can export an Ad-hoc build and then you can install in your device, provided that device is already included inside your provisioning profile.
Ad-hoc builds works same as production builds, only difference is you can only install on those devices which are included in your provisioning profile for that app.
It is not possible to directly install Production iOS App on the mobile device. This can only be done via TestFlight. Step by step tutorial below.
Prerequisites
You have your Mobile App Prod build ready and signed
You have iOS mobile test device with TestFligh app on it
Step by step
On MAC open XCode -> Open DEveloper Tool -> Application Loader
Click 'Choose' file to pick up your build file from local machine and continue to upload
Once app is uploaded it will be visible from iTunes Connect console (wait until Processing is finished before submitting to TestFlight)
Once that's done, open TestFlight App on the iOS mobile device and download your new app.
I know the obvious answer : it's for distributing apps on the app store. But I have an app approved for release on iTunes Connect with no App Store profile. I just have an Ad Hoc distribution profile installed. What purpose does an App Store distribution profile serve ? I submit my apps through the Test flight program, is it not a problem as long as the build was verified and approved ? I don't want to risk the app somehow not working once it's on the app store.
To understand what is the purpose of App store provisioning profile we need to check the difference between them first.
Ad-Hoc Distribution :
By using this, App can be installed on 100 devices designated by the developer on his provisioning portal. We can prepare build using this only for beta testing or demos.
App-store Distribution :
By using this we can prepare build of the App to deploy to App store submission.
Your case:
As you mentioned that you submitted app with using ad-hoc distribution profile & its approved & ready for sale now.
Try to install that live app on the device, for which UDID is not added to Ad-hoc distribution profile. It will not allow to install.
That is the only difference.
I hope it will help you.
If your app made it this far and was approved for release, you're fine. In all probability if you go to the Member Center you'll find that an app store distribution profile was generated for you.
This should be helpful:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Code signing is used in combination with your App ID, provisioning profile, and entitlements to ensure that:
Your app is built and signed by you or a trusted team member.
Apps signed by you or your team run only on designated development devices.
Apps run only on the test devices you specify.
Your app isn’t using app services you didn’t add to your app.
Only you can upload builds of your app to iTunes Connect.
If you choose to distribute outside of the store (Mac only), the app can’t be modified and distributed by someone else.
Before the new build distribution system rolled, you can either signed your apps with development or adhoc certificates.
Now it seems the new Testflight only accepts IPA files signed with AppStore provisioning files only.
Can I still have a separate environment for sandbox push notifications?
Thanks!
You can still have a separate environment for sandbox push notifications, just not through the new TestFlight. You need to use an alternate service such as Beta by Crashlytics or Hockey App. And these services have the same limitations of the old TestFlight e.g. having to add your testers on to your developer account.
A common problem that is being faced by many developers, I'm posting it again as I couldn't get any right solution.
For distribution of apps using InHouse account (by OTA), how is it possible to send push notifications to the apps installed on devices. With development profile, everything works good during. The problem is when distribution only.
How will Apple recognize that the bundle identifier is being used in house distributed application?
How will Apple recognize that the bundle identifier is being used in house distributed application?
Apple will recognize the app ID because you added (or should have) the app ID in the developer portal and created a provision profile that allows push notifications. If your problem is only with the distribution version, compare your development provision settings to the distribution provision settings in the portal.
APNS has nothing to do with the App Store or iTunesConnect; it works fine with enterprise distribution.
What is the difference between a development provisioning profile and an ad hoc provisioning profile?
Couldn't we always use the ad hoc profile for everything but the store?
An ad-hoc provisioning profile is used later in the development process, particularly when you want to distribute your app to a small or medium size group of testers that are not included in the iOS developer program for your organization. An app deployed with an ad-hoc provisioning profile will be almost identical to the version you submit to the App Store (ie. it will need a distribution certificate for push notifications to work, etc.)
Of course you could add your QA team and betatesters to the organization and use a development provisioning profile, but this approach has many disadvantages:
You may end up with many development certificates, making it difficult to manage them.
You are giving your betatesters the right to compile and run the app on a device. (This is a extremely bad policy.)
You want to test your app in the closest possible environment to the App Store environment. Development environments, like running the app from Xcode, can masquerade some bugs that will show up when you publish your app.
All Types of Provisioning Profiles explained in summary
Provisioning Profile simple definition/use
Provisioning profiles are used to authorizes a set of known iOS devices to run and install a given iOS app. If a target device have a profile installed matching it's own device Unique Device ID (UDID) and that of the app it is about to install then the device will be able to install the app otherwise the device won't be able to install the app.
Types Provisioning profiles and their use
There are 4 types: -
1. Development: - Used in development phase of the app to run the app on simulator and developer devices. (If a developer device is not in this list the in-development app can not be installed).
2. Ad Hoc: - Is provided to distribute the app to a known finite set of iOS devices outside the AppStore. These are very commonly used to distribute an app to testers via a third part testing service.
3 Enterprise:- Enable large enterprises to distribute inhouse applications to enterprise approved devices in a manner which is independent of the AppStore.
4 App Store:- Used for AppStore or for TestFlight.