Error FBSOpenApplicationErrorDomain 1

I am trying to run an iOS application ported from Swift 1.2 to Swift 2.0 in Xcode 7 using iPhone Simulator (any), I get the following error:

The operation could not be completed. (FBSOpenApplicationErrorDomain error 1.)

I already tried to reset the parameters and contents of the simulator, exit Xcode, clear the project, etc.

+49
ios xcode swift2 xcode7 ios-simulator
Jul 10 '15 at 21:58
source share
16 answers

I had the same error after upgrading Xcode to version 7.0. After several hours of struggle, I found that to start the action in my active scheme there was some kind of empty setting of the environment variable (I don’t know why it was there). Removing this empty environment variable fixed the problem immediately.

+48
01 Oct '15 at 20:38
source share

This error occurs when the previous launch of the application is still saved in the background, even if you clicked the Stop button in Xcode. Try to manually kill the application in the simulator: cmd + shift + H twice to open the running applications, drag the application to kill it. Note cmd + shift + H is a shortcut to go to the main screen. Then run a new run and it should work fine :)

+19
Oct 28 '15 at 10:21
source share
  • Simulator β†’ Reset Contents and Settings
  • Exit Simulator
  • Run the test cases again.
+6
Oct 23 '15 at 17:05
source share

In the tvOS application, you can go to the simulator and uninstall the application, and then restart the program.

+6
25 Oct '15 at 1:46
source share

If other fixes do not work

These attempts went through:

  • Exit the application in the simulator
  • reset simulator
  • remote application from the simulator
  • Disable application transport security worldwide (not recommended)
  • Disabled all background modes the problem always returns, preventing debugging sessions

That was my fix.

It seems that the schema manager allows you to use the field without the arguments that caused my problem.

 Product menu > Scheme > Edit Scheme > Run > Arguments > Environment Variables 

If there is a checkmark with an empty field next to it, uncheck the box.

I got the error code "1". Hope this works for you too.

+4
Nov 08 '15 at 8:48
source share

In my case, I was able to solve it using another simulator. This happened sequentially with the iPhone 4S simulator, but as soon as I switched to the iPhone 6 Plus simulator, the error disappeared.

+3
Dec 10 '15 at
source share

This error is not (I believe) something related to the SDK for Facebook. I get this and I don’t have any SDK for Facebook at all.

I found that although Xcode does not show a reason for the error, there was what the simulator log does.

When you get this error, the simulator will start, so replace it, and then select "Open System Log ..." in the "Debug" menu.

