Safari app extension fails to load after introducing cocoapods

OSX 10.12.1

Safari Version 10.0.1 (12602.2.14.0.7)

Xcode 8.1

cocoapods 1.1.1


I'm following a very small set of steps where cocoapods is introduced into a Safari App extension project. The act of doing this causes the appex to fail to load. It appears very briefly in the Safari Extension pane and then disappears. This is very easy to recreate:


1) Open Xcode, create a new project called TEST

2) Add a Safari Extension target to the project TEST-EXT


At this point you get the template containing app and a toolbar button in Safari (Provided Allow Usigned Extensions is checked under the Safari Develop menu). This works as expected.


I now add a Podfile to the root directory of the project (i've tried other cocoapod projects, all cause the same issue), its contents is:


source 'https://github.com/CocoaPods/Specs.git'

platform :osx, "10.12.1"

use_frameworks!

target "TEST" do

pod 'Starscream', :git => 'https://github.com/daltoniam/Starscream.git', :tag => '2.0.2'

end


From the command line, I run pod install. Now I need to open the 'pod install' created workspace file. Now when I build the TEST project the containing app starts as expected, however, TEST-EXT briefly appears in the Safari Extension pane before immediately disappearing.


I followed some advice from the pod install and set Pods->Build Settings->Always Embed Swift Standard Libraries to No, however, that made no difference. I do see this in the console log:


12:21:17.440851 +1000 Safari discovered extensions

12:21:17.533439 +1000 Safari calling plugIn beginUsing:

12:21:17.533687 +1000 Safari PlugInKit error in beginUsing:

12:21:17.533728 +1000 Safari killing invalid plugIn

12:53:59.417969 +1000 Safari completed calling plugIn beginUsing: for pid: 0

12:53:59.418374 +1000 Safari MacOS error: -67062

12:53:59.583475 +1000 Safari Disabling and blocking extension with identifier: <private>


Anyone else having similar experiences with this or have any advice on debugging and finding the root cause? It seems like introducing cocoapods makes my extension invalid regardless of whether the extension includes any dependencies.

Replies

Hello. I have a similar issue. Did you solve it?