Skip to content

Commit

Permalink
fix codesign error and complication error for watchOS 7.0-only API
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Aug 10, 2023
1 parent ef4ce21 commit c5b40ae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Sentry
import SwiftUI

@available(watchOSApplicationExtension 7.0, *)
struct ContentView: View {

@StateObject var viewModel = ContentViewModel()
Expand Down Expand Up @@ -89,6 +90,7 @@ class ContentViewModel: ObservableObject {
}
}

@available(watchOSApplicationExtension 7.0, *)
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation
import SwiftUI
import WatchKit

@available(watchOSApplicationExtension 7.0, *)
class HostingController: WKHostingController<ContentView> {
override var body: ContentView {
return ContentView()
Expand Down
26 changes: 14 additions & 12 deletions Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 97JCY7859U;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -437,6 +438,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 97JCY7859U;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand All @@ -460,9 +462,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"watchOS-Swift WatchKit Extension/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "watchOS-Swift WatchKit Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -472,6 +472,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.watchOS-Swift.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "match Development io.sentry.*";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -484,9 +486,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"watchOS-Swift WatchKit Extension/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "watchOS-Swift WatchKit Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -496,6 +496,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.watchOS-Swift.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "match Development io.sentry.*";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -509,12 +511,12 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 97JCY7859U;
IBSC_MODULE = watchOS_Swift_WatchKit_Extension;
INFOPLIST_FILE = "watchOS-Swift WatchKit App/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.watchOS-Swift.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "match Development io.sentry.*";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -528,12 +530,12 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 97JCY7859U;
IBSC_MODULE = watchOS_Swift_WatchKit_Extension;
INFOPLIST_FILE = "watchOS-Swift WatchKit App/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.watchOS-Swift.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "match Development io.sentry.*";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -545,25 +547,25 @@
7B82C4B324C98A96002CA6D1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 97JCY7859U;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.watchOS-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development io.sentry.*";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7B82C4B424C98A96002CA6D1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 97JCY7859U;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.watchOS-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development io.sentry.*";
SWIFT_VERSION = 5.0;
};
name = Release;
Expand Down

0 comments on commit c5b40ae

Please sign in to comment.