Skip to content

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

Closed

Description

@patrickpereira

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.

Activity

  1. NickIliev commented on Jun 15, 2017

    @NickIliev
    Contributor

    @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

  2. patrickpereira commented on Jun 15, 2017

    @patrickpereira
    Author

    @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>
    
  3. NickIliev commented on Jun 15, 2017

    @NickIliev
    Contributor

    @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.

  4. patrickpereira commented on Jun 15, 2017

    @patrickpereira
    Author

    @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.

  5. patrickpereira commented on Jun 15, 2017

    @patrickpereira
    Author

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

  6. patrickpereira commented on Jun 15, 2017

    @patrickpereira
    Author

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

  7. NickIliev commented on Jun 15, 2017

    @NickIliev
    Contributor

    @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.

  8. NickIliev commented on Jun 15, 2017

    @NickIliev
    Contributor

    This issue was moved to NativeScript/nativescript-cli#2892

  9. lock commented on Aug 28, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  10. locked and limited conversation to collaborators on Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions