Open chenwu054 opened 3 years ago
Does your Info.plist contain the relevant keys? I created a fresh project with Xcode and it looks like there are a few that I assume are required:
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
Thank you for your reply! @keith Yes, I have those in my info.plist file. One thing to note is that I cannot have $(PRODUCT_MODULE_NAME) with the error below, but only $(PRODUCT_NAME), possibly due to the reason in https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md
Use --sandbox_debug to see verbose messages from the sandbox ERROR: In target "//
Note: The failure of target @build_bazel_rules_apple//tools/plisttool:plisttool (with exit code 1) may have been caused by the fact that it is running under Python 3 instead of Python 2. Examine the error to determine if that appears to be the problem. Since this target is built in the host configuration, the only way to change its version is to set --host_force_python=PY2, which affects the entire build.
If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See https://github.com/bazelbuild/bazel/issues/7899 for more information.
====================================================================== Here is my Info.plist file.
<?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>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>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>
Does PRODUCT_NAME
end up being correct for your swift_library
's module_name
? or if you check the produced .ipa and see the derived value in the Info.plist is it correct?
@Keith I have the same problem, any update for this?
unknown variable reference "$(PRODUCT_MODULE_NAME)" while merging plists (key: "UIApplicationSceneManifest:UISceneConfigurations:UIWindowSceneSessionRoleApplication[0]:UISceneDelegateClassName", value: "$(PRODUCT_MODULE_NAME).SceneDelegate").
That issue is different, you can see the details on why that attribute isn't supported here https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#variable-substitution you'll have to replace it manually with your module's name
Make sure you reference your swift_libary's module_name
and not name
Info.plist configuration for UIWindowSceneSessionRoleApplication contained the key "Default Configuration" UISceneDelegateClassName but failed to load the class named "FREEDOMINSTACLONE.SceneDelegate". Info.plist configuration for UIWindowSceneSessionRoleApplication contained the key "(no name)" UISceneDelegateClassName but failed to load the class named "FIREASEINSTACLONE.SceneDelegate". Info.plist configuration "Default Configuration" for UIWindowSceneSessionRoleApplication contained the key UISceneDelegateClassName, but failed to load the class named "FREEDOMINSTACLONE.SceneDelegate". Unknown class _TtC20FIRBASEINSTACLONE14ViewController in Interface Builder file. There is no scene delegate set. A scene delegate class must be specified to use a master storyboard file.
[ "HELLO, I AM HAVING THE SAME PROBLEM, CURRENTLY IT STAYS ON BLACK SCREEN ALL THE TIME, EVERYTHING IS PERFECT BUT THERE IS NOTHING IN MY INFO FILE, WHAT IS THE PROBLEM, CAN ANYONE SOLVE IT EXACTLY?"]
I am trying to create a new ios application in swift. and I used iosapplication rule to create it with ios version 14.0. But AppDelegate's "application( application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration " is not called and none of my SceneDelegate method's called. Therefore, my app has a dark screen and no view/window/scene hierarchy. I wonder how can I resolve it. I tried searching the internet but could not find anything useful. Thank you!