Limit Mac app Beta usage to selection of UDID-approved devices - xcode

I have a Mac app I just created in Xcode, and signed as a "Mac App Store" application, with the default Team Provisioning Profile. I only have two UDIDs registered in the Member Center, and can run the application on any of my devices (expected)... but ALSO on any other non-registered devices.
Is there a way to lock the application to only registered UDIDs for the purpose of Beta testing?
The documentation seems to apply mostly to iOS applications, and remains a little unclear for the Mac application procedure.

Oddly enough, I wasn't able to sign my code with my UDID-specific Provisioning Profile at all in Xcode. However, by setting the Provisioning Profile to my restricted one, and properly setting my Code Signing Identity, I was able to compile via command-line properly.
Now when loaded on any machine other then the UDID-approved ones, the application fails to launch (which is the desired behavior for my Beta testing strategy).

Related

Xamarin.iOS on macincloud development and automatic provisioning setup

I'm trying to develop a cross-platform app using xamarin forms and mac-in-cloud. Specifically with ios, I'm trying to set-up automatic provisioning since I originally got the error when debugging: >Could not find any available provisioning profile for (app name).iOS on iOS
So, after researching into the issue I put my apple developer acct info in, and when trying to use automatic provisioning. I get an error under Team: >There were errors in the data supplied. Please correct and re-submit. There are no current IOS devices on this team matching the provided device IDs.
Now, following the research rabbit hole, I go to the apple developer portal, try and register device, select macOS, insert Hardware UUID of mac mini into device ID, so on. And no change to error(s).
Question time, am I setting it up completely wrong? Other (older) articles/forums suggest linking an ios device via itunes, however, that seems counterproductive to my objective. Anyways, any help would be greatly appreciated. Apologies for any naiveté.
What are you trying to develop with the mac? Is it a iOS (iPhone) app? If so you can just use the simulator on the mac, and the mac does not need to be registered.
Try manual provisioning in VS
Signing Identity > Development (your name)
Provisioning profile > probably will be vs (something)
Also in VS go to Preferences > Apple Developer Accounts > make sure your account is listed. Then on the right hand side, click 'View Details' then 'Download all profiles'
Restarting VS or the mac may also help.

Xcode Team is not enrolled in the Apple Developer Program

I'm developing my personal mobile application.
I've used react native to build the application, and I'm now trying to bring my application on my iPhone X, using Xcode, however, when I'm trying to deploy the application I've got the following error:
Team [My Team Name] is not enrolled in the Apple Developer Program.
Is enrolling mandatory even for testing on personal devices?
Thanks!
What I did is listed below:
Created a Development certificate
Couldn't create a Distribution certificate ("Your account does not have permission to create iOS Distribution certificates")
Build the project correctly
Set signing of the project (both application and testing) to my Development certificate
Set scheme to my personal iPhone X
Click on "Distribute App"
Try on both, "Ad hoc" and "Development"
The only answer I've got is the error shown above.
Many thanks shim, I didn't have all those options since I'm using Xcode 10, however playing around with the signature settings I've made it out.
For whom other that will struggle with this issue, basically there's no point to archive the project to deploy on the Device.
The solution was just to select my device in the within the Schemas and just Run it on the device, that actually install the app on the mobile device.

Run Mac App with CloudKit connected to the Production environment

Has anyone succeeded to run a Developer ID signed Mac App with CloudKit and with access to the Production environment, using Xcode 8 beta 3? According to this diagram of Apple it should be possible, but all my attempts lead to crashes. What are the exact steps to follow?
My attempts until now includes the use of a "Mac DirectDistribution" Provisioning Profile that points to an App ID with CloudKit enabled and with access to an iCloud Container.
My CloudKit enabled-app works perfectly with a standard App Store configuration, but I want to test it with a Production environment.
Just add the following entry to your entitlement plist and do a clean build (shift+command k). No other action is needed: (string to copy: com.apple.developer.icloud-container-environment)
After countless experiments I found the following working solution to test CloudKit on the Mac with Production data, using Xcode 7.3:
In your App project, choose Developer ID in Targets > Identity > Signing
In the Entitlements file add a new line with key "com.apple.developer.icloud-container-environment" with value "Production"
Run the App (debug modus)
Export the app to an Archive, choose Export and select "Export as a Mac Application" to produce a Developer ID-based release version.
The steps are more or less the same if you use Xcode 8, but you have the extra option to disable the App Sandbox.
For Mac the easiest way is to just after Archive click Distribute App then choose Development and click next then choose your iCloud Environment (Production/Test) and save the app wherever you want. This version will access your production iCloud.
enter image description here
enter image description here

