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

Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope #1124

Closed
5 of 11 tasks
MingSern opened this issue Nov 10, 2022 · 17 comments · Fixed by #1113
Closed
5 of 11 tasks

Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope #1124

MingSern opened this issue Nov 10, 2022 · 17 comments · Fixed by #1113

Comments

@MingSern
Copy link

Platform:

  • Dart
  • Flutter Android or iOS
  • Flutter Web

IDE:

  • VSCode
  • IntelliJ/AS
  • XCode
  • Other, which one?

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

  • Enabled
  • Disabled

Platform installed with:

  • pub.dev
  • GitHub

Output of the command flutter doctor -v below:

Click me
Result bundle written to path:
              /var/folders/9k/jkrgwx8d7tg2jg5yqhw2xsk00000gp/T/flutter_tools.jChKIC/flutter_ios_build_temp_dir8cELbH/temporary_xcresult_bundle
         
         
[  +53 ms] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:163:39
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:166:34
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:172:43
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:180:24
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:195:16
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:197:16
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:229:13
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:230:13
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:384:29
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:389:8
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:395:40
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:418:12
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:424:26
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:437:12
         
[        ] Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
         /Users/mingsern/Development/flutter/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classes/SentryFlutterPluginApple.swift:443:26
         
[   +1 ms] Could not build the application for the simulator.
[        ] Error launching application on iPhone 14 Pro Max.
[   +1 ms] "flutter run" took 24,349ms.
[   +1 ms] 
         #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
         #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:713:9)
         <asynchronous suspension>
         #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1209:27)
         <asynchronous suspension>
         #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
         <asynchronous suspension>
         #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
         <asynchronous suspension>
         #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
         <asynchronous suspension>
         #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
         <asynchronous suspension>
         #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
         <asynchronous suspension>
         #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
         <asynchronous suspension>
         #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
         <asynchronous suspension>
         #10     main (package:flutter_tools/executable.dart:91:3)
         <asynchronous suspension>
         
         
[        ] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

The version of the SDK (See pubspec.lock):
6.15.0


I have the following issue:

Running flutter run --flavor=development on iOS 16, iPhone 14 Pro Max simulator, this error pops up.
Already tried flutter pub get, clean, pod install, update, cache clean, cache repair, seems like none of it works.

Steps to reproduce:

  • run flutter run --flavor=development

Actual result:

  • Unable to run flutter app

Expected result:

  • Able to run flutter app without any problem
@alainburindi
Copy link

Having the same issue on iOS 16, iPhone 14 Pro Max simulator

@linguofeng
Copy link

Having the same issue on iOS 16, iPhone 13 simulator

@boalberto
Copy link

boalberto commented Nov 10, 2022

