You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 7.0.10
Cross-platform modules: 6.5.20
Android Runtime:
iOS Runtime: 6.5.3
XCode Version: 12.0.1
Plugin(s):
Describe the bug
The main issue is that when opening an ASWebAuthenticationSession, the dialog shows the CFBundleName, which in NativeScript defaults to ${PRODUCT_NAME}, which again seems to be based on folder name of the project.
So if the name of the project folder is bundlename-test, the product name and iOS target name becomes bundlenametest
When starting the ASWebAuthenticationSession, you'll see this alert:
If I try to change the CFBundleName in Info.plist, the CLI fails to build and deploy the app to the device.
Opening the same project from Xcode (after failed run from CLI), it can be started normally, with the new CFBundleName.
Now the alert show the desired name:
To Reproduce
Install latest CLI.
Create a new project with ns create bundlename-test --template [email protected]
Update dependencies.
Change Info.plist CFBundleName to something else than ${PRODUCT_NAME}
Run the app with ns run ios --no-hmr
Notice that the app is built, but can't be installed because of missing .ipa file.
Expected behavior
App is built, installed and started, respecting the CFBundleName.
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
✔ Cleaned directory hooks
✔ Cleaned directory platforms
✔ Cleaned directory node_modules
✔ Cleaned file package-lock.json
✔ Project successfully cleaned.
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
Searching for devices...
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
> [email protected] install /Users/frank/git/private/bundlename-test/node_modules/fsevents
> node install.js
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
> [email protected] postinstall /Users/frank/git/private/bundlename-test/node_modules/ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
> @nativescript/[email protected] postinstall /Users/frank/git/private/bundlename-test/node_modules/@nativescript/core
> node cli-hooks/postinstall.js
> [email protected] postinstall /Users/frank/git/private/bundlename-test/node_modules/nativescript-dev-webpack
> node postinstall.js
Dev dependency: @ngtools/webpack already added. Leaving version: ~8.2.0
Some dependencies have already been added. If you want to force update them, please run "node_modules/.bin/update-ns-webpack".
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"12.14.0","npm":"6.13.7"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
added 681 packages from 448 contributors and audited 682 packages in 19.259s
5 packages are looking for funding
run `npm fund` for details
found 10 vulnerabilities (1 low, 5 moderate, 4 high)
run `npm audit fix` to fix them, or `npm audit` for details
Copying template files...
Platform ios successfully added. v6.5.3
Preparing project...
File change detected. Starting incremental webpack compilation...
webpack is watching the files…
Hash: 940d600a7e8e7f8ee109
Version: webpack 4.27.1
Time: 7767ms
Built at: 10/19/2020 7:42:09 PM
Asset Size Chunks Chunk Names
bundle.js 24.6 KiB bundle [emitted] bundle
package.json 112 bytes [emitted]
runtime.js 13.9 KiB runtime [emitted] runtime
tns_modules/tns-core-modules/inspector_modules.js 785 bytes tns_modules/tns-core-modules/inspector_modules [emitted] tns_modules/tns-core-modules/inspector_modules
vendor.js 16.4 MiB vendor [emitted] vendor
Entrypoint bundle = runtime.js vendor.js bundle.js
Entrypoint tns_modules/tns-core-modules/inspector_modules = runtime.js vendor.js tns_modules/tns-core-modules/inspector_modules.js
[../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
[./app.css] 2.01 KiB {bundle} [built]
[./app/app-routing.module.ts] 659 bytes {bundle} [built]
[./app/app.component.html] 167 bytes {bundle} [built]
[./app/app.component.ts] 354 bytes {bundle} [built]
[./app/app.module.ts] 1.41 KiB {bundle} [built]
[./app/item/items.component.html] 153 bytes {bundle} [built]
[./app/item/items.component.ts] 1.22 KiB {bundle} [built]
[./main.ts] 1.67 KiB {bundle} [built]
[~/package.json] external "~/package.json" 42 bytes {bundle} {tns_modules/tns-core-modules/inspector_modules} [optional] [built]
+ 611 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Installing pods...
Analyzing dependencies
Downloading dependencies
Installing MDFInternationalization (2.0.0)
Installing MaterialComponents (94.5.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `bundlenametest.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
Project successfully prepared (ios)
Building project...
Xcode requires a team id to be specified when building for device.
You can specify the team id by setting the DEVELOPMENT_TEAM setting in build.xcconfig file located in App_Resources folder of your app, or by using the --teamId option when calling run, debug or livesync commands.
Xcode build...
./.build_env_vars.sh: line 451: declare: UID: readonly variable
NSLD: Swift bridging header '*-Swift.h' not found under '/Users/frank/Library/Developer/Xcode/DerivedData/bundlenametest-aprfuwfeaotewdfkrworwxkodenq/Build/Intermediates.noindex/ArchiveIntermediates/bundlenametest/IntermediateBuildFilesPath/bundlenametest.build/Debug-iphoneos/bundlenametest.build/Objects-normal/arm64'
Generating metadata...~/git/private/bundlename-test/platforms/ios/internal/metadata-generator/bin ~/git/private/bundlename-test/platforms/ios
Python version: 2.7.16 (default, Jun 5 2020, 22:59:21)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc-
Generating metadata for arm64
Metadata Generator Arguments:
./objc-metadata-generator -verbose -output-bin /Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/metadata-arm64.bin -output-umbrella /Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/umbrella-arm64.h -docset-path /Users/frank/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset Xclang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk -arch arm64 -miphoneos-version-min=9.0 -std=gnu99 -I/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/include -I/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MDFInternationalization/MDFInternationalization.framework/Headers -I/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MaterialComponents/MaterialComponents.framework/Headers -I/Users/frank/git/private/bundlename-test/platforms/ios/internal/Swift-Modules -I/Users/frank/git/private/bundlename-test/platforms/ios/internal -I/Users/frank/git/private/bundlename-test/platforms/ios/../../App_Resources/iOS/src -I/Users/frank/git/private/bundlename-test/platforms/ios/../../node_modules/@nativescript/core/platforms/ios/src -I/Users/frank/git/private/bundlename-test/platforms/ios/../../node_modules/tns-core-modules-widgets/platforms/ios/src -F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos -F/Users/frank/git/private/bundlename-test/platforms/ios/internal/ -F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos -F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MDFInternationalization -F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MaterialComponents -F/Users/frank/git/private/bundlename-test/platforms/ios/../../node_modules/tns-core-modules-widgets/platforms/ios -DCOCOAPODS=1 -DDEBUG=1
Clang Arguments:
"-v", "-x", "objective-c", "-fno-objc-arc", "-fmodule-maps", "-ferror-limit=0", "-Wno-unknown-pragmas", "-Wno-ignored-attributes", "-Wno-nullability-completeness", "-Wno-expansion-to-defined", "-D__NATIVESCRIPT_METADATA_GENERATOR=1", "-isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk", "-arch", "arm64", "-miphoneos-version-min=9.0", "-std=gnu99", "-I/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/include", "-I/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MDFInternationalization/MDFInternationalization.framework/Headers", "-I/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MaterialComponents/MaterialComponents.framework/Headers", "-I/Users/frank/git/private/bundlename-test/platforms/ios/internal/Swift-Modules", "-I/Users/frank/git/private/bundlename-test/platforms/ios/internal", "-I/Users/frank/git/private/bundlename-test/platforms/ios/../../App_Resources/iOS/src", "-I/Users/frank/git/private/bundlename-test/platforms/ios/../../node_modules/@nativescript/core/platforms/ios/src", "-I/Users/frank/git/private/bundlename-test/platforms/ios/../../node_modules/tns-core-modules-widgets/platforms/ios/src", "-F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos", "-F/Users/frank/git/private/bundlename-test/platforms/ios/internal/", "-F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos", "-F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MDFInternationalization", "-F/Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/MaterialComponents", "-F/Users/frank/git/private/bundlename-test/platforms/ios/../../node_modules/tns-core-modules-widgets/platforms/ios", "-DCOCOAPODS=1", "-DDEBUG=1",
Merged 826 categories.
Result: 45831 declarations from 155 top level modules
Done! Running time: 5.27207 sec
Saving metadata generation's stderr stream to: /Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos/metadata-generation-stderr-arm64.txt
~/git/private/bundlename-test/platforms/ios
ld: warning: dylib (/Users/frank/git/private/bundlename-test/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets) was built for newer iOS version (9.2) than being linked (9.0)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MDFInternationalization' from project 'Pods')
Xcode build...
2020-10-19 19:43:55.941 xcodebuild[7441:1360415] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/jj/206sr6953jg5v02swt06qtv80000gn/T/bundlenametest_2020-10-19_19-43-55.940.xcdistributionlogs'.
Exported bundlenametest to: /Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos
** EXPORT SUCCEEDED **
Project successfully built.
**Unable to apply changes on device: xxx. Error is: No .ipa found in /Users/frank/git/private/bundlename-test/platforms/ios/build/Debug-iphoneos directory..**
The text was updated successfully, but these errors were encountered:
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
The main issue is that when opening an
ASWebAuthenticationSession
, the dialog shows the CFBundleName, which in NativeScript defaults to ${PRODUCT_NAME}, which again seems to be based on folder name of the project.So if the name of the project folder is
bundlename-test
, the product name and iOS target name becomesbundlenametest
When starting the
ASWebAuthenticationSession
, you'll see this alert:If I try to change the CFBundleName in Info.plist, the CLI fails to build and deploy the app to the device.
Opening the same project from Xcode (after failed run from CLI), it can be started normally, with the new CFBundleName.
Now the alert show the desired name:
To Reproduce
Install latest CLI.
Create a new project with
ns create bundlename-test --template [email protected]
Update dependencies.
Change Info.plist
CFBundleName
to something else than${PRODUCT_NAME}
Run the app with
ns run ios --no-hmr
Notice that the app is built, but can't be installed because of missing .ipa file.
Expected behavior
App is built, installed and started, respecting the CFBundleName.
Sample project
https://github.com/fpaaske/bundlename-test
Additional context
Log output:
The text was updated successfully, but these errors were encountered: