Bladeren bron

replace hard coded group- and keychain-identifiers with user-defined build settings
based on patch by Filipe Cabecinhas <vlc@filcab.net>

Tobias Conradi 9 jaren geleden
bovenliggende
commit
d0e2a085b3

+ 1 - 1
Apple-TV/VLC-TV.entitlements

@@ -8,7 +8,7 @@
 	<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
 	<key>keychain-access-groups</key>
 	<array>
-		<string>$(AppIdentifierPrefix)org.videolan.vlc-ios</string>
+		<string>$(KEYCHAIN_ACCESS_GROUP)</string>
 	</array>
 </dict>
 </plist>

+ 1 - 1
Apple-TV/VLCTVConstants.h

@@ -13,7 +13,7 @@
 
 #define kVLCVersionCodename @"All Along the Watchtower"
 
-#define kVLCApplicationGroupIdentifier @"group.org.videolan.vlc-ios"
+#define kVLCApplicationGroupIdentifier GROUP_IDENTIFIER
 
 #define kVLCRecentURLs @"recent-urls"
 #define kVLCStoreDropboxCredentials @"kVLCStoreDropboxCredentials"

+ 5 - 0
SharedConfig.xcconfig

@@ -15,3 +15,8 @@
 // Using com.example leads to com.example.vlc-ios for the iOS target.
 
 BUNDLE_IDENTIFIER_PREFIX=com.example
+
+GROUP_IDENTIFIER=group.$(BUNDLE_IDENTIFIER_PREFIX).vlc-ios
+KEYCHAIN_ACCESS_GROUP=$(AppIdentifierPrefix)$(BUNDLE_IDENTIFIER_PREFIX).vlc-ios
+
+GCC_PREPROCESSOR_DEFINITIONS = "GROUP_IDENTIFIER=@\"$(GROUP_IDENTIFIER)\"";

+ 1 - 1
Sources/VLCConstants.h

@@ -13,7 +13,7 @@
 
 #define kVLCVersionCodename @"All Along the Watchtower"
 
-#define kVLCApplicationGroupIdentifier @"group.org.videolan.vlc-ios"
+#define kVLCApplicationGroupIdentifier GROUP_IDENTIFIER
 
 #define kVLCSettingPasscodeKey @"Passcode"
 #define kVLCSettingPasscodeOnKey @"PasscodeProtection"

+ 1 - 1
VLC WatchKit App.entitlements

@@ -4,7 +4,7 @@
 <dict>
 	<key>com.apple.security.application-groups</key>
 	<array>
-		<string>group.org.videolan.vlc-ios</string>
+		<string>$(GROUP_IDENTIFIER)</string>
 	</array>
 </dict>
 </plist>

+ 1 - 1
VLC WatchKit Extension.entitlements

@@ -4,7 +4,7 @@
 <dict>
 	<key>com.apple.security.application-groups</key>
 	<array>
-		<string>group.org.videolan.vlc-ios</string>
+		<string>$(GROUP_IDENTIFIER)</string>
 	</array>
 </dict>
 </plist>

+ 1 - 1
VLC WatchKit Native Extension/Info.plist

@@ -27,7 +27,7 @@
 		<key>NSExtensionAttributes</key>
 		<dict>
 			<key>WKAppBundleIdentifier</key>
-			<string>org.videolan.vlc-ios.watchkitapp</string>
+			<string>$(BUNDLE_IDENTIFIER_PREFIX).vlc-ios.watchkitapp</string>
 		</dict>
 		<key>NSExtensionPointIdentifier</key>
 		<string>com.apple.watchkit</string>

+ 1 - 1
VLC WatchKit Native/Info.plist

@@ -28,7 +28,7 @@
 		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 	</array>
 	<key>WKCompanionAppBundleIdentifier</key>
-	<string>org.videolan.vlc-ios</string>
+	<string>$(BUNDLE_IDENTIFIER_PREFIX).vlc-ios</string>
 	<key>WKWatchKitApp</key>
 	<true/>
 </dict>

+ 2 - 2
vlc-ios/VLC for iOS.entitlements

@@ -18,11 +18,11 @@
 	<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
 	<key>com.apple.security.application-groups</key>
 	<array>
-		<string>group.org.videolan.vlc-ios</string>
+		<string>$(GROUP_IDENTIFIER)</string>
 	</array>
 	<key>keychain-access-groups</key>
 	<array>
-		<string>$(AppIdentifierPrefix)org.videolan.vlc-ios</string>
+		<string>$(KEYCHAIN_ACCESS_GROUP)</string>
 	</array>
 </dict>
 </plist>