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

OneSignalNotificationServiceExtension version and build numbers are not updated automatically #495

Closed
cihadturhan opened this issue Oct 15, 2021 · 4 comments

Comments

@cihadturhan
Copy link

cihadturhan commented Oct 15, 2021

Description:
I received the following warning from apple

ITMS-90473: CFBundleShortVersionString Mismatch - The CFBundleShortVersionString value '1.0' of extension 'Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex' does not match the CFBundleShortVersionString value '1.0.1' of its containing iOS application 'Runner.app'.

But I remember I've read somewhere that the target OneSignalNotificationServiceExtensions version number and build number should be updated automatically. Seems like it's left empty:

image

Environment
Service Extension's 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>$(DEVELOPMENT_LANGUAGE)</string>
	<key>CFBundleDisplayName</key>
	<string>OneSignalNotificationServiceExtension</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
	<key>CFBundleShortVersionString</key>
	<string>$(MARKETING_VERSION)</string>
	<key>CFBundleVersion</key>
	<string>$(CURRENT_PROJECT_VERSION)</string>
	<key>NSExtension</key>
	<dict>
		<key>NSExtensionPointIdentifier</key>
		<string>com.apple.usernotifications.service</string>
		<key>NSExtensionPrincipalClass</key>
		<string>NotificationService</string>
	</dict>
</dict>
</plist>

Am I missing something?

@nixonoftheyear
Copy link

nixonoftheyear commented Oct 23, 2021

same problem, after days hitting my head i was able to find a solution.

open ios/Runner.xcworkspace for opening XCode project.

  1. delete the value of version and Build and leave them empty.
    image

  2. in the Targets select OneSignalNotificationServiceExtension, Build Settings tab and search at the top right 'framework search paths'.
    now you have the Search Path displayed, click on the value and you have:

- $(inherited)
- "${PODS_ROOT}/OneSignal/iOS_SDK/OneSignalSDK/Framework"
ADD THIS:
- $(PROJECT_DIR)/Flutter

image

  1. return to your IDE (or you can do the same always in XCode in the Info tab), in iOS/OneSignalNotificationServiceExtension/Info.plist modify the following value with this variable:
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>

image

@cihadturhan
Copy link
Author

@thenixoncompany Thank you very much. I think ${PROJECT_DIR}/Flutter framework path is missing in notification extension target. I'll try that.

@risingphoenixin
Copy link

Screenshot 2023-10-23 at 11 44 27 AM

I don't see the version and build number in the latest Xcode. I opened through the workspace file, but I still cannot.

@emawby
Copy link
Contributor

emawby commented Jan 30, 2024

@risingphoenixin it looks like you are not on the info tab in that screenshot.
Closing issue as stale. If this is still happening in 2024 feel free to tag me to reopen

@emawby emawby closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants