How to test an IAP using a sandbox account on Apple Watch - xcode

I'm trying to test the purchase and restore code I've written for an IAP for an Apple Watch app. In the iOS world I would make sure my device was logged in to a sandbox account under the sandbox section of Settings and then I could test an IOS IAP. I'm trying to do the same for a watchOS app and getting an error.
Here's a screenshot of the error:
The phone my watch is paired with is logged into a sandbox account (in the sandbox section of Settings).
Is the error implying that I need to be logged in on my phone using the sandbox account as the regular iCloud account? Something else? Has anyone successfully tested an IAP purchase on Apple Watch, and if so were there any special steps you needed to take to use a sandbox account?
I'd appreciate any tips and tricks. Thanks!
Russ

Related

How to use the sandbox user on MacOS app to test IAP?

As usual, all the existing answers on Stackoverflow relate to iOS and nothing is out there for MacOS.
I have signed out of Mac AppStore.
When I try to attempt a IAP purchase on my app I get this error message shown:
Account Not In This Store Your account is not valid for use in the
U.S. store.
You must switch to the U.K. store before purchasing.
[Environment: Sandbox]
I have created fresh Sandbox users, but the app is not asking me to enter them. And based on the documentation of Apple I shouldn't enter them into the AppStore login or I get them wasted.
I have deleted the ~/Library/Containers/app-bundle-id, rebooted the dev machine and cleared once again the build folder. But I can't get it working.
How do I get a prompt for entering the sandbox user?
Any advice would be appreciated.

iCloud Testing of application in iOS simulator

I am new to the iOS application development and i came across a situation where i need to perform iCloud testing using XCode to check if it is working properly. Can anyone please suggest the steps that needs to be followed in order to perform iCloud testing of iOS application?
You can login to iCloud in the simulator. Open Settings, then login to iCloud just like you would on a device.
I highly recommend using a test account, not your actual account. I also recommend that you have that test account login on a real physical device at least once somewhere to enable additional storage and features on the account.
From that point iCloud should report as available in the simulator.
To trigger a sync with the server, use the "Trigger iCloud Sync" menu item. Simulators don't currently have server-side push notification support so the simulator device is not notified immediately about CloudKit subscriptions.
If you run into any problems please file a feedback report after reproducing the problem, then running xcrun simctl diagnose to gather logs.

macOS In-App Purchase in sandbox environment not authorised

I'm trying to get In-App Purchases (IAPs) working in a macOS app using the same Swift code, sandbox testers, and iTunes Connect account that I used for my iOS app. However, I can't get it to work. I'm using macOS High Sierra 10.13.6.
Open app
Apple's IAP testing recommendations are found here:
On a development macOS device, sign out of the Mac App Store. Then build your app in Xcode and launch it from the Finder.
If the text “[Environment: Sandbox]” doesn’t appear, you’re using the production environment. Make sure you’re running a development-signed build of your app. Production-signed builds use the production environment.
I have followed these steps by signing out of the Mac App Store, and building my app – signed for development – then launching it from the Finder. This means I don't get debug logs, unfortunately.
Navigate to table of products in-app
Here's my table of products:
I can buy a product by pressing the "Free" button or the "£4.99" button.
Attempt to buy product by pressing "Free"
After a short wait, brings up this popup saying 'Sign-in required'. I sign in using one of my sandbox testers (note: I have tried five different test accounts now, all of which worked on an iOS app under the same iTunes Connect account), registered with email addresses that aren't Apple IDs:
Having selected 'Buy', a short wait after that, this next popup appears:
After selecting 'Cancel' (as recommended here), after a short wait, the next popup appears:
You are not authorized to make purchases of this InApp in Sandbox at this time.
[Environment: Sandbox]
So I'm not sure whether it logged me in or not, and I assume that my purchase has failed (my table UI doesn't update to say 'purchased'). Note that I have also tried pressing 'Change Store' here, and it still fails ultimately.
Attempt to buy product by pressing "Free" again
This time, I'm not prompted to log in; I'm instead asked immediately whether I'd like to purchase the product. I click 'Confirm'.
However, now the purchase transaction never completes:
What might I be doing wrong? Do I need to log out of anything (e.g. iCloud) in Settings > Internet Accounts too?
Seems lame, but I eventually solved this by making new Sandbox tester accounts (tip: this time, I configured them as being US-based to avoid the complication of switching stores during the payment flow).
I think the problem was that I hadn't verified the Sandbox tester accounts I'd been using. This is either because Apple's email asking me to verify/activate the Sandbox tester accounts got sorted into my junk mail and missed completely, or because their backend had been having problems when I did click the link in their emails (I experienced both of these behaviours).

How to build app on iphone/physical device without developer account?

I have xcode 8.3 along with mac sierra10.12.4 and i am building cordova app .am not able to build/generate app on iphone.I didnot have apple developer account so am trying with appleid but am not getting provisioning profile.App builds in simulator only.How to build app on iphone/physical device without developer account?
You don't need Paid Apple Developer Account to run app on your device , but you do need Paid Apple Developer account for app distribution. To run the app on your iPhone, you just need to enter your Apple developer account credentials in the Xcode like this :
After adding your apple developer account, just follow these and you will be able to run the app, small note before doing this select your device from the dropdown list.
You need to sign up your Apple ID to be a free developer account. This will allow Xcode to create free, 7-day provisioning profiles that you can use to build to a connected device.
For more information, you can see this tutorial. You seem like you already have an Apple ID, so you can skip step 1. But follow the other steps to make it a dev account and then link it inside Xcode.

Testflight iOS8 - Non Apple ID Account

I've just installed the latest testflight app on my personal iphone 6.
We've got a company testflight user logins which are completely separate from our personal accounts.
However when I launch the testflight app it wants to use my Apple ID - which has no access to any of the apps as they're all linked to the organisation email.
Is there a way I can logout and use my organisational account for this single app?
Thanks
Go to your Settings. Then go to iTunes & App Store. Tap your email address at the top to Sign Out and sign in with a different account.
Afterwards, you can log back into your personal account.
There is no way to sign in to your company account for just the TestFlight app.
You don't need to have Test flight on same email id. You may register with any email to receive test builds. You just need to have access to that email in your device.
Make Safari your default browser for opening links. Once you receive the email. Click on "Open in TestFlight" and it will open the Test Flight app and add the build to it.
If you open the "Open in TestFlight" link in Safari on the device you'd like to test with it will add the beta app to the TestFlight app even if the emails don't match.
Opening the link in other browsers will not work.

Resources