Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not copying the CFBundleURLTypes from the plist file to the project #2892

Closed
NickIliev opened this issue Jun 15, 2017 · 8 comments
Closed

Not copying the CFBundleURLTypes from the plist file to the project #2892

NickIliev opened this issue Jun 15, 2017 · 8 comments
Assignees
Milestone

Comments

@NickIliev
Copy link
Contributor

From @patrickpereira on June 15, 2017 7:2

Hi!

I'm running the latest nativescript@3.1.0-2017-06-13-9176, and if I create a new project and add the following to the plist:

<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>fbXXXXXXXXX</string>
			</array>
		</dict>
	</array>

I end up with this in the generated platform plist file:

<key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>orgnativescripttestApp</string>
        </array>
      </dict>
    </array>

It doesn't matter what I put in (also if I don't add any CFBundleURLSchemes), it will always have the same thing in the generated plist file.

Copied from original issue: NativeScript/NativeScript#4388

@NickIliev
Copy link
Contributor Author

@patrickpereira using this sample project I was not able to reproduce the described problem.

After adding these lines and using the next runtime and modules the info.plist was successfully introduced in the build under platforms/ios/issue4388/issue4388-Info.plist where issue4388 is the name of the test project.

If you still have troubles adding the lines in your project you can try to rebuild it with deleted platforms folder

@NickIliev
Copy link
Contributor Author

From @patrickpereira on June 15, 2017 9:1

@NickIliev I created a brand new project again, and after building the project - same issue happens.

package.json

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.PlistTest",
    "tns-ios": {
      "version": "3.1.0-2017-5-16-2"
    }
  },
  "dependencies": {
    "nativescript-theme-core": "~1.0.2",
    "tns-core-modules": "3.1.0-2017-06-14-6966"
  },
  "devDependencies": {
    "nativescript-dev-android-snapshot": "^0.*.*"
  }
}

./app/App_Resources/iOS/Info.plist

<?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>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleDisplayName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIRequiresFullScreen</key>
	<true/>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>fbXXXXXXXXX</string>
			</array>
		</dict>
	</array>
</dict>
</plist>

./platforms/ios/PlistTest/PlistTest-Info.plist

<?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>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIRequiresFullScreen</key>
    <true/>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
      <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>orgnativescriptPlistTest</string>
        </array>
      </dict>
    </array>
    <key>CFBundleIdentifier</key>
    <string>org.nativescript.PlistTest</string>
  </dict>
</plist>

@NickIliev
Copy link
Contributor Author

@patrickpereira even the newly created project has already created platforms folder. Can you try to delete the folder, make your changes in info.plist and then execute

tns build ios

In fact, even without deleting the platforms folder the changes made in info.plist should still be respected when rebuilding the project with tns build command - I have tested this on several projects with 100 percent success ratio.

@NickIliev
Copy link
Contributor Author

From @patrickpereira on June 15, 2017 10:2

@NickIliev I just removed the platform added the stuff in plist, and the tns build ios. With same result. This problem didn't occur while I was running Nativescript@3.0.3, it's only after I updated to next that this issue has started.

@NickIliev
Copy link
Contributor Author

From @patrickpereira on June 15, 2017 10:3

I will just downgrade to 3.0.3, to see if it fixes it, will let you know.

@NickIliev
Copy link
Contributor Author

From @patrickpereira on June 15, 2017 10:6

Yes I can confirm it works as you describe on 3.0.3, but not on the next version.

@NickIliev
Copy link
Contributor Author

@patrickpereira I was under the impression you are running only the next for ios-runtime.
When tested with next of CLI (3.1.0-2017-06-13-9176) I was able to reproduce the issue you are describing.

@rosen-vladimirov
Copy link
Contributor

Hey @patrickpereira, thank you very much for trying our @next version and reporting this issue. We've already applied a fix, so can you please try the latest @next version of NativeScript CLI and see if it resolves your issue?

Once again thanks for reporting this regression in our master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants