I'm investigating Apple Safari extension technology where an extension is bundled with a containing application on the following versions:
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 small set of steps to introduce cocoapods into my 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 fairly easy to recreate:
1) Open Xcode, create a new project called TEST
2) Add a Safari Extension target to the project called TEST-EXT
At this point you get the template containing app and a toolbar button in Safari (Provided 'Allow Unsigned Extensions' is checked under the Safari Develop menu). This works as expected.
3) Add a podfile to the project root directory:
source 'https://github.com/CocoaPods/Specs.git'
platform :osx, "10.12"
use_frameworks!
target "TEST" do
pod 'Starscream', :git => 'https://github.com/daltoniam/Starscream.git', :tag => '2.0.2'
end
4) Run 'pod install' in the project root directory
5) Close the project
6) Open the workspace file generated by pod install
7) Build and run
The containing app starts as expected, however, TEST-EXT now very briefly appears in the Safari Extensions pane before disappearing. I see this in the console log which is likely related:
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>
It seems like introducing cocoapods makes the extension invalid regardless of whether the extension includes any dependencies. I have already tried everything in this thread to no avail: Validation Error: Invalid Bundle. The bundle at ... contains disallowed file 'Frameworks'
Does anyone have any ideas on debugging this or getting to the root cause?