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

Xcode error when building from 2021.3 #17

Open
ChrisARound opened this issue May 23, 2022 · 15 comments
Open

Xcode error when building from 2021.3 #17

ChrisARound opened this issue May 23, 2022 · 15 comments

Comments

@ChrisARound
Copy link

When I try to build in Xcode, after a successful build from Unity, I immediately receive the error:
"Building for iOS, but the embedded framework 'TestFairy.framework' was built for iOS Simulator."

@vijaysharm
Copy link
Contributor

vijaysharm commented May 23, 2022

Hi @ChrisARound could you tell me which version of Unity you're using? If possible, can you try using either TestFairySDK-Unity2021.unitypackage or TestFairySDK-Unity2021.zip? They contain an XCframework instead of a FAT framework which should resolve the issue.

@ChrisARound
Copy link
Author

Hello,
I'm using TestFairySDK-Unity2021.unitypackage with Unity 2021.3.0f1.

@vijaysharm
Copy link
Contributor

Have you tried enabling the "Validate Workspace" in your iOS project's Build Options? https://i.stack.imgur.com/2VeAc.png

@ChrisARound
Copy link
Author

After selecting this option the build went much further, but in the end failed with the following message:

building for iOS, but linking in dylib file (/Users/objecttheorytester/Documents/TwinsStadium/Build/Frameworks/Plugins/iOS/TestFairy.xcframework/ios-arm64_i386_x86_64-simulator/TestFairy.framework/TestFairy) built for iOS Simulator, file '/Users/objecttheorytester/Documents/TwinsStadium/Build/Frameworks/Plugins/iOS/TestFairy.xcframework/ios-arm64_i386_x86_64-simulator/TestFairy.framework/TestFairy'

@vijaysharm
Copy link
Contributor

Sorry for the delayed response, I was trying to reproduce the issue locally. From what i can tell, unity doesn't appear to be handling xcframeworks properly. It appears to treat it as a folder, and picks up the first framework it finds in that directory. Are you working on an M1 mac and need Simulator support? If not, can you try using the non-2021 version here? The alternative is to remove the references to .framework in the build targets for both the Unity-iPhone and the UnityFramework and replacing them with references to the .xcframework in the Assets/Plugins/iOS/TestFairy.xcframework directly. If that works, it would still require an automated solution through Unity, which would require some more research

@vijaysharm
Copy link
Contributor

vijaysharm commented May 26, 2022

An alternative solution might be to just delete the Plugins/iOS/TestFairy.xcframework/ios-arm64_i386_x86_64-simulator directory if you're not planning on testing on a simulator. But before you try that, please update to the latest version https://github.com/testfairy/testfairy-unity-plugin/releases/tag/2.60.1

@ChrisARound
Copy link
Author

Deleting the simulator folder gave me the same error. We do not need simulator support at all, and using the non-2021 version did work, however we are getting no videos with our reports, even though video is turned on in the settings.

@vijaysharm
Copy link
Contributor

Could you clarify what you mean by "no videos with our reports"?

@ChrisARound
Copy link
Author

When a user submits feedback it does not contain video.
image

@vijaysharm
Copy link
Contributor

Can you confirm that you're calling TestFairy.begin() with your app token someplace in your code base? I'm not seeing any requests from your app to record a session.

@ChrisARound
Copy link
Author

Yes, I am, and we can see the video in the same app on Android. We're also able to see feedback (without video, but with a screenshot) for the iOS version.

@vijaysharm
Copy link
Contributor

Could you check your iOS logs? I'm interested in anything that has the [TestFairy] tag. An example of a line that would have that tag might be:

2022-05-26 20:05:42.658751-0400 TestApp[70787:2632411] [TestFairy]: Initializing SDK version 1.29.9

@ChrisARound
Copy link
Author

default 17:16:37.074628-0700 ARoundStadium [TestFairy] Cannot set nil value in preferences for key [TestFairyLastSession]
default 17:16:37.074655-0700 ARoundStadium [TestFairy] Cannot set nil value in preferences for key [TestFairyLastSessionUrl]
default 17:16:37.074925-0700 ARoundStadium [TestFairy]: Received failed response from server. Session recording disabled: [{
code = 100;
message = "Session muted for non-adhoc certificate";
options = shake;
status = fail;
}]

@ChrisARound
Copy link
Author

We do not use TestFairy for app distribution, we're using TestFlight. That seems to be causing the problem?

@vijaysharm
Copy link
Contributor

Yup that would do it. Your app is signed with an app-store certificate. TestFairy doesn't allow recording using these certificates based on Apple's policies. We do, however, allow capturing feedback and crashes in production. This is why you're seeing feedbacks show up in your account.

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

No branches or pull requests

2 participants