Once the log appears on the screen, navigate to it and you will see much more information (including a stack trace, if you're lucky) about what went wrong.

In my case, this was an exception because the file was missing or missing.

+2
Oct 05 '15 at 11:39 on
source share

In my case, I decide how it is.

Just release the application you are working on while running in the background.

it works for me and hopes it works for you.

+1
Oct. 15 '15 at 7:13
source share

After many problems, I think the problem is that you can run an application that runs in the background. Stopping the application from xcode doesn't actually stop it (Strange right), you need to double-click the home key, which is cmd + shift + h, find the application and kill it. I'm still trying to find a better way to do this, as it is tedious, but at least it will work temporarily.

+1
Nov 09 '15 at 15:31
source share

The completion (Command + Q) of the simulator and its launch again solved the problem.

+1
Oct 21 '16 at 10:44
source share

I got this error with Xamarin iOS, Visual Studio for Mac 7.2, compilation for iPad 2, iOS 9.3. The solution was to change the architectures of the supported iOS designs to i386 + x86_64 , under Project β†’ Settings β†’ iOS Design β†’ Supported Architectures .

+1
Oct 19 '17 at 10:49 on
source share

I am sure this problem may be related to ATS on iOS 9.

Be sure to follow the steps provided by the FB team to get their SDKs working on iOS 9. Release notes .

EXPLANATION

Application Transport Security

"App Transport Security is a feature that improves the security of connections between an application and web services. This feature consists of default connection requirements that correspond to the best secure connection methods. Applications can override this default behavior and disable transport security."

"All connections using the NSURLConnection, CFURL, or NSURLSession APIs use the default behavior for the Transport Security application in applications built for iOS 9.0 or later and OS X version 10.11 or later. Inappropriate connections will not work."

Source: Apple - Application Transport Security Technology

This means that if you try to connect to an application created for iOS 9.0 or later, or OS X v10.11 or later, and this connection does not meet the ATS requirements, the connection will fail.

Decision

There are two solutions to this problem.

Recommended

Make sure your connections meet ATS requirements.

"Temporary solution"

Disable the ATS of your application to allow connections that do not match this.

This may be a temporary solution, because since you can now disable ATS from being used in your application, this option may be removed in future versions and you will be forced to use ATS as the default security feature.

FACEBOOK SDK

Facebook to win some time and let its user continue to use their SDK in iOS 9.0 and OS X 10.11. They chose the "Workaround", and because of this you have to.

  • Disable ATS from your application.
  • or whitelists of Facebook servers for network requests.

To do this later, you must add the following to your target .plist

 <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>facebook.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> <key>fbcdn.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> <key>akamaihd.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict> 

In addition, you may need to make other changes. If you use any of the Facebook dialogs (for example, "Login, Share, App Invites, etc."), which can carry out the transition to Facebook applications.

Source: Facebook - Preparing Your iOS9 Apps

0
Sep 29 '15 at 6:39
source share

Product menu> Schema> Change schema> Run> Arguments> Environment variables If there is a checkmark with an empty field next to it, uncheck the box.

I get The operation could not be completed (error "1"). It has been fixed, just uncheck

0
02 Sep '16 at 23:31
source share

Try resetting your simulator

 sudo rm -rf /private/tmp/com.apple.CoreSimulator.SimDevice.* 
0
Oct 12 '18 at 23:29
source share

Following Denis's accepted answer, the impossible places he mentioned are first found in the Simulator System Log. (Mac Xcode Simulator> Debugging> Open Syslog ..)

In my case, I'm trying to debug the Xamarin Forms welcome world for the iPad 2 iOS 9.3 simulator. VS2017Mac displays the error above, but the Simulator syslog provides more information

Program specified by service does not contain one of the requested architectures: XPC_FLAGS=0x0

As mentioned in this thread , I need to right-click the iOS project and change Build > iOS Build > Supported architectures to i386 + x86_64 . This makes sense, since prior to iOS 11, Apple supports both 32-bit and 64-bit applications.

It is also useful to update the simulator. (Simulator> Equipment> Erase all contents and settings ..). This ensures that the application deployed to the simulator contains the latest changes.

0
Dec 05 '18 at 2:23
source share

I tried to launch Detox using the React Native app, and the Detox getting started guide recommended this command:

Very bad build team

 $ xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build 

... that had all kinds of crashes in Xcode Version 10.2.1 (10E1001)

So I changed the team until it was successfully built. However, I (out of ignorance) built the wrong platform. My xcodebuild generated Debug-iphoneos and not Debug-iphonesimulator . Thus, even if xcodebuild successful, whenever I xcodebuild application into a simulator and try to run it, it fails with:

 $ xcrun simctl launch 35CC1D95-CDC2-4C8F-9B68-8E13EF7127D8 com.mycompany.iosapp com.mycompany.iosapp: -1 An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1): The request to open "com.mycompany.iosapp" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified. Underlying error (domain=FBSOpenApplicationErrorDomain, code=1): The operation couldnt be completed. (FBSOpenApplicationErrorDomain error 1.) 

Thus, the fix was changed by the build command to build for the correct platform.

Bad build command:

 $ xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Debug -derivedDataPath ios/build 

Good build command:

 $ xcodebuild -workspace ios/MyApp.xcworkspace -configuration Debug -scheme MyApp -destination 'platform=iOS Simulator,name=iPad (6th generation)' -derivedDataPath ios/build 
0
Jul 14 '19 at 6:18
source share



All Articles