I have the same error when using flutter run on iOS 16, iPhone Pro Max Simulator.

Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running pod install...                                           2,849ms
Running Xcode build...
Xcode build done.                                            7.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
    	/var/folders/sz/h_k163c96jd2khj7176vrmy00000gn/T/flutter_tools.ctlTzq/flutter_ios_build_temp_diryBbs
    	vn/temporary_xcresult_bundle

    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:164:40: error: cannot find 'PrivateSentrySDKOnly' in scope
                    infos["user"] = ["id": PrivateSentrySDKOnly.installationID]
                                           ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:167:35: error: cannot find 'PrivateSentrySDKOnly' in scope
                if let integrations = PrivateSentrySDKOnly.options.integrations {
                                      ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:173:44: error: cannot find 'PrivateSentrySDKOnly' in scope
                infos["package"] = ["version": PrivateSentrySDKOnly.getSdkVersionString(),
                                               ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:181:25: error: cannot find 'PrivateSentrySDKOnly' in scope
          let debugImages = PrivateSentrySDKOnly.getDebugImages() as [DebugMeta]
                            ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:196:17: error: cannot find 'PrivateSentrySDKOnly' in scope
                    PrivateSentrySDKOnly.appStartMeasurementHybridSDKMode = true
                    ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:198:17: error: cannot find 'PrivateSentrySDKOnly' in scope
                    PrivateSentrySDKOnly.framesTrackingMeasurementHybridSDKMode = true
                    ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:230:14: error: cannot find 'PrivateSentrySDKOnly' in scope
                (PrivateSentrySDKOnly.options.enableAutoSessionTracking ||
                 ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:231:14: error: cannot find 'PrivateSentrySDKOnly' in scope
                 PrivateSentrySDKOnly.options.enableOutOfMemoryTracking) {
                 ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:385:30: error: cannot find 'PrivateSentrySDKOnly' in scope
            guard let envelope = PrivateSentrySDKOnly.envelope(with: data) else {
                                 ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:390:9: error: cannot find 'PrivateSentrySDKOnly' in scope
            PrivateSentrySDKOnly.capture(envelope)
            ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:396:41: error: cannot find 'PrivateSentrySDKOnly' in scope
            guard let appStartMeasurement = PrivateSentrySDKOnly.appStartMeasurement else {
                                            ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:419:13: error: cannot find 'PrivateSentrySDKOnly' in scope
          guard PrivateSentrySDKOnly.isFramesTrackingRunning else {
                ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:425:27: error: cannot find 'PrivateSentrySDKOnly' in scope
          let currentFrames = PrivateSentrySDKOnly.currentScreenFrames
                              ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:438:13: error: cannot find 'PrivateSentrySDKOnly' in scope
          guard PrivateSentrySDKOnly.isFramesTrackingRunning else {
                ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:444:27: error: cannot find 'PrivateSentrySDKOnly' in scope
          let currentFrames = PrivateSentrySDKOnly.currentScreenFrames
                              ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/in_app_review-2.0.4/ios/Clas
    ses/InAppReviewPlugin.m:91:14: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0
    [-Wdeprecated-declarations]
            [app openURL:url];
                 ^~~~~~~
                 openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/username/dev/repo/bygglet_app/ios/Pods/Target Support
    Files/in_app_review/in_app_review-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSi
    mulator16.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:124:1: note:
    'openURL:' has been explicitly marked deprecated here
    - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:",
    ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    1 warning generated.
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/in_app_review-2.0.4/ios/Clas
    ses/InAppReviewPlugin.m:91:14: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0
    [-Wdeprecated-declarations]
            [app openURL:url];
                 ^~~~~~~
                 openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/username/dev/repo/bygglet_app/ios/Pods/Target Support
    Files/in_app_review/in_app_review-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSi
    mulator16.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:124:1: note:
    'openURL:' has been explicitly marked deprecated here
    - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:",
    ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    1 warning generated.
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:164:40: error: cannot find 'PrivateSentrySDKOnly' in scope
                    infos["user"] = ["id": PrivateSentrySDKOnly.installationID]
                                           ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:167:35: error: cannot find 'PrivateSentrySDKOnly' in scope
                if let integrations = PrivateSentrySDKOnly.options.integrations {
                                      ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:173:44: error: cannot find 'PrivateSentrySDKOnly' in scope
                infos["package"] = ["version": PrivateSentrySDKOnly.getSdkVersionString(),
                                               ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:181:25: error: cannot find 'PrivateSentrySDKOnly' in scope
          let debugImages = PrivateSentrySDKOnly.getDebugImages() as [DebugMeta]
                            ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:196:17: error: cannot find 'PrivateSentrySDKOnly' in scope
                    PrivateSentrySDKOnly.appStartMeasurementHybridSDKMode = true
                    ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:198:17: error: cannot find 'PrivateSentrySDKOnly' in scope
                    PrivateSentrySDKOnly.framesTrackingMeasurementHybridSDKMode = true
                    ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:230:14: error: cannot find 'PrivateSentrySDKOnly' in scope
                (PrivateSentrySDKOnly.options.enableAutoSessionTracking ||
                 ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:231:14: error: cannot find 'PrivateSentrySDKOnly' in scope
                 PrivateSentrySDKOnly.options.enableOutOfMemoryTracking) {
                 ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:385:30: error: cannot find 'PrivateSentrySDKOnly' in scope
            guard let envelope = PrivateSentrySDKOnly.envelope(with: data) else {
                                 ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:390:9: error: cannot find 'PrivateSentrySDKOnly' in scope
            PrivateSentrySDKOnly.capture(envelope)
            ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:396:41: error: cannot find 'PrivateSentrySDKOnly' in scope
            guard let appStartMeasurement = PrivateSentrySDKOnly.appStartMeasurement else {
                                            ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:419:13: error: cannot find 'PrivateSentrySDKOnly' in scope
          guard PrivateSentrySDKOnly.isFramesTrackingRunning else {
                ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:425:27: error: cannot find 'PrivateSentrySDKOnly' in scope
          let currentFrames = PrivateSentrySDKOnly.currentScreenFrames
                              ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:438:13: error: cannot find 'PrivateSentrySDKOnly' in scope
          guard PrivateSentrySDKOnly.isFramesTrackingRunning else {
                ^~~~~~~~~~~~~~~~~~~~
    /Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Cl
    asses/SentryFlutterPluginApple.swift:444:27: error: cannot find 'PrivateSentrySDKOnly' in scope
          let currentFrames = PrivateSentrySDKOnly.currentScreenFrames
                              ^~~~~~~~~~~~~~~~~~~~
    note: Building targets in dependency order
    warning: Run script build phase 'Run Script' will be run during every build because it does not
    specify any outputs. To address this warning, either add output dependencies to the script phase, or
    configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
    (in target 'Runner' from project 'Runner')
    warning: Run script build phase 'Thin Binary' will be run during every build because it does not
    specify any outputs. To address this warning, either add output dependencies to the script phase, or
    configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
    (in target 'Runner' from project 'Runner')

    Result bundle written to path:
    	/var/folders/sz/h_k163c96jd2khj7176vrmy00000gn/T/flutter_tools.ctlTzq/flutter_ios_build_temp_diryBbs
    	vn/temporary_xcresult_bundle


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:163:39


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:166:34


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:172:43


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:180:24


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:195:16


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:197:16


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:229:13


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:230:13


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:384:29


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:389:8


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:395:40


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:418:12


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:424:26


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:437:12


Swift Compiler Error (Xcode): Cannot find 'PrivateSentrySDKOnly' in scope
/Users/username/dev/tools/flutter_3_3_7/.pub-cache/hosted/pub.dartlang.org/sentry_flutter-6.15.0/ios/Classe
s/SentryFlutterPluginApple.swift:443:26


Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.

@marandaneto
Copy link
Contributor

marandaneto commented Nov 10, 2022

Hey, thanks for reaching out.
This is for sure caching issue, be sure to clean up the pod caching, and flutter caching, and install it again.
I just created an empty project and installed the latest version, everything worked out.
Usually this works:

flutter clean
flutter pub get
cd ios
rm -f Podfile.lock
pod install
cd ..
flutter run

@mostafasany
Copy link

@marandaneto Tried the above steps and still failing locally and also failing the Github actions build machine

@marandaneto
Copy link
Contributor

@marandaneto Tried the above steps and still failing locally and also failing the Github actions build machine

Can you provide a minimal reproducible example?
We also run tests on CI and everything is green.
@brustolin @philipphofmann are you aware of any issue with v7.30.1?

@noinskit
Copy link

I have the same problem and I'm quite sure it's not a simple caching issue, because it's happening for me in CI/CD where every build attempt checks out a clean repo.

@marandaneto
Copy link
Contributor

Are you adding the dep via pub.dev (pubspec) or linking it directly to Github?

@marandaneto
Copy link
Contributor

It could be because the pod operator ~> is being used and the latest release (not linked yet) has a breaking change.
#1113 should fix it.
I can't reproduce this locally tho.

@TomBeckett
Copy link

TomBeckett commented Nov 10, 2022

@marandaneto Same error for us:

We've tried the above recommendations of

flutter clean
flutter pub get
cd ios
rm -f Podfile.lock
pod install
cd ..
flutter run

But no luck. Will update reply if we can reproduce it on more machines (so far it only affects one).

EDIT: We've downgraded back to 6.11.1 and its all working again for us - including GitHub Actions.

Additional info:

  • xCode Version 14.1 (14B47b) (Latest)
  • Mac OS 12.5.1 (Not Latest)

@marandaneto
Copy link
Contributor

Cutting a release in the next few minutes.

@sinanhaci
Copy link

I have the same problem, I cleared the cache but no improvement.

@mostafasany
Copy link

I believe the hotfix build failed https://github.com/getsentry/sentry-dart/actions/runs/3436128962 due to timeout

@mostafasany
Copy link

Any expectations when release 6.15.1 will be ready on pub.dev?

@brustolin
Copy link
Collaborator

@mostafasany is already there.

@marandaneto
Copy link
Contributor

https://github.com/getsentry/sentry-dart/releases/tag/6.15.1
Please let us know if that worked, thanks for your patience.

@mostafasany
Copy link

mostafasany commented Nov 10, 2022

I can confirm its working both Locally and on the build machine
Thanks for acting quickily, kudos to the whole team

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

Successfully merging a pull request may close this issue.

10 participants