GeezerVison is showing github.com — [note]: SPM preferred over Cocoapods going forward with plugins · Issue #5992 · NativeScript/nativescript-cli
[note]: SPM preferred over Cocoapods going forward with plugins #5992DescriptionIssue Description
After upgrading Xcode from 26.3 to 26.4, I am not able to install one of my apps anymore (the build succeeds, but installation fails).
Unable to apply changes on device: E411B00B-30CD-44D7-A923-F0D7D900AF9D. Error is: Command xcrun nsxcode264issue.app/Frameworks/UserMessagingPlatform.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "nsxcode264issue.app/Frameworks/UserMessagingPlatform.framework/UserMessagingPlatform".
The issue is reproducable with a newly created NativeScript app, that includes the following SPM package:
//nativescript.config.ts
import { NativeScriptConfig } from '@nativescript/core';
export default {
ios: {
SPMPackages: [
{
name: 'GoogleUserMessagingPlatform',
libs: ['GoogleUserMessagingPlatform'],
repositoryURL: 'https://github.com/googleads/swift-package-manager-google-user-messaging-platform.git',
version: '3.1.0',
},
],
},
} as NativeScriptConfig;
The issue seems to be related somehow to the GoogleUserMessagingPlatform package as it does not occur with MBProgressHUD as an example, BUT when opening platforms/ios/.xcworkspace in Xcode and run the app from Xcode, the installation succeeds as expected, so it seems to be related somehow to NativeScript CLI or @nativescript/ios ?
I tried @nativescript/ios 8.9.5 as well, but with the same result as 9.0.3, so I it might be related to the NS CLI somehow.
It was working as expected when Xcode 26.3 was installed.
Reproduction
Sample app for reproduction:
nsxcode26-4-issue.zip
1.) ns run ios -> build succeeds, but installation fails
2.) open platforms/ios/xcworkspace in Xcode and run app from there -> success
Relevant log output (if applicable)
Webpack compilation complete. Watching for file changes.
Resolving SPM dependencies...
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project /Users/felixkrautschuk/Downloads/nsxcode26-4-issue/platforms/ios/nsxcode264issue.xcodeproj -scheme nsxcode264issue -skipPackagePluginValidation IPHONEOS_DEPLOYMENT_TARGET=16.0 -destination generic/platform=iOS -resolvePackageDependencies
Build settings from command line:
IPHONEOS_DEPLOYMENT_TARGET = 16.0
Resolve Package Graph
Fetching from https://github.com/googleads/swift-package-manager-google-user-messaging-platform.git (cached)
Creating working copy of package ‘swift-package-manager-google-user-messaging-platform’
Checking out 3.1.0 of package ‘swift-package-manager-google-user-messaging-platform’
Resolved source packages:
GoogleUserMessagingPlatform: https://github.com/googleads/swift-package-manager-google-user-messaging-platform.git @ 3.1.0
resolved source packages: GoogleUserMessagingPlatform
Updating runtime package.json with configuration values...
Project successfully prepared (ios)
Building project...
Xcode build...
Project successfully built.
Build time: 63.455 s.
The build result is located at: /Users/felixkrautschuk/Downloads/nsxcode26-4-issue/platforms/ios/build/Debug-iphonesimulator/nsxcode264issue.app
Installing on device E411B00B-30CD-44D7-A923-F0D7D900AF9D...
Unable to apply changes on device: E411B00B-30CD-44D7-A923-F0D7D900AF9D. Error is: Command xcrun with arguments simctl install E411B00B-30CD-44D7-A923-F0D7D900AF9D /Users/felixkrautschuk/Downloads/nsxcode26-4-issue/platforms/ios/build/Debug-iphonesimulator/nsxcode264issue.app failed with exit code 1. Error output:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
App installation failed: „nsxcode264issue“ kann nicht installiert werden
Versuche es später noch einmal.
nsxcode264issue.app/Frameworks/UserMessagingPlatform.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "nsxcode264issue.app/Frameworks/UserMessagingPlatform.framework/UserMessagingPlatform".
Underlying error (domain=IXUserPresentableErrorDomain, code=1):
„nsxcode264issue“ kann nicht installiert werden
Versuche es später noch einmal.
Environment
OS: macOS 26.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: /bin/zsh
node: 22.19.0
npm: 11.6.2
nativescript: 9.0.5
# android
java: 17.0.11
ndk: Not Found
apis: 29, 35, 36, 36
build_tools: 25.0.2, 27.0.3, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 32.0.0, 33.0.0, 33.0.1, 33.0.2, 34.0.0, 35.0.0, 35.0.1, 36.0.0, 36.1.0
system_images:
- android-29 | Google Play Intel x86_64 Atom
- android-30 | Google APIs Intel x86_64 Atom
- android-35 | Google Play Intel x86_64 Atom
- android-36.1 | Google Play Intel x86_64 Atom
- android-36.1 | Pre-Release 16 KB Page Size Google Play Intel x86_64 Atom
# ios
xcode: 26.4/17E192
cocoapods: 1.16.2
python: 2.7.18
python3: 3.13.0
ruby: 2.6.10
platforms:
- DriverKit 25.4
- iOS 26.4
- macOS 26.4
- tvOS 26.4
- visionOS 26.4
- watchOS 26.4
Dependencies
"dependencies": {
"@nativescript/core": "^9.0.17",
"@nativescript/theme": "^3.1.0"
},
"devDependencies": {
"@nativescript/ios": "^9.0.3",
"@nativescript/webpack": "~5.0.25"
}
Please accept these terms
Activityfelixkrautschuk commented on Mar 26, 2026 I noticed, when including the package via Podfile
pod 'GoogleUserMessagingPlatform', '~> 3.1.0'
(instead of SPMPackage in nativescript.config.ts), then the installation works as expected.
But as all the Cocoapods stuff will stop working in 9 months, so I would be happy to make it working again with the SPMPackage option. NathanWalker commented on Mar 31, 2026 This appears with the google SPM - confirmed SPM works fine with Xcode 26.4. felixkrautschuk commented on May 12, 2026 Now I see the exact same behavior with another library, switching from Podfile
pod 'IronSourceSDK','9.4.1.0'
to SPM:
export default {
ios: {
SPMPackages: [
{
name: 'Unity-Mediation-iAds-Swift-Package',
libs: ['UnityMediationSDK'],
repositoryURL: 'https://github.com/ironsource-mobile/Unity-Mediation-iAds-Swift-Package',
version: '9.4.1',
},
],
},
} as NativeScriptConfig;
The build succeeds, the installation on Simulator fails with error message:
myapp.app/Frameworks/IronSource.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "myapp.app/Frameworks/IronSource.framework/IronSource".
Underlying error (domain=IXUserPresentableErrorDomain, code=1)
Again, when open xcworkspace and run the app from Xcode, the app is installed and started as expected.
In the meantime, my setup has changed to:
- NativeScript CLI 9.0.6
- @nativescript/ios 9.0.3
- Xcode 26.5
NathanWalker commented on May 12, 2026 changed the title [-]iOS: unable to install app using Xcode 26.4+[/-] [+][note]: SPM preferred over Cocoapods going forward with plugins[/+] on May 12, 2026felixkrautschuk commented on Aug 25, 2026 @NathanWalker time is passing and I still see the same issues and I fear that I am getting serious trouble building/running our app as soon as SPM will be mandatory. As I have no idea what to do, I asked ChatGPT about this issue today... it says:
The issue affects SwiftPM binary targets that contain static XCFrameworks with bundled resources.
Both LevelPlay’s IronSource.framework and Google’s UserMessagingPlatform.framework contain static archives, not dynamic Mach-O dylibs. This can be verified with:
$ file IronSource.framework/IronSource
Mach-O universal binary with 2 architectures:
[arm64:current ar archive] [x86_64:current ar archive]
$ file UserMessagingPlatform.framework/UserMessagingPlatform
Mach-O universal binary with 2 architectures:
[x86_64:current ar archive] [arm64:current ar archive]
During the NativeScript CLI build, Xcode uses:
REMOVE_STATIC_EXECUTABLES_FROM_EMBEDDED_BUNDLES=YES
The static archives are therefore removed from the embedded framework bundles, but the bundles remain under App.app/Frameworks, with their Info.plist still declaring CFBundleExecutable.
simctl install then fails with:
IronSource.framework is missing its bundle executable
Setting REMOVE_STATIC_EXECUTABLES_FROM_EMBEDDED_BUNDLES[config=Debug] = NO is not a solution because the embedded file is an ar archive, not a loadable dynamic Mach-O. Installation then fails with:
Failed to iterate on macho slices
Removing non-loadable static framework bundles in the existing NativeScript PostBuild phase fixes installation on both the simulator and a physical device. The static SDK code remains linked into the main app executable.
The issue is not LevelPlay-specific because the same behavior occurs with Google’s official UserMessagingPlatform Swift package.
Building and running the generated workspace directly through Xcode succeeds, while ns run ios produces the invalid installable bundle.
So what you can do:
1.) rm -rf platforms/ios
2.) ns prepare ios
3.) go to platforms/ios/internal/nativescript-post-build and add:
frameworks_dir="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -d "$frameworks_dir" ]; then
for framework in "$frameworks_dir"/*.framework; do
[ -d "$framework" ] || continue
framework_name="$(basename "$framework" .framework)"
executable="$framework/$framework_name"
if [ ! -f "$executable" ] ||
file -b "$executable" | grep -q "current ar archive"; then
echo "Removing non-loadable static framework bundle: $framework"
rm -rf "$framework"
fi
done
fi
4.) ns run ios
And indeed, when following these steps, I am able to run the app again in simulator (without opening Xcode).
So my question: is there a way the NaitveScript framework could handle these kind of SPM packages / frameworks automatically?
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|