Skip to content

Commit 73b7302

Browse files
authored
Merge pull request #318 from LoopKit/fix-nates-build
Change how app group id is constructed to avoid conflict
2 parents b897bef + 3027fda commit 73b7302

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

Loop Status Extension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<string>1.2.0</string>
2121
<key>CFBundleVersion</key>
2222
<string>$(CURRENT_PROJECT_VERSION)</string>
23-
<key>MainAppBundleIdentifier</key>
24-
<string>$(MAIN_APP_BUNDLE_IDENTIFIER)</string>
23+
<key>AppGroupIdentifier</key>
24+
<string>$(APP_GROUP_IDENTIFIER)</string>
2525
<key>NSExtension</key>
2626
<dict>
2727
<key>NSExtensionMainStoryboard</key>

Loop Status Extension/Loop Status Extension.entitlements

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<dict>
55
<key>com.apple.security.application-groups</key>
66
<array>
7-
<string>group.$(MAIN_APP_BUNDLE_IDENTIFIER)</string>
7+
<string>$(APP_GROUP_IDENTIFIER)</string>
88
</array>
99
</dict>
1010
</plist>

Loop.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,7 @@
14291429
baseConfigurationReference = 437D9BA11D7B5203007245E8 /* Loop.xcconfig */;
14301430
buildSettings = {
14311431
ALWAYS_SEARCH_USER_PATHS = NO;
1432+
APP_GROUP_IDENTIFIER = "group.$(MAIN_APP_BUNDLE_IDENTIFIER)Group";
14321433
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
14331434
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14341435
CLANG_CXX_LIBRARY = "libc++";
@@ -1482,6 +1483,7 @@
14821483
baseConfigurationReference = 437D9BA11D7B5203007245E8 /* Loop.xcconfig */;
14831484
buildSettings = {
14841485
ALWAYS_SEARCH_USER_PATHS = NO;
1486+
APP_GROUP_IDENTIFIER = "group.$(MAIN_APP_BUNDLE_IDENTIFIER)Group";
14851487
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
14861488
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14871489
CLANG_CXX_LIBRARY = "libc++";
@@ -1719,7 +1721,7 @@
17191721
);
17201722
INFOPLIST_FILE = "Loop Status Extension/Info.plist";
17211723
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
1722-
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).statusextension";
1724+
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).statuswidget";
17231725
PRODUCT_NAME = "$(TARGET_NAME)";
17241726
SKIP_INSTALL = YES;
17251727
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
@@ -1743,7 +1745,7 @@
17431745
);
17441746
INFOPLIST_FILE = "Loop Status Extension/Info.plist";
17451747
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
1746-
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).statusextension";
1748+
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).statuswidget";
17471749
PRODUCT_NAME = "$(TARGET_NAME)";
17481750
SKIP_INSTALL = YES;
17491751
SWIFT_VERSION = 3.0;

Loop/Extensions/NSBundle.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ extension Bundle {
2222
return String(format: NSLocalizedString("%1$@ v%2$@", comment: "The format string for the app name and version number. (1: bundle name)(2: bundle version)"), bundleDisplayName, shortVersionString)
2323
}
2424

25-
private var mainAppBundleIdentifier: String? {
26-
return object(forInfoDictionaryKey: "MainAppBundleIdentifier") as? String
27-
}
28-
2925
var appGroupSuiteName: String {
30-
return "group.\(mainAppBundleIdentifier!)"
26+
return object(forInfoDictionaryKey: "AppGroupIdentifier") as! String
3127
}
3228
}

Loop/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Glucose data retrieved from the CGM is stored securely in HealthKit.</string>
7777
<string>UIInterfaceOrientationLandscapeLeft</string>
7878
<string>UIInterfaceOrientationLandscapeRight</string>
7979
</array>
80-
<key>MainAppBundleIdentifier</key>
81-
<string>$(MAIN_APP_BUNDLE_IDENTIFIER)</string>
80+
<key>AppGroupIdentifier</key>
81+
<string>$(APP_GROUP_IDENTIFIER)</string>
8282
</dict>
8383
</plist>

Loop/Loop.entitlements

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<true/>
77
<key>com.apple.security.application-groups</key>
88
<array>
9-
<string>group.$(MAIN_APP_BUNDLE_IDENTIFIER)</string>
9+
<string>$(APP_GROUP_IDENTIFIER)</string>
1010
</array>
1111
</dict>
1212
</plist>

0 commit comments

Comments
 (0)