opentok / vonage-client-sdk-video

OpenTok iOS SDK Swift Package Manager
Other
0 stars 3 forks source link

Build error using SPM and 2.25.3 #8

Closed ryancrosby-bl closed 11 months ago

ryancrosby-bl commented 1 year ago

I was on version 2.25.2 and building successfully. After updating to 2.25.3, my app store builds no longer work. I downgraded to 2.25.2, and it started working again.

Here is the log:

ci-spm-source-packages/checkouts/vonage-client-sdk-video/Package.swift: error: Signing for "VonageClientSDKVideo_VonageClientSDKVideo" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'VonageClientSDKVideo_VonageClientSDKVideo' from project 'VonageClientSDKVideo')

I am using Xcode 14.3.1 and Fastlane (I think I am one minor version behind) to do my release builds. I can build in Xcode with automatic provisioning just fine, but with Fastlane I switch it to manual signing and use match.

abdulajet commented 1 year ago

Hi, can you try setting this flag for your build. I assume you are using fastlane match?

image

https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-swiftpm-targets-include-resources/59685/23

ryancrosby-bl commented 1 year ago

Sorry, I was out on vacation last week. You are correct I am using match and gym. I disable automatic code signing prior to running match, and build_app (gym).

I added the xcargs to the build_app call, which is the same as using the Gymfile, and still got the same error. This works for me using 2.25.2, so it seems most likely that something changed in the Vonage package to cause this.

ci-spm-source-packages/checkouts/vonage-client-sdk-video/Package.swift: error: Signing for "VonageClientSDKVideo_VonageClientSDKVideo" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'VonageClientSDKVideo_VonageClientSDKVideo' from project 'VonageClientSDKVideo')

abdulajet commented 1 year ago

ok thanks, will look into that for you

abdulajet commented 11 months ago

Hi @ryancrosby-bl we have a fix in the nightly version if you can check if this solves the issue for you. I have sent the link on slack

ryancrosby-bl commented 11 months ago

Thanks, I gave it a go via cloning this repo, editing the Package.swift, and using a local spm dependency. I successfully built on the 2.25.2 tag, but not with the custom build.

ryancrosby-bl commented 11 months ago

TL/DR: I had time to investigate this further, and I found the root cause to be passing in codesigning_identity: "iPhone Distribution" to the fastlane build_app action. Removing that parameter resolved the issue.

I discovered fastlane was running xcodebuild ..... archive CODE_SIGN_IDENTITY=iPhone\ Distribution. When I manually ran this command I got the error. When I archived from Xcode it worked. I tried removing the CODE_SIGN_IDENTITY=iPhone\ Distribution when manually running and it succeeded. I think that passing in the CODE_SIGN_IDENTITY causes the Vonage package to try to sign.

Anyways, thank you for your time and sorry to waste it. Hopefully this can help someone else though.

bhargavbajani-simformsolutions commented 5 months ago

@abdulajet From where do I get XCFramework or normal Framework? so I can directly add to a project. Or any way to add via Carthage?

ryancrosby-bl commented 5 months ago

You can find a link to the xcframework in Package.swift. You'll need to follow the documentation on integrating it which is found https://tokbox.com/developer/sdks/ios/.