Closed ynwd closed 7 years ago
I found a solution, simply create file with name "MobileApp.entitlements" in "APP_DIRECTORY/app/App_Resources/iOS" directory and put
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
then run tns platform remove ios && tns platform add ios
and run tns run ios
Thanks for reporting that. Should be fine with 3.11.2 (available on npm later today).
Having that file doesnt solve the issue for me. Also i have the current version, so it shouldnt be an issue, but i get exactly that error-message. Allready cleaned up everything no chance building ios.
UPDATE: nevermind, mistake was on my part, after renaming app, i forgot to rename the file .... what a dummy.
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42) node: v6.9.1 cocoapods: /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods.rb tns info:
┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.1.2 │ 3.1.2 │ Up to date │
│ tns-core-modules │ 3.1.0 │ 3.1.0 │ Up to date │
│ tns-android │ 3.1.1 │ 3.1.1 │ Up to date │
│ tns-ios │ 3.1.0 │ 3.1.0 │ Up to date │
└──────────────────┴─────────────────┴────────────────┴─────────────┘
I create a new project:
$ tns create iostest
Installing tns-template-hello-world
/somewhere/iostest
└─┬ tns-template-hello-world@3.1.0
└── nativescript-theme-core@1.0.4
Installing tns-core-modules
/somewhere/iostest
└─┬ tns-core-modules@3.1.0
└── tns-core-modules-widgets@3.1.0
Project iostest was successfully created.
then
$ cd iostest
and
$ tns run ios
Searching for devices...
Copying template files...
◜ Installing tns-iosInstalling tns-ios
/somewhere/iostest
└── tns-ios@3.1.0
Project successfully created.
Preparing project...
Successfully prepared plugin nativescript-theme-core for ios.
Successfully prepared plugin tns-core-modules for ios.
Successfully prepared plugin tns-core-modules-widgets for ios.
Project successfully prepared (iOS)
Building project...
...
warning: Falling back to contents of entitlements file "iostest.entitlements" because it was modified during the build process. Modifying the entitlements file during the build is unsupported.error: The file “iostest.entitlements” couldn’t be opened because there is no such file.
** BUILD FAILED **
The following build commands failed:
ProcessProductPackaging "" build/iostest.build/Debug-iphonesimulator/iostest.build/iostest.app.xcent
(1 failure)
Unable to apply changes on device: A176F414-7050-4742-8B35-1B2DDAB865FE. Error is: Command xcodebuild failed with exit code 65.
so the problem is still there.
I tried the workaround described in this issue, so I created the file iostest.entitlements
in App/App_Resources/iOS
and pasted the content as described.
I removed the ios platform, recreated it, and run the app in the emulator again.
The error is still the same.
In the platforms directory, I can see:
So, something is working the wrong way.
In another project, before the upgrade to 3.1.2, the workaround worked fine...
For me this problem was caused by project folder name not matching name of entitlements file I've created and added to app/App_Resources/iOS. It has to be the same.
Related to #327
There is new error after fresh install.
tns create MobileApp --ng
tns plugin add nativescript-plugin-firebase
tns run ios
There is no issue when build on android.