Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Free Apple development certificates #23

Open
sufuk opened this issue Oct 14, 2021 · 5 comments
Open

Add support for Free Apple development certificates #23

sufuk opened this issue Oct 14, 2021 · 5 comments

Comments

@sufuk
Copy link

sufuk commented Oct 14, 2021

Apple now allows Free Developer accounts to flash their apps to real iphones (app certificate will be valid for only 7 days) .
If I try to build I get ;

error: No account for team "123456789A". Add a new account in the Accounts preference pane or verify that your accounts have valid credentials. (in target 'MyApp' from project 'MyApp')
error: No profiles for 'MyApp.MyApp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'MyApp.MyApp'. (in target 'MyApp' from project 'MyApp')

But after that if I launch the MyApp.xocdeproj with XCode and go to Signing & Capabilities and check "Automatically signing" and select Team as Personal Team it works.

It will be avesome if this will automated too

@OlivierLDff
Copy link
Owner

Interesting news.
I won't have time to work on that, but you can have a look around here:

if(QT_IOS_CODE_SIGN_IDENTITY)
qt_ios_set_xcode_property(${QT_IOS_TARGET} CODE_SIGN_IDENTITY ${QT_IOS_CODE_SIGN_IDENTITY} "All")
endif()
if(QT_IOS_TEAM_ID)
qt_ios_set_xcode_property(${QT_IOS_TARGET} DEVELOPMENT_TEAM ${QT_IOS_TEAM_ID} "All")
set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${QT_IOS_TEAM_ID} CACHE INTERNAL "" FORCE)
endif()
if(QT_IOS_PROVISIONING_PROFILE_SPECIFIER)
qt_ios_set_xcode_property(${QT_IOS_TARGET} PROVISIONING_PROFILE_SPECIFIER ${QT_IOS_PROVISIONING_PROFILE_SPECIFIER} "All")
endif()

If you find how to automate that, I think that would be interesting for lots of people, wanting to play around and test Qt for iOs development.
I can help you if you want to make a PR.

@sufuk
Copy link
Author

sufuk commented Oct 14, 2021

It seems your utility already supports this, by just specifying team id;
Don't try to add Signing Identity it doesn't needed in this case

    include(QtIosCmake/AddQtIosApp.cmake)
    add_qt_ios_app(${PROJECT_NAME}
            TEAM_ID "***********")

But apple doesn't show TEAM_ID to free users directly. Normally the one can look it it from Apple Developer Website but if you don't have an paid membership it doesn't show you. However you can find it from keychain app;
just open keychain select login then certificates then find the Certifiacte you created before from xcode;
Right click into it and under find the first Organizational Unit that is your Team id (The one with hided with red mark below)
test

Congratss youre done you can start building normally.
Dont forget to create new certificates every 7 days.!!

Important Note!!
If you connect your macos over ssh or something else you might get an error like
MyApp.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
Unfortunatly this is a common problem in codesign there are many suggested solutions on the web but none of them worked for me (may work on you) .

@Dushistov
Copy link
Contributor

May be #6 is related. There was @OlivierLDff's idea to compare project
"fixed by xcode" and original generated by cmake, but I received paid account ,
so this is become not important for me.

@sufuk
Copy link
Author

sufuk commented Oct 14, 2021

May be #6 is related. There was @OlivierLDff's idea to compare project "fixed by xcode" and original generated by cmake, but I received paid account , so this is become not important for me.

Yeah actually it is related, for some reason apple doesn't allow you to see your Team id directly :). But it can be learn from key chain explained above.

@OlivierLDff
Copy link
Owner

Would you consider doing a PR to add your explaination to Readme for the next person looking for its TEAM_ID ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants