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

Problems configuring my project #3

Closed
danielmessi13 opened this issue Sep 23, 2021 · 3 comments
Closed

Problems configuring my project #3

danielmessi13 opened this issue Sep 23, 2021 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@danielmessi13
Copy link

Hi, first of all congratulations for the initiative, I'm wanting to use your package, I had problems inserting it in the project I'm working on so I created a new project using Flutter 2.5

So, I followed all the steps, with the exception of "Entitlements.plist", as I haven't received the rights from Apple yet.

I'm getting these two errors when trying to build:

image

I downloaded the example project and got it running, so I checked a few things different from what is said in Readme.

In example, in the Podfile file this line is still commented out: # platform :ios, '9.0'

By Xcode it also says that iOS Deployment Target is 9.0

  • flutter doctor -v

image

@danielmessi13
Copy link
Author

If it helps here is the new project I created:
https://github.com/danielmessi13/carplay_test

@oguzhnatly oguzhnatly added good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested and removed good first issue Good for newcomers labels Sep 23, 2021
@oguzhnatly
Copy link
Owner

oguzhnatly commented Sep 23, 2021

Hey @danielmessi13, thank you for your support and message. I really appreciate it!

Also, thanks for providing the Github project repository. I've cloned your project and confirmed that you've done everything correctly. Since you're using the main.dart file, which is the same as the example project, you need to copy the flutter logo image from images folder. Because as you can see here, the app was trying to show an image from flutter assets that did not exist. That's why it's crashing. 🙂

Remember to include the image path in the pubspec.yaml file.
Screen Shot 2021-09-23 at 23 18 31


However, after importing the image, your app is going to run without error, but it will not connect to the CarPlay simulator due to the missing Entitlements.plist, as you have already mentioned. CarPlay requires this entitlement file and one of the entitlement keys. It has nothing to do with this package, it is required for everything to create an app in CarPlay. It does not matter whether you have or have not received entitlement keys from Apple.

Whether you are running the app through a simulator or developing it for distribution, you must ensure that the relevant entitlement key is added to the Entitlements.plist file. You must create an Entitlements.plist file if you do not already have one. - README.md

But don't worry! You can create your own Entitlements even if you don't receive the rights from Apple. It's very simple to create an entitlements file to run CarPlay in a simulator:

  1. Open ios/Runner.xcworkspace in Xcode.
  2. Open Signing & Capabilities tab in Runner project.
  3. Add a capability by clicking to + Capability button at the top-right corner.
  4. Select Keychain Sharing. Then you will see that the entitlements file will be created in the Runner folder.
  5. Open the entitlements file and delete the keychain access groups if you want. Then add an entitlement key, for example com.apple.developer.carplay-maps. You can find more detail here.

Screen Shot 2021-09-23 at 23 30 52
Screen Shot 2021-09-23 at 23 33 42

Since I am using Xcode version 13, there may be differences in the icons and labels in the pictures, check it out carefully.

That was all; your app is now ready to go 🚀 Please let me know if you have any further questions!

@EArminjon
Copy link

Add this in the doc home page :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants