Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Samples/iOS-Swift/iOS-Swift-ShareExtension.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "../Shared/Config/_Common.xcconfig"

PRODUCT_BUNDLE_IDENTIFIER = io.sentry.sample.iOS-Swift-ShareExtension
INFOPLIST_FILE = iOS-Swift-ShareExtension/Info.plist

PROVISIONING_PROFILE_SPECIFIER_Debug = match Development io.sentry.iOS-Swift-ShareExtension
PROVISIONING_PROFILE_SPECIFIER_Test = match Development io.sentry.iOS-Swift-ShareExtension
PROVISIONING_PROFILE_SPECIFIER_TestCI = match Development io.sentry.iOS-Swift-ShareExtension
PROVISIONING_PROFILE_SPECIFIER_Release = match AppStore io.sentry.iOS-Swift-ShareExtension
PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*] = $(PROVISIONING_PROFILE_SPECIFIER_$(CONFIGURATION))
PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*] =

CODE_SIGN_STYLE = Manual

SUPPORTED_PLATFORMS = iphoneos iphonesimulator
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="j1y-V4-xli">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Share View Controller-->
<scene sceneID="ceB-am-kn3">
<objects>
<viewController id="j1y-V4-xli" customClass="ShareViewController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" opaque="NO" contentMode="scaleToFill" id="wbc-yd-nQP">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="1Xd-am-t49"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="CEy-Cv-SGf" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
18 changes: 18 additions & 0 deletions Samples/iOS-Swift/iOS-Swift-ShareExtension/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>TRUEPREDICATE</string>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Sentry
import Social
import UIKit

class ShareViewController: SLComposeServiceViewController {

override func isContentValid() -> Bool {
return true
}

override func didSelectPost() {
SentrySDK.capture(message: "iOS-Swift-ShareExtension: didSelectPost called")

self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
}

override func configurationItems() -> [Any]! {
return []
}
}
11 changes: 11 additions & 0 deletions Samples/iOS-Swift/iOS-Swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ targets:
- target: Sentry/Sentry
- target: iOS-SwiftClip
- target: SentrySampleShared/SentrySampleShared
- target: iOS-Swift-ShareExtension
configFiles:
Debug: iOS-Swift.xcconfig
DebugV9: iOS-Swift.xcconfig
Expand Down Expand Up @@ -95,6 +96,16 @@ targets:
Release: iOS-Benchmarking.xcconfig
Test: iOS-Benchmarking.xcconfig
TestCI: iOS-Benchmarking.xcconfig
iOS-Swift-ShareExtension:
type: app-extension
platform: auto
sources:
- iOS-Swift-ShareExtension
configFiles:
Debug: iOS-Swift-ShareExtension.xcconfig
Release: iOS-Swift-ShareExtension.xcconfig
Test: iOS-Swift-ShareExtension.xcconfig
TestCI: iOS-Swift-ShareExtension.xcconfig
schemes:
iOS-Swift:
templates:
Expand Down
Loading