Search code examples
ioswatchkit

"Operation could not be completed" after adding App Transport Security to watchkit app


After adding this to the info.plist of the Watchkit app:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

I get the folloging when trying to get it to run on the simulator.

The operation couldn’t be completed. (LaunchServicesError error 0.)

I cleaned the build, reset all simulators and emptied the "Derived Build" folder. No avail.


Solution

  • Here is answer

    WatchOS 2: "Cannot Install Watch App" "Error Launching 'TestApp WatchKit App Extension'"

    Put this key in WatchOS extension info.plist instead of WatchOS App plist.