[vlc-commits] [Git][videolan/vlc][master] 3 commits: extras/apple: sanitize bundle identifier plugin name
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Aug 12 03:45:37 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
6508d760 by Felix Paul Kühne at 2026-08-12T03:28:31+00:00
extras/apple: sanitize bundle identifier plugin name
This prevents a build time failure in future versions of Xcode which do
hard validation of CFBundleIdentifier.
"The bundle ID string must contain only alphanumeric characters (A–Z,
a–z, and 0–9), hyphens (-), and periods (.)"
- - - - -
026282ad by Felix Paul Kühne at 2026-08-12T03:28:31+00:00
test/ios: add UIScene based life cycle
This requires iOS/tvOS 13 or later and is mandatory for future versions
of those platforms. The traditional flow is kept for prior versions and
is no longer used at all on visionOS.
There are no user visible changes.
- - - - -
baad2c52 by Felix Paul Kühne at 2026-08-12T03:28:31+00:00
test/ios: query the app delegate on the main thread
- - - - -
3 changed files:
- extras/package/apple/copy_plugins.sh
- extras/package/apple/xcodegen.yml
- test/iosvlc.m
Changes:
=====================================
extras/package/apple/copy_plugins.sh
=====================================
@@ -11,13 +11,16 @@ function plist_key()
function generate_info_plist()
{
EXECUTABLE_NAME="$1"
+ # CFBundleIdentifier only allows alphanumerics, '-' and '.', so the
+ # underscores found in some plugin names need to be replaced.
+ BUNDLE_ID_NAME="${EXECUTABLE_NAME//_/-}"
echo '<?xml version="1.0" encoding="UTF-8"?>'
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'
echo '<plist version="1.0">'
echo '<dict>'
plist_key CFBundleDevelopmentRegion "en"
plist_key CFBundleExecutable "${EXECUTABLE_NAME}"
- plist_key CFBundleIdentifier "org.videolan.vlc.plugins.${EXECUTABLE_NAME}.framework"
+ plist_key CFBundleIdentifier "org.videolan.vlc.plugins.${BUNDLE_ID_NAME}.framework"
plist_key CFBundleInfoDictionaryVersion "6.0"
plist_key CFBundlePackageType "FMWK"
plist_key CFBundleSignature "???"
=====================================
extras/package/apple/xcodegen.yml
=====================================
@@ -41,6 +41,9 @@ targets:
- target: vlccore
info:
path: "vlccoreios/Info.plist"
+ properties:
+ UIApplicationSceneManifest:
+ UIApplicationSupportsMultipleScenes: false
settings:
PRODUCT_BUNDLE_IDENTIFIER: org.videolan.vlc.vlccoreios
postBuildScripts:
=====================================
test/iosvlc.m
=====================================
@@ -1,10 +1,11 @@
/*****************************************************************************
* iosvlc.m: iOS specific development main executable for VLC media player
*****************************************************************************
- * Copyright (C) 2020 Videolabs
+ * Copyright (C) 2020-2026 Videolabs
*
* Authors: Marvin Scholz <epirat07 at gmail dot com>
* Alexandre Janniaux <ajanni at videolabs.io>
+ * Felix Paul Kühne <fkuehne # videolabs.io>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
@@ -58,6 +59,11 @@
}
@end
+API_AVAILABLE(ios(13.0), tvos(13.0))
+ at interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
+ at property (strong, nonatomic) UIWindow *window;
+ at end
+
static void vlc_terminate(void *data)
{
AppDelegate *d = (__bridge AppDelegate *)data;
@@ -160,6 +166,28 @@ static void vlc_terminate(void *data)
return YES;
}
+
+- (UISceneConfiguration *)application:(UIApplication *)application
+configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession
+ options:(UISceneConnectionOptions *)options API_AVAILABLE(ios(13.0), tvos(13.0))
+{
+ UISceneConfiguration *configuration = [[UISceneConfiguration alloc] initWithName:nil
+ sessionRole:connectingSceneSession.role];
+ configuration.delegateClass = [SceneDelegate class];
+ return configuration;
+}
+ at end
+
+ at implementation SceneDelegate
+- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session
+ options:(UISceneConnectionOptions *)connectionOptions
+{
+ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+
+ /* The window contents are set up once the glue interface opens */
+ self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
+ appDelegate->window = _window;
+}
@end
int main(int argc, char * argv[]) {
@@ -171,21 +199,19 @@ int main(int argc, char * argv[]) {
/* Glue interface code, define drawable-nsobject for display module */
static int Open(vlc_object_t *obj)
{
- AppDelegate *d = (AppDelegate *)[[UIApplication sharedApplication] delegate];
- if( d == nil )
- return VLC_EGENERIC;
+ __block AppDelegate *d;
dispatch_sync(dispatch_get_main_queue(), ^{
- if (d->window != nil && d->subview != nil)
+ d = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+ if (d == nil || d->subview != nil)
return;
- /* Initialize main window */
-#if TARGET_OS_VISION
- /* UIScreen is unavailable so we need create a size on our own */
- d->window = [[UIWindow alloc] initWithFrame:CGRectMake(0., 0., 1200., 800.)];
-#else
- d->window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
+#if !TARGET_OS_VISION
+ /* Initialize main window unless the scene delegate provided one */
+ if (d->window == nil)
+ d->window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
#endif
+
d->window.rootViewController = [[UIViewController alloc] init];
d->window.backgroundColor = [UIColor whiteColor];
@@ -201,6 +227,9 @@ static int Open(vlc_object_t *obj)
#endif
} );
+ if (d == nil)
+ return VLC_EGENERIC;
+
assert(d->subview != nil);
var_SetAddress(vlc_object_instance(obj), "drawable-nsobject",
(__bridge void *)d->subview);
@@ -221,7 +250,6 @@ static int OpenAssetDemux(vlc_object_t *obj)
/* Store startup arguments to forward them to libvlc */
NSString *bundle_path = [[NSBundle mainBundle] resourcePath];
const char *resource_path = [bundle_path UTF8String];
- size_t resource_path_length = strlen(resource_path);
char *url;
if (asprintf(&url, "file://%s/%s", resource_path, access->psz_location) < 0)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1d33883b57eaeb3b09f7e363f4366ff4bca9e7a1...baad2c523c1934470bb351105efc352e0678dd55
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1d33883b57eaeb3b09f7e363f4366ff4bca9e7a1...baad2c523c1934470bb351105efc352e0678dd55
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list