rubymotion-community / motion-provisioning

Simplified provisioning for RubyMotion iOS, tvOS and macOS apps.
Other
46 stars 20 forks source link

Obtaining of free credentials is broken #30

Open ZonD80 opened 4 years ago

ZonD80 commented 4 years ago

Any action with free developer certificates, provisioning fails with error:

Please update to Xcode 7.3 or later

andrewhavens commented 4 years ago

@ZonD80 I'm actually working on this, but doing it in my free time, so it might be a little bit before it's working again.

wndxlori commented 4 years ago

Any progress on this @andrewhavens? Can I help?

therocketforever commented 4 years ago

I am actually running into this as well with my personal account. I'm willing to contribute as well if some one can point me in the right direction. I know nothing about this certificate dance non-sense but I can read code & documentation, if some one can point me in the direction of a place to start & an expected outcome I can put time on it.

andrewhavens commented 4 years ago

Just a status update on this...when I first started digging into fixing this, I found out that our test suite was not compatible with newer versions of Fastlane. So, I've done some major refactoring to get our test suite up and running again in a way that will be easier to maintain in the future. That's the bulk of what I've been working on.

In regards to the free account, the changes are a little tricky. It's not a simple update this time. Basically, the free account uses a completely separate API than the paid accounts. The free accounts use the same API that the Xcode app uses, but the paid accounts access their API in the same way that the Apple developer website does. However, now they have changed the authentication mechanism for signing requests using the Xcode API. There is an Apple library that I've seen other open source Objective-C projects use, but since our code is running in Ruby, we don't have direct access to it. I was thinking we might need to create some sort of tool (written in Objective-C, or maybe a RubyMotion Mac app) that we can shell out to that would make use of the library to sign the request. I'm not exactly sure how to do that, but it was on my list of things to look into next after finishing the test suite refactor. I was going to enlist Lori's help once I got things in a more stable place.

miry commented 3 years ago

I wonder how https://github.com/fyne-io/fyne or https://www.npmjs.com/package/ios-deploy is working. If it is possible to get the same functionality from it.

UPDATE: https://github.com/fyne-io/fyne/blob/9b5a176fe1dc80beae72a3074d0d5cd2b409637c/cmd/fyne/commands/release.go#L139

wndxlori commented 3 years ago

motion-provisioning uses the fastlane toolset and API.

Is this still broken? I know attempts have been made to fix, but most of us working on this have paid accounts so it's difficult to test the free workflows.

miry commented 3 years ago

Is this still broken?

It is broken. But it is not critical as you have mentioned, mostly focused with Paid accounts make sense.

As workaround I replaced motion-provisioning with manual steps: https://github.com/miry/samples/blob/master/mobile/rubymotion/hello/README.md#custom-installation

andrewhavens commented 3 years ago

@miry I just looked at those two projects you linked to and I don't think they handle generating/downloading the free certificate. They assume that the certificate already exists on your computer.

@wndxlori Yeah, unfortunately, I hit a roadblock and never had a chance to work on it. Now that motion-provisioning is in a more stable/up-to-date state, I think it's a good time to look into this again, and for others to help on this issue.

To recap, Fastlane/Spaceship doesn't support the free certificate anymore, because the free/paid certificate/provisioning use different APIs. So we can't use Fastlane as a reference implementation.

Fastlane, which uses Apple's web auth API (https://idmsa.apple.com/appleauth/auth), returns a myacinfo key which was previously used in API requests. Now, Apple enforces the GrandSlam API (https://gsa.apple.com/grandslam/GsService2) for free accounts.

I previously found an implementation in this ReProvision project that we could imitate (assuming it still works). There is discussion about it here, and a PR that implements most of the changes here. But it's written in Objective-c and makes use of Apple Frameworks, so we might need to create a separate script in order to generate the API request headers. It's been a long time since I've looked into this issue so it's possible that this solution is outdated with Xcode 13.

miry commented 3 years ago

FYI: I found the limitation with Free Apple Developer Account: you can create up to 10 bundles in 7 days.

nickyhajal commented 2 years ago

Has anyone figured this out by any chance? I'm trying to compile a RubyMotion app after sometime away and this error is appearing