Distributing Apps Outside the Mac App Store crash with Code Signature Invalid error

I have a Mac App for OS X 10.10 that I am trying to create a working release build.
Not for the Mac App store "Distributing Apps Outside the Mac App
Store"
Uses "Developer ID Application" for the release code signing. Things look good in my App dev account
Created an OSX APP ID com.blah.app
Can create and verify an Archive successfully
sudo spctl --assess --verbose=4 Name.App, looks good "Name.App : accepted
source=Developer ID"
Read thru Apple "Distributing Apps Outside the Mac App Store"
Needs to be OS X 10.10 due to customer requirements
Read through everything I can find on stack overflow regarding this
matter
Can build and release iOS without a second thought, but this is my
first Mac App
I run the App and in the console I see "EXC_CRASH (Code Signature Invalid)"
Stumped ...
Gatekeeper
Macs have a "gatekeeper" feature that can be set in 3 modes in System Preferences > Security & Privacy > General > "Allow apps downloaded from:".
Which is your test system set to ?
Since you're signing using a Developer ID, it needs to be set to the 2nd or 3rd option (not just allowing the App store). [2nd option is the default on freshly installed machines]
Build for distribution outside of the app store
Builds that you create for submission to the App store cannot be run by everybody. One needs to build it specifically for that.
To quote https://developer.apple.com/library/mac/qa/qa1884/_index.html :
[...] use Xcode Organizer > Export > Export a Developer ID-signed Application. Developer ID-signed apps can be run by anyone. However, code that uses technologies only available to Mac App Store apps, such as receipt validation, iCloud, and push notifications, will not work if your app is Developer ID-signed. You might need to temporarily disable those parts of your app if you opt for the Developer ID testing approach
There was an error in the selected capabilities (red) that wasn't stopping the build, "Key chain sharing" in this case. Turned off as I didn't need it and everything works as expected

Is there a way to open a installed application on a Ipad?

I have an iPad application that already installed on the device. But i don't have the .app or .ipa file with me.
Is there anyway to launch that application using Appium driver?
Yes
If you have created the app with a developer provisioning profile, and built yourself. Or downloaded it using testFlight, and is signed with a development provisioning profile
You need to reference the app bundleID and the UDID of the device. You then won't need the app path capability.
No
If you have downloaded the app from the app store.
How to automate a preinstalled app
This will only work for applications that are signed with a DEVELOPMENT cert.
This will NOT work for applications that are signed with a DISTRIBUTION cert (ex. apps downloaded from the App Store, distributed via Afaria or another MDM solution*)
You cannot automate applications downloaded from the above places. This is because Apple's Instruments will not allow you to inspect/interact with those applications. (Even if you somehow knew the bundleId)
Get the bundleId of the app that was installed on the device. Use that as the app capability.
Follow the Appium Real Devices guide (substitute any .ipa/.app reference with the bundleId)
In addition to your regular desiredCapabilities (ex. platformName, platformVersion, deviceName).. these should be your desiredCapabilities:
// For preinstalled apps, this is the bundleId
desiredCaps['app'] = 'com.company.appname'
// The device's unique identifier.
// Found in XCode's organizer when device is plugged in
desiredCaps['udid'] = '1824y983h2849gh2498'
* Barring TestFlight. If an app is uploaded via TestFlight, it may be signed with a Development or a Distribution certificate. You'll have to ask.

Resources