Developer Tools

RSS for tag

Ask questions about the tools you can use to build apps.

Posts under Developer Tools tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Running commands for symbolication within the App Sandbox for Mac App Store
I'm trying to build a developer tools app that can run in the app sandbox and execute commands related to working with DSYM files. The app sandbox is a requirement for publishing it to the App Store. I come from the world of iOS so everything is a sandbox to me and this is new territory. To execute my commands I'm using the Process type to invoke command line. func execute() throws -> CommandResult { let task = Process() let standardOutput = Pipe() let standardError = Pipe() task.standardOutput = standardOutput task.standardError = standardError task.arguments = ["-c", command] task.executableURL = URL(fileURLWithPath: "/bin/zsh") task.standardInput = nil let outHandle = standardOutput.fileHandleForReading let errorHandle = standardError.fileHandleForReading try task.run() let out1 = outHandle.readDataToEndOfFile() let out2 = errorHandle.readDataToEndOfFile() // more code interpreting the pipes I'm trying to perform the following operations: mdfind to locate DSYMs https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report#Locate-a-dSYM-using-Spotlight dwarfdump to verify UUIDs https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report#Match-build-UUIDs atos to symbolicate with the found DYSM file https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report#Symbolicate-the-crash-report-with-the-command-line This all works just fine when I run my Mac app without sandboxing, but as one would expect totally fails when App Sandbox is enabled--the sandbox is doing its thing. Responses like "xcrun cannot be used within an App Sandbox", or simply the output not finding anything because the scope of the process is limited to the sandbox, not where my app DSYM file is. In my readings on the documentation, where it states that I can create a command line helper tool that gets installed alongside the app sandbox app. "Add a command-line tool to a sandboxed app's Xcode project to the resulting app can run it as a helper tool." https://developer.apple.com/documentation/security/app_sandbox Is this the right path to take? Or is there a way to still achieve access to xcrun by asking the user to grant access to other parts of the system via dialogue prompts? I have followed this guide but don't know where to go from here: https://developer.apple.com/documentation/xcode/embedding-a-helper-tool-in-a-sandboxed-app It leaves off at print("Hello World") and no instructions on how to have your app communicate with the helper from what I could find ... :). I know, generally speaking, of XPC services and that I have the ability to make them on macOS, unlike iOS (wait maybe 17.4 allows it? https://developer.apple.com/documentation/xpc anyways). Would creating an XPC helper be allowed to execute commands against xcrun or have access to the ~/Library/Developer/Xcode path to find the debug symbols for the purposes of symbolicating a crash report? I really want to be able to ship my app on the App Store and enable developers to use the tool super easy, but I'm not sure if the App Sandbox will prevent me from achieving what I'm trying to do or not. Any tips, pointers, samples, guidance is much appreciated!
1
0
590
Feb ’24
openCV can work with GPU
Hello, I am a new user with an Apple MacBook Pro. I'm experiencing difficulties running my code through the GPU. What do I need to install on my computer to be able to use libraries for machine learning, Computer Vision, PyTorch and Tensor Flow? I already watch lot of tutorials on this subject, but still is looks very complicated and I need mentoring for this task. I would greatly appreciate it if I could receive a response and if someone could guide me on this matter.
0
0
708
Feb ’24
Running Developer Tools from a Sandboxed App
I’ve talked about this a bunch of times here on DevForums but, reviewing those posts today, I realised that they’re quite fragmented. This post is my attempt to create a single post that collects together all the bits. If you have questions or comments, please put them in a new thread. Tag it with App Sandbox so that I see it. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Running Developer Tools from a Sandboxed App If you attempt to run a developer tool, like otool, from a sandboxed app, it fails with an error like this: xcrun: error: cannot be used within an App Sandbox. In this case I was trying to run /usr/bin/otool directly, so how did xcrun come into it? Well, the developer tools that come pre-installed on macOS, like otool, are actually trampolines that use xcrun to bounce to the the real tools within Xcode. Specifically, xcrun defaults to the tools within the currently selected Xcode or Command Line Tools package. So, if you have Xcode installed in the usual place and are using it for your currently selected tools, the actual sequence is /usr/bin/otool, which runs xcrun, which runs /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool. The user can change the currently selected tools with xcode-select. You can get around this problem by running otool from within Xcode. This skips the first two steps, allowing the tool to run. However, there are some serious problems here. The first is that there’s no guarantee that the user has Xcode installed, or that they want to use that specific Xcode. They might have the Command Line Tools package installed. Or they might prefer to store Xcode somewhere outside of the Applications directory. You can get around this by running xcode-select with the --print-path argument: % xcode-select --print-path /Applications/Xcode.app/Contents/Developer However, that results in two more problems: xcode-select prints the root of the Developer directory. The location of, say, otool within that directory isn’t considered API. As a sandboxed app, you might not have access to the path returned. That second point deserves a deeper explanation. To understand this, you’ll need to understand the difference between your static and dynamic sandbox. I talk about this in On File System Permissions. Running otool from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool works because /Applications is in the sandbox’s built-in allowlist. This is part of your static sandbox, so you can run executables from there. But what happens if the user’s selected Xcode is in a different directory? (Personally, I keep numerous copies of Xcode in ~/XcodeZone.) That might not be part of your static sandbox so, by default, you won’t be able to run tools from it. For normal files you can dynamically extend your sandbox to allow this, for example, by presenting a standard open panel. However, this doesn’t work for executable access. There is currently no way to get a dynamic sandbox extension that grants executable access. On File System Permissions has a link to a post that explains this in detail. Finally, there’s a big picture concern: Does the tool actually work when run in a sandbox? Remember, when a sandboxed app runs a command-line tool like this, the tool inherits the app’s sandbox. For more about the mechanics of that, see the documentation linked to by On File System Permissions. For a simple tool, like otool, you can reasonably assume that the tool will work in a sandbox. Well, you have to make sure that any path arguments you pass in point to locations that the sandbox allows access to, but that’ll usually do the trick. OTOH, a complex tool, like say the Swift compiler, might do things that don’t work in the sandbox. Moreover, it’s possible that this behaviour might change over time. The tool might work in a sandbox today but, sometime in the future, an updated tool might not. So what should you do? The only approach I’m prepared to actively recommend is to not sandbox your app. That avoids all of the issues discussed above. If you must sandbox your app then I see two paths forward. The first is to just live with the limitations discussed above. Specifically: You can only use a tool that’s within your static sandbox. For complex tools, you run the risk of the tool not working in the future. The alternative is to embed the tool within your app. This is only feasible if the tool is open source with a licence that’s compatible with your plans. That way you can build your own copy of the tool from the source. Of course this has its own drawbacks: It increases the size of your app. You can only run that version of the tool, which might not be the version that the user wants.
0
0
440
Feb ’24
Developer Program Documentation Access & Xcode
I am new to Apple 🍎 Development 👨‍💻 and Apple 🍎 Developer 👨‍💻 Forums. I have not joined the Apple 🍎 Developer 👨‍💻 Program yet. Is there any documentation 📖 that is only available to paid 💰 Apple 🍎 Developer 👨‍💻 Program members or is all of it freely available to those not (or not yet) in the paid 🚫💰 program? Is Xcode freely downloadable or does it require it be purchased like it used to be for non-program members?
2
0
372
Feb ’24
Which is the latest Apple Clang version/How to upgrade to the latest Apple Clang version?
I'm using Apple Clang to build a C++ project from the terminal. The following lines are printed when building the project: -- The C compiler identification is AppleClang 15.0.0.15000100 -- The CXX compiler identification is AppleClang 15.0.0.15000100 "clang --version" and "gcc --version" commands show me the following: Apple clang version 15.0.0 (clang-1500.1.0.2.5) Target: arm64-apple-darwin23.3.0 Thread model: posix The next function, while valid with other compilers, displays an error for Apple Clang: std::vector<char> read_file() { return {}; } error: non-aggregate type 'std::vector<char>' cannot be initialized with an initializer list return {}; My questions: Am I on the latest Apple Clang version? If not, how can I upgrade to it? So far, I've tried: "xcode-select --install" command, the result: xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates "softwareupdate -l" command, the result: Software Update Tool Finding available software No new software available. The installed XCode version on my MacBook is 15.2
3
0
1.4k
Feb ’24
The App cannot be installed because its integrity could not be verified (Apple Configurator)
So for testing purposes I am attempting to install my own app via Apple Configurator. its a very large App, but that should not be a problem. However, it gets stuck approx 3 quarters of the way and then goes "blank" and claims that its integrity could not be verified. is this an error with Apple Configurator or do i need to do something to fix this?
1
0
563
Feb ’24
How to run old react native version on latest Xcode? Are there any ways? Is it even possible to do so?
If anyone knows how to build iOS Deployment Target 11; (react-native app with 0.64.4 version) run and build on Xcode 15 with iOS 17 SDK, Mac M1 environment it will be a great help at least if you can share a guide. And I don't know is it possible or not. I would appreciate any advice you can give me. Thank You! (using Mac m1 with Sonoma.) I just ran a Hello World app from that version of react native and tried a few changes on Xcode 15, but didn't work for iOS. but Android worked well. used node 14. Is there any possibility of running this old version of RN in the latest Xcode building an archive and publish to the app store? (the main reason is we couldn't update the RN version due to some of the dependency versions.)
0
0
630
Feb ’24
xcodebuild archive fails when running on Xcode 15.2 and mcOS version 14.3.1
Build fails on apple store connect pipline, with following error: Run command: 'xcodebuild archive -workspace /Volumes/workspace/repository/ios/ISCDigitalConsignmentApp.xcworkspace -scheme 'eNVD Uat' -destination generic/platform=iOS -archivePath /Volumes/workspace/build.xcarchive -derivedDataPath /Volumes/workspace/DerivedData -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /Volumes/workspace/tmp/resultBundleStreama0a6fce1-622b-430a-aa34-16997d4e4d56.json -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=3C3JGD7M6T COMPILER_INDEX_STORE_ENABLE=NO -hideShellScriptEnvironment' When i looked in detail for error i found this as well: **No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'? hash.hpp:131** Note: the interesting thing note here is that it is working fine with xcode 14.3.1 Please help me out with this. Thanks
0
0
370
Feb ’24
keys
Hi, I'm following steps from a tutorial to build an app and am stuck at making a key! When I register a new key, it doesn't look like how it does in the tutorial. Instead of getting a simple window with key name and admin, i get a new page with way more options. Any idea why?
0
0
174
Feb ’24
Crash reports not attached to xcresult when running with xcodebuild
Hi there, I'm trying to figure out an issue I'm seeing where the xcresult bundle isn't including the crash report after building and running with xcodebuild. I have a simple test app that has a single button that intentionally crashes and an XCUI test to run it. The UI Test also passes which can probably be explained by the lack of any asserts after clicking the button, but I assumed the app crashing would fail the test. The app itself is a Mac OS app with a single button called "Crash" that links to a method: - (IBAction)crash:(id)sender { @throw NSInternalInconsistencyException; } and a test method: XCUIApplication *app = [[XCUIApplication alloc] init]; [app launch]; XCUIElement *crashButton = [[XCUIApplication alloc] init].windows[@"Window"].buttons[@"Crash"]; XCTAssert([crashButton exists]); [crashButton click]; There is an ips file corresponding to the crash in ~/Library/Logs/DiagnosticReports so the crash gets written, but the test passes. After using xcresulttool to dump the Diagnostics folder from the xcresult bundle, I see these lines in the session log: 10:59:20.790 xcodebuild[23184:6634391] Handling Crash: MacAppTest (23189) main. libsystem_c.dylib: abort() called 10:59:20.792 MacAppTestUITests-Runner[23188:6635181] Process crashed with pid:23189 path:/Users/USER/Library/Developer/Xcode/DerivedData/MacAppTest-dxrjhasbuvyffhenipmdemzdpdht/Build/Products/Debug/MacAppTest.app/Contents/MacOS/MacAppTest bundleID:com.company.MacAppTest summary:main 10:59:20.792 MacAppTestUITests-Runner[23188:6635181] Ignoring crash for com.company.MacAppTest:23189 because we are not currently tracking it 10:59:21.371 MacAppTestUITests-Runner[23188:6634605] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x6000025fd4d0> 10:59:21.371 MacAppTestUITests-Runner[23188:6634605] Wait <XCTWaiterWait: 0x600003e1b540> completed after 1.003s 10:59:21.371 MacAppTestUITests-Runner[23188:6634605] cleaning up delay The Ignoring crash for com.company.MacAppTest:23189 because we are not currently tracking it is what I suspect is the issue. How can I get the UITest to track the app so that when it crashes, the test fails? Some other lines from the logarchive file that may be helpful: 2024-02-14 10:59:20.612346 -0800 osanalyticshelper xpc log creation type 309 result success: /Users/<REDACTED>/Library/Logs/DiagnosticReports/MacAppTest-2024-02-14-105920.ips 2024-02-14 10:59:20.613030 -0800 testmanagerd Calling new file handler <__NSMallocBlock__: 0x6000031761f0> for MacAppTest-2024-02-14-105920.ips 2024-02-14 10:59:20.614240 -0800 ReportCrash client log create type 309 result success: /Users/<REDACTED>/Library/Logs/DiagnosticReports/MacAppTest-2024-02-14-105920.ips 2024-02-14 10:59:20.615417 -0800 testmanagerd Read crash report from /Users/<REDACTED>/Library/Logs/DiagnosticReports/MacAppTest-2024-02-14-105920.ips, got 17327 bytes of data Thanks!
0
0
551
Feb ’24
XCTest '-enablePerformanceTestsDiagnostics' not generating memgraph.
I am running xctests from command line on XCode 15.2 on iOS 17.2 simulators. As per WWDC2021 video on Memory issues, I am passing `-enablePerformanceTestsDiagnostics Yes' in following xcodebuild command. xcodebuild test -project project_name.xcodeproj -scheme test-scheme -destination 'platform=iOS Simulator,name=iPhone 15 Pro' -enablePerformanceTestsDiagnostics YES Final logs before test results: Tests-Runner(16873) MallocStackLogging: stack logs deleted from /private/tmp/stack-logs.16873.10148c000.Tests-Runner.M6gFw .xcresults is generated but no memgraph file is attached along with it.
0
0
508
Feb ’24
MacApp Store & Java support in 2024???
Hello, It is year 2024. I am submitting application to MacOS App Store that uses Java JDK runtime (OpenJDK21). During review process, the App Review team has referenced 2.4.5 https://developer.apple.com/app-store/review/guidelines/#performance here is the exact verbiage in guideline (viii) Apps should run on the currently shipping OS and may not use deprecated or optionally installed technologies (e.g. Java) Can someone clarify -- Has Java use been entirely "deprecated" from App Store per guideline? Java is specifically mentioned as a deprecated technology (?). What specific technologies are deprecated vs allowed? To install and distribute the app , we include the Java runtime inside our app bundle. For a sandboxed app, only the sandbox boundary has access to the runtime. Why isn't this allowed? Java apps were allowed into the store in past, with bundled JVM runtimes. Has policy changed?
1
0
560
Feb ’24
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 for for share button
Hello, I have very simple code for share button ============================================= @IBAction func shareButtonTapped() { let textToShare = "some text here" let cafeURL = URL(string: "https://example.com")! let activityViewController = UIActivityViewController(activityItems: [textToShare, cafeURL], applicationActivities: nil) // for iPad if let popoverController = activityViewController.popoverPresentationController { popoverController.sourceView = self.view } DispatchQueue.main.async { self.present(activityViewController, animated: true, completion: nil) } } ========================================== but after tapping on that button I have this logs in console Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)}> (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port connection invalidated But on real device sharescreen is appearing and all works fine. Anyone know how fix this issue with log errors? Thanks!
0
0
996
Feb ’24
How to share macOS ARM app without an Apple developer account
I have successfully built TeXstudio on my M2 MacBook and I would like to share the binary with other users (because the official releases do not have a binary for Apple Silicon). The issue is that, after packaging, the app does not open. Reading the crash report, the reason turns out to be: Termination Reason: Namespace CODESIGNING, Code 2 Invalid Page For it to work, I had to extract the app to /Applications and then: codesign --force --deep --sign - /Applications/texstudio.app How can I share the .dmg so that other users can use the app? Thank you in advance for your help!
0
0
256
Feb ’24
Installer pkg does not install on some machines "Installation checks failed." without any error description
As the post title suggest, after building a pkg that runs and installs on developer machine (and some other machines) some machines show the following error immediately when opening the pkg "[App Name] can’t be installed on this computer." The only errors on viewable in logs are: Feb 21 19:25:23 Installer[68486]: Could not load resource readme: (null) Feb 21 19:25:23 Installer[68486]: Installation checks failed. Feb 21 19:25:23 Installer[68486]: Installation check failure. . Mach1 Spatial System can’t be installed on this computer.. I cannot figure out where else to look, i removed all the "requirements" in the pkg settings and I use Packages app to make the pkg and have done so for several deployed versions. Is there anyway to get any debug info on the "checks" that failed and how to view these?
0
0
327
Feb ’24
ButtonView File with AuthenticationFormProtocol: Where to Put in Code?
Hello! This is my first time posting a question on a form. So sorry ahead of time if I am not doing something right and please let me know how I can fix it! I am new to swift and I have been following a video by AppStuff. https://youtu.be/QJHmhLGv-_0?si=OwLGXKNTc3m-UH7r&amp;t=5914 . The link is time stamped to the part of the video I need help with. My question is: Where do I put the AuthenticationFormProtocol var formIsValid so that way I can call on formIsValid to use the .disabled and .opacity in the ButtonView File depending on if formIsValid is true or not? I deviated from the video by making a new file called ButtonView so that way I didn't have to copy and paste code that I would be using in two different places. ButtonView File import SwiftUI struct ButtonView: View { let printTitle: String let title: String let systemIcon: String //@Binding var disabledPlaceHolder: String let taskAction: () -&gt; Void var body: some View { Button(action: { taskAction() }) { HStack { Text(title) .fontWeight(.semibold) Image(systemName: systemIcon) } .foregroundStyle(Color(.white)) .frame(width: UIScreen.main.bounds.width - 32, height: 48) } .background(Color(.systemBlue)) //.disabled(disabledPlaceHolder) //.opacity(disabledPlaceHolder ? 1.0 : 0.5) .clipShape(RoundedRectangle(cornerRadius: 10)) .padding(.bottom, 50) } } #Preview { ButtonView(printTitle: "Sign user up...", title: "Sign Up", systemIcon: "arrow.right", //disabledPlaceHolder: .constant(""), taskAction: {}) } LoginView File import SwiftUI struct LoginView: View { @State private var email = "" @State private var password = "" @EnvironmentObject var viewModel: AuthViewModel var body: some View { NavigationStack { VStack { //image Image("TestLogo") .resizable() .scaledToFill() .frame(width: 100, height: 120) .clipShape(RoundedRectangle(cornerRadius: 20)) .padding(.vertical, 32) //form fields VStack(spacing: 24) { InputView(text: $email, title: "Email", placeholder: "name@example.com") .textInputAutocapitalization(.none) InputView(text: $password, title: "Password", placeholder: "Enter your password", isSecureField: true) } .padding(.horizontal) .padding(.top, 12) //sign in button ButtonView(printTitle: "Login In", title: "SIGN IN", systemIcon: "arrow.right") { Task { try await viewModel.signIn(withEmail: email, password: password) } } // .disabled(formIsValid) // .opacity(formIsValid ? 1.0 : 0.5) Spacer() //signup button NavigationLink { RegistrationView() .navigationBarBackButtonHidden(true) } label: { HStack(spacing: 3) { Text("Don't have an account?") Text("Sign Up") .fontWeight(.bold) } .font(.system(size: 14)) } } } } } extension LoginView: AuthenticationFormProtocol { var formIsValid: Bool { return !email.isEmpty &amp;&amp; email.contains("@") &amp;&amp; !password.isEmpty &amp;&amp; password.count &gt; 5 } } RegistationView File struct RegistrationView: View { @State private var email = "" @State private var fullName = "" @State private var password = "" @State private var confirmPassword = "" @EnvironmentObject var viewModel: AuthViewModel @Environment(\.dismiss) var dismiss var body: some View { VStack { //image Image("TestLogo") .resizable() .scaledToFill() .frame(width: 100, height: 120) .clipShape(RoundedRectangle(cornerRadius: 20)) .padding(.vertical, 32) //form fields VStack(spacing: 24) { InputView(text: $email, title: "Email", placeholder: "name@example.com") .textInputAutocapitalization(.none) InputView(text: $fullName, title: "Full name", placeholder: "Enter your name") InputView(text: $password, title: "Password", placeholder: "Enter your password", isSecureField: true) InputView(text: $confirmPassword, title: "Confirm Password", placeholder: "Confirm your password", isSecureField: true) } .padding(.horizontal) .padding(.top, 12) //sign up button ButtonView(printTitle: "Create User", title: "CREATE USER", systemIcon: "arrow.right") { Task { try await viewModel.createUser(withEmail: email, password: password, fullname: fullName) } } // .disabled(formIsValid) // .opacity(formIsValid ? 1.0 : 0.5) Spacer() Button { dismiss() } label: { HStack(spacing: 3) { Text("Already have an account?") Text("Sign In") .fontWeight(.bold) } .font(.system(size: 14)) } } } } extension RegistrationView: AuthenticationFormProtocol { var formIsValid: Bool { return !email.isEmpty &amp;&amp; email.contains("@") &amp;&amp; !password.isEmpty &amp;&amp; password.count &gt; 5 &amp;&amp; confirmPassword == password &amp;&amp; !fullName.isEmpty } }
1
0
361
Feb ’24
Unity exported game with Google Signin, FireStore & FB SDKs build failing for iOS
Hi, I have a unity game which i am trying to export to iOS. The build was working fine until i had to integrate the following SDKs into my project. Facebook SDK Firebase (firestore, messaging, auth) Google ads My Xcode version is: 15.1 Build target: 12 i'm getting the following error in the logs while trying to build: Any help would be appreciated The error is Undefined symbols and linker command failed with exit code 1 (use -v to see invocation) with output ld: Undefined symbols: absl::lts_20220623::variant_internal::ThrowBadVariantAccess(), referenced from: firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt;&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt;&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) firebase::firestore::DocumentReference const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;firebase::firestore::DocumentReference const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) std::__1::vector&lt;firebase::firestore::FieldValue, std::__1::allocator&lt;firebase::firestore::FieldValue&gt;&gt; const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;std::__1::vector&lt;firebase::firestore::FieldValue, std::__1::allocator&lt;firebase::firestore::FieldValue&gt;&gt; const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) std::__1::unordered_map&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;, firebase::firestore::FieldValue, std::__1::hash&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::equal_to&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::allocator&lt;std::__1::pair&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt; const, firebase::firestore::FieldValue&gt;&gt;&gt; const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;std::__1::unordered_map&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;, firebase::firestore::FieldValue, std::__1::hash&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::equal_to&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::allocator&lt;std::__1::pair&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt; const, firebase::firestore::FieldValue&gt;&gt;&gt; const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt; const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt; const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) absl::lts_20220623::optional_internal::throw_bad_optional_access(), referenced from: absl::lts_20220623::optional&lt;firebase::firestore::_google_firestore_v1_Value&gt;::value() &amp;&amp; in libFirebaseCppFirestore.a[arm64][35](document_snapshot_main.cc.o) absl::lts_20220623::optional&lt;firebase::firestore::model::Document&gt;::value() const &amp; in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) absl::lts_20220623::optional&lt;std::__1::vector&lt;firebase::firestore::DocumentChange, std::__1::allocator&lt;firebase::firestore::DocumentChange&gt;&gt;&gt;::value() &amp; in libFirebaseCppFirestore.a[arm64][41](query_snapshot_main.cc.o) absl::lts_20220623::optional&lt;std::__1::vector&lt;firebase::firestore::DocumentSnapshot, std::__1::allocator&lt;firebase::firestore::DocumentSnapshot&gt;&gt;&gt;::value() &amp; in libFirebaseCppFirestore.a[arm64][41](query_snapshot_main.cc.o) absl::lts_20220623::optional&lt;std::__1::unordered_set&lt;firebase::firestore::FieldPath, std::__1::hash&lt;firebase::firestore::FieldPath&gt;, std::__1::equal_to&lt;firebase::firestore::FieldPath&gt;, std::__1::allocator&lt;firebase::firestore::FieldPath&gt;&gt;&gt;::value() const &amp; in libFirebaseCppFirestore.a[arm64][43](user_data_converter_main.cc.o) firebase::firestore::api::AggregateQuery::Get(std::__1::function&lt;void (firebase::firestore::util::StatusOr&lt;long long&gt; const&amp;)&gt;&amp;&amp;), referenced from: firebase::firestore::AggregateQueryInternal::Get(firebase::firestore::AggregateSource) in libFirebaseCppFirestore.a[arm64][29](aggregate_query_main.cc.o) firebase::firestore::api::operator==(firebase::firestore::api::AggregateQuery const&amp;, firebase::firestore::api::AggregateQuery const&amp;), referenced from: firebase::firestore::operator==(firebase::firestore::AggregateQueryInternal const&amp;, firebase::firestore::AggregateQueryInternal const&amp;) in libFirebaseCppFirestore.a[arm64][29](aggregate_query_main.cc.o) firebase::firestore::operator==(firebase::firestore::AggregateQuerySnapshotInternal const&amp;, firebase::firestore::AggregateQuerySnapshotInternal const&amp;) in libFirebaseCppFirestore.a[arm64][30](aggregate_query_snapshot_main.cc.o) firebase::firestore::api::Query::Count() const, referenced from: firebase::firestore::QueryInternal::Count() in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) firebase::firestore::core::Query::normalized_order_bys() const, referenced from: firebase::firestore::QueryInternal::ToBound(firebase::firestore::QueryInternal::BoundPosition, firebase::firestore::DocumentSnapshot const&amp;) const in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) firebase::firestore::QueryInternal::ToBound(firebase::firestore::QueryInternal::BoundPosition, firebase::firestore::DocumentSnapshot const&amp;) const in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) firebase::firestore::QueryInternal::ToBound(firebase::firestore::QueryInternal::BoundPosition, firebase::firestore::DocumentSnapshot const&amp;) const in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) vtable for firebase::firestore::api::AggregateQuery, referenced from: firebase::firestore::api::AggregateQuery::AggregateQuery(firebase::firestore::api::AggregateQuery const&amp;) in libFirebaseCppFirestore.a[arm64][2](aggregate_query.cc.o) firebase::firestore::api::AggregateQuery::~AggregateQuery() in libFirebaseCppFirestore.a[arm64][2](aggregate_query.cc.o) clang: error: linker command failed with exit code 1 (use -v to see invocation)
7
1
854
Mar ’24