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

Cannot run the shorebird preview command on ios #1256

Closed
giapnhgc opened this issue Sep 12, 2023 · 10 comments
Closed

Cannot run the shorebird preview command on ios #1256

giapnhgc opened this issue Sep 12, 2023 · 10 comments
Labels
waiting for response Waiting for customer response

Comments

@giapnhgc
Copy link

          > Unfortunately, on iOS I cannot run the `shorebird preview` command. But running directly on xcode or running `flutter clean && flutter run` on VsCode can still build the app. => Providing Profile is still being used normally.
════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your 
device. You can create a new Provisioning Profile for your project in Xcode for 
your team by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again

It's also possible that a previously installed app with the same Bundle 
Identifier was signed with a different certificate.

For more information, please visit:
  https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════

Because of this, I log print the data and then push it directly through Testflight and create patch to check for updates and logs are returned like my comment above: #1209 (comment) .

Or do you have any way to fix it so I can run the command shorbird preview on ios device then I can send you the log after successfully running shorebird preview. Screenshot 2023-09-12 at 09 41 18 Screenshot 2023-09-12 at 10 38 45 Screenshot 2023-09-12 at 10 12 38

Hi @eseidel , @bryanoltman , After I upgrade shorebird to 0.14.8. I can update patch on IOS when auto_update: false.

Shorebird 0.14.8 • [email protected]:shorebirdtech/shorebird.git
Flutter 3.13.3 • revision 012153de178d4a51cd6f9adc792ad63ae3cfb1b3
Engine • revision 5a1c263ce5313c8f5e93a11dd2a3af0e19d90262

But we had new issues. Its about shorebird preview on ios.
Thank you for your support!

Originally posted by @giapnhgc in #1209 (comment)

@eseidel eseidel added this to 1.0 Sep 21, 2023
@eseidel eseidel moved this to Customers in 1.0 Sep 21, 2023
@bryanoltman
Copy link
Contributor

It's also possible that a previously installed app with the same Bundle Identifier was signed with a different certificate.

This part of the log suggests that your phone already has your app installed and that the problem might be resolved by deleting it before running the preview command. Can you try that and report back?

@bryanoltman bryanoltman moved this from Customers to Pending Customer Reply in 1.0 Sep 26, 2023
@giapnhgc
Copy link
Author

giapnhgc commented Sep 27, 2023

It's also possible that a previously installed app with the same Bundle Identifier was signed with a different certificate.

This part of the log suggests that your phone already has your app installed and that the problem might be resolved by deleting it before running the preview command. Can you try that and report back?

Hi, I did try again. I deleted before running shorebird preview but it didn't work. It showed the same log even when i check automatic sigining or uncheck and use downloaded provioning profile

════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your 
device. You can create a new Provisioning Profile for your project in Xcode for 
your team by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again

It's also possible that a previously installed app with the same Bundle 
Identifier was signed with a different certificate.

For more information, please visit:
  https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════

@github-project-automation github-project-automation bot moved this from Pending Customer Reply to Done in 1.0 Sep 27, 2023
@giapnhgc giapnhgc reopened this Sep 27, 2023
@bryanoltman bryanoltman moved this from Done to Customers in 1.0 Sep 27, 2023
@eseidel
Copy link
Contributor

eseidel commented Oct 16, 2023

I'm not sure what our next steps are here. It looks like flutter is logging that there is no provisioning profile found in the app.

@eseidel eseidel moved this from Customers to Pending Customer Reply in 1.0 Oct 16, 2023
@bryanoltman
Copy link
Contributor

@giapnhgc can you share your export.plist file? I don't have any great theories about what's happening here, but that file might contain some clues.

@giapnhgc
Copy link
Author

@giapnhgc can you share your export.plist file? I don't have any great theories about what's happening here, but that file might contain some clues.

Hi, this is my export.plist file. Sorry for the late response.

<?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>destination</key>
	<string>export</string>
	<key>manageAppVersionAndBuildNumber</key>
	<false/>
	<key>method</key>
	<string>app-store</string>
	<key>provisioningProfiles</key>
	<dict>
		<key>com.ios.myapp</key>
		<string>AppDistribute</string>
	</dict>
	<key>signingCertificate</key>
	<string>Apple Distribution</string>
	<key>signingStyle</key>
	<string>manual</string>
	<key>stripSwiftSymbols</key>
	<true/>
	<key>teamID</key>
	<string>TEAM_ID</string>
	<key>uploadSymbols</key>
	<true/>
</dict>
</plist>

I'm not sure what our next steps are here. It looks like flutter is logging that there is no provisioning profile found in the app.

I understand your reasoning. But if flutter doesn't recognize this provisioning profile, how can I still build it using the shorebird command and push it to testflight for testing? Because I only get the problem when I run the command shorebird preview and want to debug if an error occurs and the build fails.

@eseidel eseidel added this to iOS Beta Oct 20, 2023
@eseidel eseidel moved this to Customers in iOS Beta Oct 20, 2023
@eseidel eseidel removed this from 1.0 Oct 20, 2023
@bryanoltman bryanoltman changed the title > Cannot run the shorebird preview command on ios Cannot run the shorebird preview command on ios Oct 20, 2023
@bryanoltman
Copy link
Contributor

I don't think the issue lies with the export options plist, although you you don't need to pass that to the shorebird preview command. What command did you use to create your release?

@bryanoltman bryanoltman moved this from Customers to Pending Customer Reply in iOS Beta Oct 23, 2023
@giapnhgc
Copy link
Author

I don't think the issue lies with the export options plist, although you you don't need to pass that to the shorebird preview command. What command did you use to create your release?

@bryanoltman I use this command to create release ipa file:
shorebird release ios-alpha -- --export-options-plist ios/Runner/export.plist --release

and this command to preview:
shorebird preview -- --export-options-plist ios/Runner/export.plist
or
shorebird preview

@eseidel eseidel moved this from Pending Customer Reply to Customers in iOS Beta Oct 25, 2023
@LeFrosch
Copy link

I think I encountered the same issue. When I tried to run shorebird preview with a physical device I got this error message:

═══════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your 
device. You can create a new Provisioning Profile for your project in Xcode for 
your team by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again

It's also possible that a previously installed app with the same Bundle 
Identifier was signed with a different certificate.

For more information, please visit:
  https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices

Or run on an iOS simulator without code signing
════════════════════════

Then I tried flutter run and got this error message:

Could not build the precompiled application for the device.
Error (Xcode): Provisioning profile "iOS Team Provisioning Profile: xxx" doesn't include the currently
selected device "xxx" (identifier xxx).

After registering the device with the provisioning profile shorebird preview started working. Hope this is helpful somehow.

@bryanoltman
Copy link
Contributor

Interesting! Thaks @LeFrosch! @giapnhgc, can you try flutter run with your app and report back whether you see this same error message?

@bryanoltman bryanoltman moved this from Customers to Pending Customer Reply in iOS Beta Nov 6, 2023
@felangel felangel added the waiting for response Waiting for customer response label Nov 13, 2023
@bryanoltman
Copy link
Contributor

Closing due to inactivity. @LeFrosch, please let us know if you're still seeing this and the suggestions above don't fix your issue.

@github-project-automation github-project-automation bot moved this from Pending Customer Reply to Done in iOS Beta Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for response Waiting for customer response
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants