Describe the bug
After updating to xcode 12, I get this error when I run tns run ios
:
Project successfully built.
Unable to apply changes on device: ... Error is: No .ipa found in /Users/.../platforms/ios/build/Debug-iphoneos directory..
I have checked the folder and the .ipa file exists. In order to make it work I had to change the BundleDisplayName and BundleName in Info.plist back to${PRODUCT_NAME}
.
_Info.plist (before)_
<key>CFBundleDisplayName</key>
<string>Example Name</string>
<key>CFBundleName</key>
<string>Example Name</string>
_Info.plist (after)_
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
But my ${PRODUCT_NAME}
is ExampleNameApp, so I can't keep this change.
Here is someone else with the same problem, but the issue is closed without fix: https://github.com/NativeScript/nativescript-cli/issues/5345
Environment
"tns-android": {
"version": "6.5.2"
},
"tns-ios": {
"version": "6.5.2"
}
"dependencies": {
"@nativescript/theme": "^2.2.1",
"@vue/devtools": "^5.3.3",
"nativescript-toasty": "^3.0.0-alpha.2",
"nativescript-ui-sidedrawer": "^8.0.1",
"nativescript-vue": "^2.6.0",
"nativescript-vue-devtools": "^1.4.0",
"rxjs": "^6.4.0",
"tns-core-modules": "^6.5.1",
"vuex": "^3.1.1"
},
"devDependencies": {
"@babel/preset-env": "^7.0.0",
"babel-loader": "^8.1.0",
"nativescript-dev-webpack": "^1.5.1",
"nativescript-vue-template-compiler": "^2.6.0",
"nativescript-worker-loader": "~0.11.0",
"node-sass": "^4.13.1",
"tns-platform-declarations": "^6.5.1",
"typescript": "^3.8.3",
"@types/node": "^13.11.1",
"vue": "^2.6.11",
"vue-loader": "^15.9.1",
"@babel/core": "~7.1.0"
},
same issue here, same fix needed, not sure if this is a change on xcode's end that required change to our options or an update to nativecsript 7 that's needed ? (I feel like its going to be apple there, as I'm also seen a lot of issues with arm64 architectures left and right)
Same here for real iOS device, fine for iOS Simulator though.
@AnthonyLenglet I got the arm64 architecture issue too. Solved it with this in the build.xcconfig
file
// Fix for error: building for iOS Simulator, but linking in dylib built for iOS, file '.../platforms/ios/internal//NativeScript.framework/NativeScript' for architecture arm64
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
I'm able to build, but the app is blank on my iPhone with iOS 14
@AnthonyLenglet I got the arm64 architecture issue too. Solved it with this in the
build.xcconfig
file// Fix for error: building for iOS Simulator, but linking in dylib built for iOS, file '.../platforms/ios/internal//NativeScript.framework/NativeScript' for architecture arm64 EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
damn thanks a ton for that ! ๐
Glad it helped. I found the solution here: https://github.com/NativeScript/NativeScript/issues/8782#issuecomment-693983462 So the ton of thanks has to go to @drekka
I am encountering the same issue.
And when I do get it to install on my device, it either gets stuck on "Restarting application on device" or it says "Unable to start application {my app id} on device {my device id}. Try starting it manually."
@JWiseCoder
I am running into the same issue.
@asharghi
This is more of an FYI for others, I found out if you are using this plugin with app.name set:
https://www.npmjs.com/package/nativescript-localize
Setting ${PRODUCT_NAME} in the Info.plist will get blown away.
For now, I have written internally a "after-buildIOS" hook to rename the file back to the workspace file expected by the NativeScript build process.
However, this does not cure the issue exposed by @JWiseCoder.
@JWiseCoder That's how far I have also come. My issue with the app being blank was solved by undoing the package-lock.json changes I had. Now the app starts when I open it manually.
This issue impacts 6.5.x and 7.x.x
NativeScript 6 application with the last 6.x.x cli
โ Getting NativeScript components versions information...
โ Update available for component nativescript. Your current version is 6.8.0 and the latest available version is 7.0.8.
โ Component tns-core-modules has 6.5.18 version and is up to date.
โ Component tns-android has 6.5.3 version and is up to date.
โ Component tns-ios has 6.5.2 version and is up to date.
NativeScript 6 application with latest 7.x.x cli
โ Getting NativeScript components versions information...
โ Component nativescript has 7.0.8 version and is up to date.
โ Component tns-core-modules has 6.5.18 version and is up to date.
โ Component tns-ios has 6.5.2 version and is up to date.
โ Component tns-android has 6.5.3 version and is up to date.
NativeScript 7 application with latest 7.x.x cli
โ Getting NativeScript components versions information...
โ Component nativescript has 7.0.8 version and is up to date.
โ Component @nativescript/core has 7.0.3 version and is up to date.
โ Component @nativescript/ios has 7.0.0 version and is up to date.
โ Component @nativescript/android has 7.0.0 version and is up to date.
Is this solved by setting { ios: { id: 'xxx' } }
in your nativescript.config.ts
?
@facetious I'm not running ns 7 so I don't have a nativescript.config.ts, but I tried your suggestion in app/package.json and nsconfig.json on root and still get "No .ipa found..." if I don't have ${PRODUCT_NAME}
in Info.plist
Running into the same issue - any hints / suggestions to resolve that?
Fun sidenote... it seems to create an .ipa file in the folder ..... but no clue if its the correct one....
ok at least i can confirm - it creates an .ipa file and it seems to be the correct one. (with a wrong filename?)
upload to testflight worked... nevertheless this errors just breaks our ci...
Adding my 2 cents.
With @NathanWalker's PR to fix nativescript-localize applied, I can now do this in my Info.plist:
<key>CFBundleDisplayName</key>
<string>Whatever you need</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
That will make sure CFBundleName
sets the .ipa
name to whatever the CLI expects, and allows you to set CFBundleDisplayName
to whatever you need it to be.
Note that the latest version of nativescript-localize (4.2.2) will only change CFBundleDisplayName
based on your i18n files, so you can have a language-specific app name. It won't touch CFBundleName
anymore so this bug no longer pops up for me.
That worked for me too! Thanks @EddyVerbruggen. I'm closing this issue
Most helpful comment
Adding my 2 cents.
With @NathanWalker's PR to fix nativescript-localize applied, I can now do this in my Info.plist:
That will make sure
CFBundleName
sets the.ipa
name to whatever the CLI expects, and allows you to setCFBundleDisplayName
to whatever you need it to be.Note that the latest version of nativescript-localize (4.2.2) will only change
CFBundleDisplayName
based on your i18n files, so you can have a language-specific app name. It won't touchCFBundleName
anymore so this bug no longer pops up for me.